#include <expression.hh>
Public Member Functions | |
virtual void | assign (const expression_t &expr) |
Copies the contents of `expr' into this expression (time O(n)). | |
expression_t (const expression_t &second) | |
A copy constructor. | |
expression_t (system_t *const system) | |
A constructor. | |
expression_t () | |
A constructor. | |
virtual int | from_string (std::string &expr_str, const size_int_t process_gid=NO_ID)=0 |
Reads in the expression from a string representation. | |
system_t * | get_parent_system () const |
Returns a "parent" system of this expression. | |
expression_t & | operator= (const expression_t &second) |
The assignment operator for expressions. | |
virtual int | read (std::istream &istr, size_int_t process_gid=NO_ID)=0 |
Reads in the expression from a string representation in stream. | |
virtual void | set_parent_system (system_t &system) |
Sets a "parent" system of this expression. | |
virtual void | swap (expression_t &expr) |
Swaps the content of `expr' and this expression (time O(1)). | |
virtual std::string | to_string () const =0 |
Returns string representation of the expression. | |
virtual void | write (std::ostream &ostr) const =0 |
Writes a string representation of the expression to stream. | |
virtual | ~expression_t () |
A destructor. | |
Protected Attributes | |
system_t * | parent_system |
Class expression_t represents expressions interpretable in a system given in a constructor expression_t(system_t * const system) of in a method set_parent_system(system_t & system)
expression_t | ( | system_t *const | system | ) | [inline] |
virtual int from_string | ( | std::string & | expr_str, | |
const size_int_t | process_gid = NO_ID | |||
) | [pure virtual] |
Reads in the expression from a string representation.
expr_str | = string containing source of an expression | |
process_gid | = context of a process (default value NO_ID = global context) |
Implemented in bymoc_expression_t, and dve_expression_t.
expression_t& operator= | ( | const expression_t & | second | ) | [inline] |
The assignment operator for expressions.
It copies the content of second (the right argument of an operator) to the left argument of an operator.
It is implemented simply by assign() method and you can also write left_argument.assign(right_argument)
instead of left_argument = right_argument
.
virtual int read | ( | std::istream & | istr, | |
size_int_t | process_gid = NO_ID | |||
) | [pure virtual] |
Reads in the expression from a string representation in stream.
istr | = input stream containing source of expression | |
process_gid | = context of process (default value NO_ID = global context) |
Implemented in bymoc_expression_t, and dve_expression_t.
virtual std::string to_string | ( | ) | const [pure virtual] |
Returns string representation of the expression.
Implementation issue: This function is slower than write(), because it does a copying of potentially long string
Implemented in bymoc_expression_t, and dve_expression_t.