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

#include <Puma/CWStrLiteral.h>

+ Inheritance diagram for Puma::CWStrLiteral:

Description

Wide string literal abstraction.

Holds the wide string value, its length, and the string type.

Public Member Functions

 CWStrLiteral (const wchar_t *s, unsigned long len, CTypeInfo *t)
 Constructor. More...
 
virtual ~CWStrLiteral ()
 Destructor. More...
 
virtual void print (std::ostream &out) const
 Print the wide string on the given output stream. More...
 
const wchar_t * String () const
 Get the wide string. More...
 
unsigned long Length () const
 Get the length of the string. More...
 
CWStrLiteralWStrLiteral () const
 Get this. More...
 
- Public Member Functions inherited from Puma::CExprValue
virtual ~CExprValue ()
 Destructor. More...
 
CTypeInfoType () const
 Get the type of the value. More...
 
virtual void print (std::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...
 

Additional Inherited Members

- Protected Member Functions inherited from Puma::CExprValue
 CExprValue (CTypeInfo *t)
 Constructor. More...
 

Constructor & Destructor Documentation

◆ CWStrLiteral()

Puma::CWStrLiteral::CWStrLiteral ( const wchar_t *  s,
unsigned long  len,
CTypeInfo t 
)
inline

Constructor.

Parameters
sThe wide string array.
lenThe length of the string.
tThe type of the string.

◆ ~CWStrLiteral()

virtual Puma::CWStrLiteral::~CWStrLiteral ( )
inlinevirtual

Destructor.

Frees the string.

Member Function Documentation

◆ Length()

unsigned long Puma::CWStrLiteral::Length ( ) const
inline

Get the length of the string.

◆ print()

virtual void Puma::CWStrLiteral::print ( std::ostream &  out) const
inlinevirtual

Print the wide string on the given output stream.

Parameters
outThe output stream.

Implements Puma::CExprValue.

◆ String()

const wchar_t * Puma::CWStrLiteral::String ( ) const
inline

Get the wide string.

◆ WStrLiteral()

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

Get this.

Reimplemented from Puma::CExprValue.