#include <cfl_elementary.h>

Public Member Functions

 Integer (void)
 
 Integer (Int val)
 
 ~Integer (void)
 
virtual IntegerNew (void) const
 
virtual IntegerCopy (void) const
 
virtual const IntegerCast (const Type *pOther) const
 
void CValue (Int val)
 
Int CValue (void) const
 
IntCReference (void)
 
Integeroperator+ (const Int &clint)
 
Integeroperator+ (const Integer &coint)
 
Integeroperator= (const Int &clint)
 
Integeroperator= (const Integer &coint)
 
Integeroperator+= (const Int &clint)
 
Integeroperator+= (const Integer &coint)
 
 operator Int () const
 
void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 
Typeoperator= (const Type &rSrc)
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 
 Type (const Type &rType)
 
virtual ~Type (void)
 
virtual void Clear (void)
 
virtual TypeAssign (const Type &rSrc)
 
Typeoperator= (const Type &rSrc)
 
virtual bool Equal (const Type &rOther) const
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
virtual void Name (const std::string &rName)
 
virtual const std::string & Name (void) const
 
virtual const std::string & TypeName (void) const
 
void Write (const Type *pContext=0) const
 
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
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 
void XWrite (const Type *pContext=0) const
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 
void DWrite (const Type *pContext=0) const
 
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
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
void SWrite (TokenWriter &rTw) const
 
void SWrite (void) const
 
std::string ToSText (void) const
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 

Protected Attributes

Int mCInteger
 

Additional Inherited Members

- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 
bool DoEqual (const Type &rOther) const
 
virtual void DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoSWrite (TokenWriter &rTw) const
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Detailed Description

Elementary type

Definition at line 49 of file cfl_elementary.h.

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 67 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 178 of file cfl_elementary.h.

◆ operator+() [1/2]

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

Sum operator.

Definition at line 128 of file cfl_elementary.h.

◆ operator+() [2/2]

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

Sum operator.

Definition at line 136 of file cfl_elementary.h.

◆ operator+=() [1/2]

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

Assignment/Sum operator

Definition at line 160 of file cfl_elementary.h.

◆ operator+=() [2/2]

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

Assignment/Sum operator

Definition at line 169 of file cfl_elementary.h.

◆ operator=() [1/3]

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

Assignment operator.

Definition at line 144 of file cfl_elementary.h.

◆ operator=() [2/3]

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

Assignment operator.

Definition at line 152 of file cfl_elementary.h.

◆ operator=() [3/3]

Type & faudes::Type::operator=

Assign configurationdata from other object. Derived classes should implement the operator form for the assignment for each source type which allows for a non-trivial assignment. This includes the particular case were the source and destination types match exactly. In the latter case the DoAssign method should be invoked. In contrast to the Assign function, the operator form must not be reimplemented for missmatched source types: the operator form only accepts sensible source types. This allows for compiletime typeckecking. However, the downside is that when the type is not known at compiletime, configuration is not properly assigned.

Re-implementation can be done via the convenience macros FAUDES_TYPE_DECLARATION and FAUDES_TYPE_IMPLEMENTATION.

Parameters
rSrcSource to copy from
Returns
Reference to this object.

Definition at line 340 of file cfl_types.cpp.

Member Data Documentation

◆ mCInteger

Int faudes::Integer::mCInteger
protected

Variable to store current value.

Definition at line 216 of file cfl_elementary.h.


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

libFAUDES 2.33c --- 2025.05.15 --- c++ api documentaion by doxygen