Puma Reference Manual Puma: Puma::CExprValue Class Reference



Puma::CExprValue Class Reference

#include <Puma/CExprValue.h>

Inheritance diagram for Puma::CExprValue:

Inheritance graph

List of all members.


Detailed Description

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.
CTypeInfoType () const
 Get the type of the value.
virtual void print (ostream &out) const =0
 Print the value on the given output stream.
virtual CConstantConstant () const
 Get a pointer to CConstant if this is an arithmetic constant.
virtual CStrLiteralStrLiteral () const
 Get a pointer to CStrLiteral if this is a string literal.
virtual CWStrLiteralWStrLiteral () const
 Get a pointer to CWStrLiteral if this is a wide string literal.

Protected Member Functions

 CExprValue (CTypeInfo *t)
 Constructor.


Constructor & Destructor Documentation

Puma::CExprValue::CExprValue ( CTypeInfo t  )  [inline, protected]

Constructor.

Parameters:
t The type of the value.

virtual Puma::CExprValue::~CExprValue (  )  [inline, virtual]

Destructor.


Member Function Documentation

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

Get the type of the value.

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

Print the value on the given output stream.

Parameters:
out The stream on which to print.

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

virtual CConstant* Puma::CExprValue::Constant (  )  const [inline, virtual]

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

Reimplemented in Puma::CConstant.

virtual CStrLiteral* Puma::CExprValue::StrLiteral (  )  const [inline, virtual]

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

Reimplemented in Puma::CStrLiteral.

virtual CWStrLiteral* Puma::CExprValue::WStrLiteral (  )  const [inline, virtual]

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

Reimplemented in Puma::CWStrLiteral.




Puma Reference Manual. Created on 11 Jul 2008.