ContRap-Core
|
Class Command is the base interface for all ContRap commands. More...
#include <command.h>
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. |
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.
crp::Command::Command | ( | ) |
Class constructor.
virtual crp::Command::~Command | ( | ) | [inline, virtual] |
Virtual destructor.
virtual CommandType crp::Command::get_command_type | ( | ) | const [pure virtual] |
Returns the enumerated type of the command.
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.
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.
Reimplemented from crp::Object.
Reimplemented in crp::Block, crp::Call, crp::Assignment, crp::Declaration, crp::Selector, crp::Load, crp::Statement, and crp::Conditional.