SizeofExpression
class SizeofExpression
Represents an expression that evaluates to the size of an object: .sizeof(object).
DEFINITION
class SizeofExpression;
constructor SizeofExpression
DEFINITION
| SizeofExpression | ( | const Location & location, | |
| const Object * object | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
object |
constructor SizeofExpression
DEFINITION
| SizeofExpression | ( | const Location & location, | |
| Symbol object_name | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
object_name |
method createstatic
DEFINITION
| static Expression create | ( | const Location & location, | |
| const std::vector< Expression > & arguments | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
arguments |
| RETURNS | DESCRIPTION |
|---|---|
Expression |
method createstatic
DEFINITION
| static Expression create | ( | const Location & location, | |
| const Object * object | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
object |
| RETURNS | DESCRIPTION |
|---|---|
Expression |
method evaluatedconstvirtual
DEFINITION
| virtual std::optional< Expression > evaluated | ( | const EvaluationContext & context | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
context |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Expression > |
method maximum_valueconstvirtual
Get the maximum possible value of the expression if it can be determined.
DEFINITION
| virtual std::optional< Value > maximum_value | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Value > |
The maximum possible value of the expression. |
method minimum_valueconstvirtual
Get the minimum possible value of the expression if it can be determined.
DEFINITION
| virtual std::optional< Value > minimum_value | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Value > |
The minimum possible value of the expression. |
method serialize_subconstvirtual
Serialize the expression to a stream.
This method must be implemented by derived classes.
DEFINITION
| virtual void serialize_sub | ( | std::ostream & stream | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
The stream to serialize to. |
method typeconstvirtual
Get the type of the expression's value if it can be determined.
DEFINITION
| virtual std::optional< Value::Type > type | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Value::Type > |
The type of the expression's value. |