PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::CSemValue Class Reference

#include <Puma/CSemValue.h>

+ Inheritance diagram for Puma::CSemValue:

Description

Semantic information object about values in the syntax tree.

Provides the value and type of an expression or entity (name).

Public Member Functions

 CSemValue ()
 Constructor. More...
 
virtual ~CSemValue ()
 Destructor. More...
 
void setValue (CExprValue *v)
 Set the semantic value information object. More...
 
void setValueRef (CExprValue *v)
 Set the semantic value information object as reference. More...
 
void setType (CTypeInfo *t)
 Set the type information object. More...
 
void setTypeRef (CTypeInfo *t)
 Set the type information object as reference. More...
 
CExprValuegetValue ()
 Get the semantic information about the value. More...
 
CTypeInfogetType ()
 Get the type of the value. More...
 

Protected Attributes

CExprValuevalue
 The semantic value information object. More...
 
CTypeInfotype
 The type information object. More...
 

Constructor & Destructor Documentation

◆ CSemValue()

Puma::CSemValue::CSemValue ( )
inline

Constructor.

◆ ~CSemValue()

Puma::CSemValue::~CSemValue ( )
inlinevirtual

Destructor.

Frees the type and value.

Member Function Documentation

◆ getType()

CTypeInfo * Puma::CSemValue::getType ( )
inline

Get the type of the value.

◆ getValue()

CExprValue * Puma::CSemValue::getValue ( )
inline

Get the semantic information about the value.

◆ setType()

void Puma::CSemValue::setType ( CTypeInfo t)
inline

Set the type information object.

Will be freed in the destructor.

Parameters
tThe type info object.

◆ setTypeRef()

void Puma::CSemValue::setTypeRef ( CTypeInfo t)
inline

Set the type information object as reference.

Will not be destroyed in the destructor.

Parameters
tThe type info object.

◆ setValue()

void Puma::CSemValue::setValue ( CExprValue v)
inline

Set the semantic value information object.

Will be freed in the destructor.

Parameters
vThe value info object.

◆ setValueRef()

void Puma::CSemValue::setValueRef ( CExprValue v)
inline

Set the semantic value information object as reference.

Will not be destroyed in the destructor.

Parameters
vThe value info object.

Member Data Documentation

◆ type

CTypeInfo* Puma::CSemValue::type
protected

The type information object.

◆ value

CExprValue* Puma::CSemValue::value
protected

The semantic value information object.