Puma Reference Manual Puma::CExprValue Class Reference



Puma::CExprValue Class Referenceabstract

Base class for syntax tree nodes representing expressions that can be resolved to a constant value (arithmetic constants and string literals). More...

#include <Puma/CExprValue.h>

Inheritance diagram for Puma::CExprValue:
Inheritance graph

Public Member Functions

virtual ~CExprValue ()
 Destructor. More...
 
CTypeInfoType () const
 Get the type of the value. More...
 
virtual void print (ostream &out) const =0
 Print the value on the given output stream. More...
 
virtual CConstantConstant () const
 Get a pointer to CConstant if this is an arithmetic constant. More...
 
virtual CStrLiteralStrLiteral () const
 Get a pointer to CStrLiteral if this is a string literal. More...
 
virtual CWStrLiteralWStrLiteral () const
 Get a pointer to CWStrLiteral if this is a wide string literal. More...
 

Protected Member Functions

 CExprValue (CTypeInfo *t)
 Constructor. More...
 

Detailed Description

Base class for syntax tree nodes representing expressions that can be resolved to a constant value (arithmetic constants and string literals).

Constructor & Destructor Documentation

Puma::CExprValue::CExprValue ( CTypeInfo t)
inlineprotected

Constructor.

Parameters
tThe type of the value.
virtual Puma::CExprValue::~CExprValue ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual CConstant* Puma::CExprValue::Constant ( ) const
inlinevirtual

Get a pointer to CConstant if this is an arithmetic constant.

Reimplemented in Puma::CConstant.

virtual void Puma::CExprValue::print ( ostream &  out) const
pure virtual

Print the value on the given output stream.

Parameters
outThe stream on which to print.

Implemented in Puma::CConstant, Puma::CStrLiteral, and Puma::CWStrLiteral.

virtual CStrLiteral* Puma::CExprValue::StrLiteral ( ) const
inlinevirtual

Get a pointer to CStrLiteral if this is a string literal.

Reimplemented in Puma::CStrLiteral.

CTypeInfo* Puma::CExprValue::Type ( ) const
inline

Get the type of the value.

virtual CWStrLiteral* Puma::CExprValue::WStrLiteral ( ) const
inlinevirtual

Get a pointer to CWStrLiteral if this is a wide string literal.

Reimplemented in Puma::CWStrLiteral.




Puma Reference Manual. Created on Tue Jan 19 2016.