faudes::String Class Reference

Elementary type. More...

#include <cfl_elementary.h>

List of all members.

Public Member Functions

 String (void)
 Constructor.
 String (std::string val)
 Constructor provided with initial value.
 ~String (void)
 Destructor.
virtual StringNew (void) const
 Construct on heap.
virtual StringCopy (void) const
 Construct copy on heap.
virtual const StringCast (const Type *pOther) const
 Cast the other object to String.
void CValue (std::string val)
 Set value.
std::string CValue (void) const
 Get value.
std::string * CReference (void)
 Get reference.
Stringoperator= (const String &costr)
 Assignment operator.
Stringoperator= (const std::string &cstr)
 operator std::string () const
 Conversion to std::string.
void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write data to Tokenwriter.
void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read data from TokenReader.

Protected Attributes

std::string mCString
 Variable to store current value.

Detailed Description

Elementary type.

Definition at line 239 of file cfl_elementary.h.


Constructor & Destructor Documentation

faudes::String::String ( void   ) 

Constructor.

Definition at line 128 of file cfl_elementary.cpp.

faudes::String::String ( std::string  val  ) 

Constructor provided with initial value.

Parameters:
val Initial value.

Definition at line 133 of file cfl_elementary.cpp.

faudes::String::~String ( void   )  [inline]

Destructor.

Definition at line 254 of file cfl_elementary.h.


Member Function Documentation

const String * faudes::String::Cast ( const Type pOther  )  const [virtual]

Cast the other object to String.

Returns NULL if the cast is not possible.

Parameters:
pOther Pointer to object to cast.
Returns:
Pointer to String instance, or NULL

Reimplemented from faudes::Type.

Definition at line 148 of file cfl_elementary.cpp.

String * faudes::String::Copy ( void   )  const [virtual]

Construct copy on heap.

Create new String instance and return pointer.

Returns:
Pointer to Integer instance.

Reimplemented from faudes::Type.

Definition at line 143 of file cfl_elementary.cpp.

std::string * faudes::String::CReference ( void   ) 

Get reference.

Returns:
Reference to c value.

Definition at line 163 of file cfl_elementary.cpp.

std::string faudes::String::CValue ( void   )  const

Get value.

Returns:
Value of object. (std::string)

Definition at line 153 of file cfl_elementary.cpp.

void faudes::String::CValue ( std::string  val  ) 

Set value.

Parameters:
val Value to be set. (std::string)

Definition at line 158 of file cfl_elementary.cpp.

void faudes::String::DoRead ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
) [virtual]

Read data from TokenReader.

Parameters:
rTr Reference to TokenReader.
rLabel Section to read.
pContext Read context to provide contextual information (ignored)
Exceptions:
Exception 
  • Token mismatch
  • IO Error

Reimplemented from faudes::Type.

Definition at line 183 of file cfl_elementary.cpp.

void faudes::String::DoWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const [virtual]

Write data to Tokenwriter.

Parameters:
rTw Reference to TokenWriter.
rLabel Label of section to write.
pContext Write context to provide contextual information (ignored)
Exceptions:
Exception 
  • IO Error

Reimplemented from faudes::Type.

Definition at line 168 of file cfl_elementary.cpp.

String * faudes::String::New ( void   )  const [virtual]

Construct on heap.

Create new String instance and return pointer.

NOTE: Calling function takes control.

Returns:
Pointer to String instance.

Reimplemented from faudes::Type.

Definition at line 138 of file cfl_elementary.cpp.

faudes::String::operator std::string (  )  const [inline]

Conversion to std::string.

Definition at line 333 of file cfl_elementary.h.

String& faudes::String::operator= ( const std::string &  cstr  )  [inline]

Definition at line 325 of file cfl_elementary.h.

String& faudes::String::operator= ( const String costr  )  [inline]

Assignment operator.

Definition at line 317 of file cfl_elementary.h.


Member Data Documentation

std::string faudes::String::mCString [protected]

Variable to store current value.

Definition at line 370 of file cfl_elementary.h.


The documentation for this class was generated from the following files:

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen