PUMA Library Reference Manual
|
#include <Puma/CExprValue.h>
Base class for syntax tree nodes representing expressions that can be resolved to a constant value (arithmetic constants and string literals).
Public Member Functions | |
virtual | ~CExprValue () |
Destructor. | |
CTypeInfo * | Type () const |
Get the type of the value. | |
virtual void | print (std::ostream &out) const =0 |
Print the value on the given output stream. | |
virtual CConstant * | Constant () const |
Get a pointer to CConstant if this is an arithmetic constant. | |
virtual CStrLiteral * | StrLiteral () const |
Get a pointer to CStrLiteral if this is a string literal. | |
virtual CWStrLiteral * | WStrLiteral () const |
Get a pointer to CWStrLiteral if this is a wide string literal. | |
Protected Member Functions | |
CExprValue (CTypeInfo *t) | |
Constructor. | |
|
inlineprotected |
Constructor.
t | The type of the value. |
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Get a pointer to CConstant if this is an arithmetic constant.
Reimplemented in Puma::CConstant.
|
pure virtual |
Print the value on the given output stream.
out | The stream on which to print. |
Implemented in Puma::CConstant, Puma::CStrLiteral, and Puma::CWStrLiteral.
|
inlinevirtual |
Get a pointer to CStrLiteral if this is a string literal.
Reimplemented in Puma::CStrLiteral.
|
inline |
Get the type of the value.
|
inlinevirtual |
Get a pointer to CWStrLiteral if this is a wide string literal.
Reimplemented in Puma::CWStrLiteral.