Class Conditional represents conditional branches.
More...
#include <conditional.h>
Detailed Description
Class Conditional represents conditional branches.
Conditional branches are if-, while-, and for-statements.
Member Enumeration Documentation
Enumerates possible block types.
- Enumerator:
-
Constructor & Destructor Documentation
Constructs a new conditional loop command.
- Parameters:
-
crp::Conditional::Conditional |
( |
const DPtr & |
init, |
|
|
const DPtr & |
condition, |
|
|
const DPtr & |
increment, |
|
|
const DPtr & |
body |
|
) |
| |
Constructs a new for command.
- Parameters:
-
virtual crp::Conditional::~Conditional |
( |
| ) |
[inline, virtual] |
Member Function Documentation
const DPtr& crp::Conditional::get_alternative |
( |
| ) |
const [inline] |
Returns the alternative code.
- Returns:
- Alternative code
const DPtr& crp::Conditional::get_body |
( |
| ) |
const [inline] |
Returns the body code.
- Returns:
- Body code
virtual CommandType crp::Conditional::get_command_type |
( |
| ) |
const [inline, virtual] |
Returns the enumerated type of the command.
- Returns:
- Type of the object
Implements crp::Command.
const DPtr& crp::Conditional::get_condition |
( |
| ) |
const [inline] |
Returns the condition code.
- Returns:
- Condition code
Returns the type of the conditional statement.
- Returns:
- Type of the statement
const DPtr& crp::Conditional::get_increment |
( |
| ) |
const [inline] |
Returns the increment code.
- Returns:
- Increment code
const DPtr& crp::Conditional::get_init |
( |
| ) |
const [inline] |
Returns the init code.
- Returns:
- Init code
virtual std::string crp::Conditional::to_string |
( |
| ) |
const [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::Command.
Field Documentation
Type of the conditional statement.
The documentation for this class was generated from the following file: