Detailed Description

Elementary type.

Definition at line 49 of file cfl_elementary.h.

#include <cfl_elementary.h>

Public Member Functions

 Integer (void)
 Constructor. More...
 
 Integer (Int val)
 Constructor provided with initial value. More...
 
 ~Integer (void)
 Destructor. More...
 
virtual IntegerNew (void) const
 Construct on heap. More...
 
virtual IntegerCopy (void) const
 Construct copy on heap. More...
 
virtual const IntegerCast (const Type *pOther) const
 Cast the other object to Integer. More...
 
void CValue (Int val)
 Set value. More...
 
Int CValue (void) const
 Get value. More...
 
IntCReference (void)
 Get reference. More...
 
Integeroperator+ (const Int &clint)
 Sum operator. More...
 
Integeroperator+ (const Integer &coint)
 Sum operator. More...
 
Integeroperator= (const Int &clint)
 Assignment operator. More...
 
Integeroperator= (const Integer &coint)
 Assignment operator. More...
 
Integeroperator+= (const Int &clint)
 Assignment/Sum operator. More...
 
Integeroperator+= (const Integer &coint)
 Assignment/Sum operator. More...
 
 operator Int () const
 Conversion to C++ type. More...
 
void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Reimplementation of faudes::Type::DoWrite() Write data to Tokenwriter. More...
 
void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read data from TokenReader. More...
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 Constructor. More...
 
 Type (const Type &rType)
 Copy constructor. More...
 
virtual ~Type (void)
 Destructor. More...
 
virtual void Clear (void)
 Clear configuration data. More...
 
virtual TypeAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
virtual Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object. More...
 
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator== (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual bool operator!= (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual void Name (const std::string &rName)
 Set the objects's name. More...
 
virtual const std::string & Name (void) const
 Get objects's name. More...
 
virtual const std::string & TypeName (void) const
 Get objects's type name. More...
 
void Write (const Type *pContext=0) const
 Write configuration data to console. More...
 
void Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file. More...
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 Write configuration data to a file. More...
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to TokenWriter. More...
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to an XML file. More...
 
void XWrite (const Type *pContext=0) const
 Write configuration data in XML format to concole Note: this write function uses the virtual function DoXWrite(), to be reimplemented by derived classes. More...
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in XML format to TokenWriter. More...
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a string. More...
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a formated string. More...
 
void DWrite (const Type *pContext=0) const
 Write configuration data to console, debugging format. More...
 
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file, debugging format. More...
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debug format to TokenWriter. More...
 
void SWrite (TokenWriter &rTw) const
 Write statistics comment to TokenWriter. More...
 
void SWrite (void) const
 Write statistics comment to console. More...
 
std::string ToSText (void) const
 Write statistics to a string. More...
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified. More...
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from a string. More...
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified. More...
 

Protected Attributes

Int mCInteger
 Variable to store current value. More...
 

Additional Inherited Members

- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 Assign configuration data from other object. More...
 
bool DoEqual (const Type &rOther) const
 Test equality of configuration data. More...
 
virtual void DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data of this object to TokenWriter in XML format. More...
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debugging format to TokenWriter. More...
 
virtual void DoSWrite (TokenWriter &rTw) const
 Write statistical data as a comment to TokenWriter. More...
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 Get objects's type definition. More...
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Constructor & Destructor Documentation

◆ Integer() [1/2]

faudes::Integer::Integer ( void  )

Constructor.

Definition at line 43 of file cfl_elementary.cpp.

◆ Integer() [2/2]

faudes::Integer::Integer ( Int  val)

Constructor provided with initial value.

Parameters
valInitial value.

Definition at line 47 of file cfl_elementary.cpp.

◆ ~Integer()

faudes::Integer::~Integer ( void  )
inline

Destructor.

Definition at line 64 of file cfl_elementary.h.

Member Function Documentation

◆ Cast()

const Integer * faudes::Integer::Cast ( const Type pOther) const
virtual

Cast the other object to Integer.

Returns NULL if the cast is not possible.

Parameters
pOtherPointer to object to cast.
Returns
Pointer to Integer instance, or NULL

Reimplemented from faudes::Type.

Definition at line 59 of file cfl_elementary.cpp.

◆ Copy()

Integer * faudes::Integer::Copy ( void  ) const
virtual

Construct copy on heap.

Create new Integer instance and return pointer.

Returns
Pointer to Integer instance.

Reimplemented from faudes::Type.

Definition at line 55 of file cfl_elementary.cpp.

◆ CReference()

Int * faudes::Integer::CReference ( void  )

Get reference.

Returns
Reference to c value.

Definition at line 71 of file cfl_elementary.cpp.

◆ CValue() [1/2]

void faudes::Integer::CValue ( Int  val)

Set value.

Parameters
valValue to be set.

Definition at line 63 of file cfl_elementary.cpp.

◆ CValue() [2/2]

Int faudes::Integer::CValue ( void  ) const

Get value.

Returns
Value of object. (Int)

Definition at line 67 of file cfl_elementary.cpp.

◆ DoRead()

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

Read data from TokenReader.

Parameters
rTrReference to TokenReader.
rLabelSection to read.
pContextContext information
Exceptions
Exception
  • Token mismatch
  • IO Error

Reimplemented from faudes::Type.

Definition at line 89 of file cfl_elementary.cpp.

◆ DoWrite()

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

Reimplementation of faudes::Type::DoWrite() Write data to Tokenwriter.

Parameters
rTwReference to TokenWriter.
rLabelLabel of section to write.
pContextContext information
Exceptions
Exception
  • IO Error (id 2)

Reimplemented from faudes::Type.

Definition at line 75 of file cfl_elementary.cpp.

◆ New()

Integer * faudes::Integer::New ( void  ) const
virtual

Construct on heap.

Create new Integer instance and return pointer.

Returns
Pointer to Integer instance.

Reimplemented from faudes::Type.

Definition at line 51 of file cfl_elementary.cpp.

◆ operator Int()

faudes::Integer::operator Int ( ) const
inline

Conversion to C++ type.

Definition at line 175 of file cfl_elementary.h.

◆ operator+() [1/2]

Integer& faudes::Integer::operator+ ( const Int clint)
inline

Sum operator.

Definition at line 125 of file cfl_elementary.h.

◆ operator+() [2/2]

Integer& faudes::Integer::operator+ ( const Integer coint)
inline

Sum operator.

Definition at line 133 of file cfl_elementary.h.

◆ operator+=() [1/2]

Integer& faudes::Integer::operator+= ( const Int clint)
inline

Assignment/Sum operator.

Definition at line 157 of file cfl_elementary.h.

◆ operator+=() [2/2]

Integer& faudes::Integer::operator+= ( const Integer coint)
inline

Assignment/Sum operator.

Definition at line 166 of file cfl_elementary.h.

◆ operator=() [1/2]

Integer& faudes::Integer::operator= ( const Int clint)
inline

Assignment operator.

Definition at line 141 of file cfl_elementary.h.

◆ operator=() [2/2]

Integer& faudes::Integer::operator= ( const Integer coint)
inline

Assignment operator.

Definition at line 149 of file cfl_elementary.h.

Member Data Documentation

◆ mCInteger

Int faudes::Integer::mCInteger
protected

Variable to store current value.

Definition at line 213 of file cfl_elementary.h.


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

libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen