ContRap-Core
Public Types | Public Member Functions

crp::Command Class Reference

Class Command is the base interface for all ContRap commands. More...

#include <command.h>

Inheritance diagram for crp::Command:
crp::Object crp::ArgCommand crp::Assignment crp::Block crp::Call crp::Conditional crp::Declaration crp::Load crp::Selector crp::Statement

Public Types

enum  CommandType {
  BLOCK, ASSIGNMENT, DECLARATION, STATEMENT,
  CALL, SELECTOR, LOAD, CONDITIONAL
}
 

Enumerates command types.

More...

Public Member Functions

 Command ()
 Class constructor.
virtual ~Command ()
 Virtual destructor.
virtual Type get_type () const
 Returns the enumerated type of the object.
virtual CommandType get_command_type () const =0
 Returns the enumerated type of the command.
virtual std::string to_string () const
 Converts the object to a non-formatted string.

Detailed Description

Class Command is the base interface for all ContRap commands.

A command is a piece of code, which can be evaluated by the ContRap interpreter.


Member Enumeration Documentation

Enumerates command types.

Enumerator:
BLOCK 
ASSIGNMENT 
DECLARATION 
STATEMENT 
CALL 
SELECTOR 
LOAD 
CONDITIONAL 

Constructor & Destructor Documentation

crp::Command::Command ( )

Class constructor.

virtual crp::Command::~Command ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

virtual CommandType crp::Command::get_command_type ( ) const [pure virtual]

Returns the enumerated type of the command.

Returns:
Type of the object

Implemented in crp::Block, crp::Call, crp::Assignment, crp::Declaration, crp::Selector, crp::Load, crp::Statement, and crp::Conditional.

virtual Type crp::Command::get_type ( ) const [inline, virtual]

Returns the enumerated type of the object.

Returns:
Type of the object

Reimplemented from crp::Object.

virtual std::string crp::Command::to_string ( ) const [inline, virtual]

Converts the object to a non-formatted string.

This method is thought to be used for debugging purposes only.

Returns:
String representation of the object

Reimplemented from crp::Object.

Reimplemented in crp::Block, crp::Call, crp::Assignment, crp::Declaration, crp::Selector, crp::Load, crp::Statement, and crp::Conditional.


The documentation for this class was generated from the following file: