ContRap-Core
Public Member Functions | Protected Attributes

crp::Assignment Class Reference

Class Assignment represents assignments of identifiers. More...

#include <command.h>

Inheritance diagram for crp::Assignment:
crp::Command crp::Object

Public Member Functions

 Assignment (const DPtr &lvalue, const DPtr &rvalue)
 Constructs a new assignment of the form "lvalue := rvalue".
virtual ~Assignment ()
 Virtual destructor.
const DPtrget_lvalue () const
 Returns the lvalue.
const DPtrget_rvalue () const
 Returns the rvalue.
virtual CommandType get_command_type () const
 Returns the enumerated type of the command.
virtual std::string to_string () const
 Converts the object to a non-formatted string.

Protected Attributes

DPtr lvalue
 Values.
DPtr rvalue

Detailed Description

Class Assignment represents assignments of identifiers.

An assignment searches in the parent scopes to find an identifier to assign.


Constructor & Destructor Documentation

crp::Assignment::Assignment ( const DPtr lvalue,
const DPtr rvalue 
)

Constructs a new assignment of the form "lvalue := rvalue".

Parameters:
lvalueValue which will be overwritten
rvalueAssigned expression
virtual crp::Assignment::~Assignment ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

virtual CommandType crp::Assignment::get_command_type ( ) const [inline, virtual]

Returns the enumerated type of the command.

Returns:
Type of the object

Implements crp::Command.

const DPtr& crp::Assignment::get_lvalue ( ) const [inline]

Returns the lvalue.

Returns:
Lvalue of the assignment
const DPtr& crp::Assignment::get_rvalue ( ) const [inline]

Returns the rvalue.

Returns:
Rvalue of the assignment
virtual std::string crp::Assignment::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

Values.


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