NLGEORGES::CFormElm Class Reference

Base class of form elements. More...

#include <form_elm.h>

Inherits NLGEORGES::UFormElm.

Inherited by NLGEORGES::CFormElmArray, NLGEORGES::CFormElmAtom, and NLGEORGES::CFormElmStruct.

List of all members.

Public Member Functions

 CFormElm (CForm *form, CFormElm *parentNode, const CFormDfn *parentDfn, uint parentIndex)
virtual ~CFormElm ()
virtual void clean ()
 Reset contents.
CFormgetForm () const
virtual bool isUsed (const CForm *form) const
virtual void getFormName (std::string &result, const CFormElm *child=NULL) const =0
virtual bool getNodeByName (const UFormElm **result, const char *name, TWhereIsNode *where, bool verbose, uint32 round=0) const
virtual bool getNodeByName (UFormElm **result, const char *name, TWhereIsNode *where, bool verbose, uint32 round=0)
virtual bool getValueByName (std::string &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
 Get a form value with its name.
virtual bool getValueByName (sint8 &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (uint8 &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (sint16 &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (uint16 &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (sint32 &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (uint32 &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (float &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (double &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (bool &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
virtual bool getValueByName (NLMISC::CRGBA &result, const char *name, TEval evaluate, TWhereIsValue *where, uint32 round=0) const
 Warning, only R, G and B members are filled, not A.
virtual bool setValueByName (const char *value, const char *name, bool *created)
 Set a form value with its name.
virtual bool setValueByName (sint8 value, const char *name, bool *created)
virtual bool setValueByName (uint8 value, const char *name, bool *created)
virtual bool setValueByName (sint16 value, const char *name, bool *created)
virtual bool setValueByName (uint16 value, const char *name, bool *created)
virtual bool setValueByName (sint32 value, const char *name, bool *created)
virtual bool setValueByName (uint32 value, const char *name, bool *created)
virtual bool setValueByName (float value, const char *name, bool *created)
virtual bool setValueByName (double value, const char *name, bool *created)
virtual bool setValueByName (bool value, const char *name, bool *created)
virtual bool setValueByName (NLMISC::CRGBA value, const char *name, bool *created)
virtual UFormElmgetParent () const
virtual bool isArray () const
 Return true if the element is an array.
virtual bool getArraySize (uint &size) const
 Return true if the element is an array and fill size with the array size.
virtual bool getArrayNode (const UFormElm **result, uint arrayIndex) const
virtual bool getArrayNode (UFormElm **result, uint arrayIndex)
virtual bool getArrayNodeName (std::string &result, uint arrayIndex) const
 Return the name of a table element.
virtual bool getArrayValue (std::string &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
 Get an array value.
virtual bool getArrayValue (sint8 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (uint8 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (sint16 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (uint16 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (sint32 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (uint32 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (float &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (double &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (bool &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
virtual bool getArrayValue (NLMISC::CRGBA &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const
 Warning, only R, G and B members are filled, not A.
virtual bool isStruct () const
 Return true if the element is a struct or a virtual struct.
virtual bool isVirtualStruct () const
 Return true if the element is a virtual struct.
virtual bool getDfnName (std::string &dfnName) const
 Get the dfn filename for this virtual struct. Must be a virtual struct node.
virtual bool getStructSize (uint &size) const
 Return the struct size.
virtual bool getStructNodeName (uint element, std::string &result) const
 Return the element name.
virtual bool getStructNode (uint element, const UFormElm **result) const
virtual bool getStructNode (uint element, UFormElm **result)
virtual bool isAtom () const
 Return true if the element is an atom.
virtual bool getValue (std::string &resultname, TEval evaluate) const
 Return the atom value.
virtual bool getValue (sint8 &resultname, TEval evaluate) const
virtual bool getValue (uint8 &resultname, TEval evaluate) const
virtual bool getValue (sint16 &resultname, TEval evaluate) const
virtual bool getValue (uint16 &resultname, TEval evaluate) const
virtual bool getValue (sint32 &resultname, TEval evaluate) const
virtual bool getValue (uint32 &resultname, TEval evaluate) const
virtual bool getValue (float &resultname, TEval evaluate) const
virtual bool getValue (double &resultname, TEval evaluate) const
virtual bool getValue (bool &resultname, TEval evaluate) const
virtual bool getValue (NLMISC::CRGBA &resultname, TEval evaluate) const
 Warning, only R, G and B members are filled, not A.
virtual UFormDfngetStructDfn ()
 Return the struct dfn.
bool convertValue (sint8 &result, const char *value) const
bool convertValue (uint8 &result, const char *value) const
bool convertValue (sint16 &result, const char *value) const
bool convertValue (uint16 &result, const char *value) const
bool convertValue (sint32 &result, const char *value) const
bool convertValue (uint32 &result, const char *value) const
bool convertValue (float &result, const char *value) const
bool convertValue (double &result, const char *value) const
bool convertValue (bool &result, const char *value) const
bool convertValue (NLMISC::CRGBA &result, const char *value) const
virtual void getDependencies (std::set< std::string > &dependencies) const =0
bool createNodeByName (const char *name, const CFormDfn **parentDfn, uint &indexDfn, const CFormDfn **nodeDfn, const CType **nodeType, CFormElm **node, UFormDfn::TEntryType &type, bool &array, bool &created)
bool deleteNodeByName (const char *name, const CFormDfn **parentDfn, uint &indexDfn, const CFormDfn **nodeDfn, const CType **nodeType, CFormElm **node, UFormDfn::TEntryType &type, bool &array)
 Delete a node by name.
bool getNodeByName (const char *name, const CFormDfn **parentDfn, uint &indexDfn, const CFormDfn **nodeDfn, const CType **nodeType, CFormElm **node, UFormDfn::TEntryType &type, bool &array, bool &parentVDfnArray, bool verbose, uint32 round) const
bool arrayInsertNodeByName (const char *name, const CFormDfn **parentDfn, uint &indexDfn, const CFormDfn **nodeDfn, const CType **nodeType, CFormElm **node, UFormDfn::TEntryType &type, bool &array, bool verbose, uint arrayIndex) const
 Insert an array node by name The index asked must be < the size of the array.
bool arrayDeleteNodeByName (const char *name, const CFormDfn **parentDfn, uint &indexDfn, const CFormDfn **nodeDfn, const CType **nodeType, CFormElm **node, UFormDfn::TEntryType &type, bool &array, bool verbose, uint arrayIndex) const
 Delete an array node by name The index asked must be < the size of the array.
virtual xmlNodePtr write (xmlNodePtr node, const CForm *form, const char *structName=NULL, bool forceWrite=false) const =0

Static Public Member Functions

static const char * tokenize (const char *name, std::string &str, uint &errorIndex, uint &code)

Protected Types

enum  TNodeAction { Return, Create, Delete }

Protected Member Functions

virtual void unlink (CFormElm *child)
 Unlink a child.
virtual void warning (bool exception, const char *function, const char *format,...) const

Static Protected Member Functions

static bool getInternalNodeByName (CForm *form, const char *name, const CFormDfn **parentDfn, uint &indexDfn, const CFormDfn **nodeDfn, const CType **nodeType, CFormElm **node, UFormDfn::TEntryType &type, bool &array, TNodeAction action, bool &created, bool &parentVDfnArray, bool verbose, uint32 round)
 Is createNode == Create, (*node)->Form must be == to the form argument.
static void warning (bool exception, const char *formName, const char *formFileName, const char *function, const char *format,...)

Protected Attributes

CFormForm
CFormElmParentNode
const CFormDfnParentDfn
uint ParentIndex
uint32 Round

Private Types

enum  TToken { TokenString = 0, TokenPoint, TokenArrayBegin, TokenArrayEnd }

Friends

class CForm
class CType
class CFormDfn

Detailed Description

Base class of form elements.

Definition at line 46 of file form_elm.h.


Member Enumeration Documentation

Enumerator:
Return 
Create 
Delete 

Definition at line 193 of file form_elm.h.

Enumerator:
TokenString 
TokenPoint 
TokenArrayBegin 
TokenArrayEnd 

Definition at line 249 of file form_elm.h.


Constructor & Destructor Documentation

NLGEORGES::CFormElm::CFormElm ( CForm form,
CFormElm parentNode,
const CFormDfn parentDfn,
uint  parentIndex 
)

Definition at line 326 of file form_elm.cpp.

References Form, ParentDfn, ParentIndex, ParentNode, and Round.

NLGEORGES::CFormElm::~CFormElm (  )  [virtual]

Definition at line 337 of file form_elm.cpp.

References clean().


Member Function Documentation

bool NLGEORGES::CFormElm::arrayDeleteNodeByName ( const char *  name,
const CFormDfn **  parentDfn,
uint indexDfn,
const CFormDfn **  nodeDfn,
const CType **  nodeType,
CFormElm **  node,
UFormDfn::TEntryType type,
bool array,
bool  verbose,
uint  arrayIndex 
) const

Delete an array node by name The index asked must be < the size of the array.

Definition at line 717 of file form_elm.cpp.

References Create, NLGEORGES::CFormElmArray::Elements, Form, getInternalNodeByName(), isArray(), nlassert, NLGEORGES_FIRST_ROUND, ParentDfn, ParentIndex, and NLMISC::safe_cast().

bool NLGEORGES::CFormElm::arrayInsertNodeByName ( const char *  name,
const CFormDfn **  parentDfn,
uint indexDfn,
const CFormDfn **  nodeDfn,
const CType **  nodeType,
CFormElm **  node,
UFormDfn::TEntryType type,
bool array,
bool  verbose,
uint  arrayIndex 
) const
virtual void NLGEORGES::CFormElm::clean ( void   )  [inline, virtual]

Reset contents.

Reimplemented in NLGEORGES::CFormElmStruct, and NLGEORGES::CFormElmArray.

Definition at line 60 of file form_elm.h.

Referenced by ~CFormElm().

bool NLGEORGES::CFormElm::convertValue ( NLMISC::CRGBA result,
const char *  value 
) const [inline]
bool NLGEORGES::CFormElm::convertValue ( bool result,
const char *  value 
) const [inline]

Definition at line 623 of file form_elm.h.

References NLMISC::fromString(), NLMISC::toLower(), and warning().

bool NLGEORGES::CFormElm::convertValue ( double result,
const char *  value 
) const [inline]

Definition at line 605 of file form_elm.h.

References NLMISC::fromString(), and warning().

bool NLGEORGES::CFormElm::convertValue ( float result,
const char *  value 
) const [inline]

Definition at line 589 of file form_elm.h.

References NLMISC::fromString(), and warning().

bool NLGEORGES::CFormElm::convertValue ( uint32 result,
const char *  value 
) const [inline]

Definition at line 570 of file form_elm.h.

References NLMISC::clamp(), NLMISC::fromString(), and warning().

bool NLGEORGES::CFormElm::convertValue ( sint32 result,
const char *  value 
) const [inline]

Definition at line 551 of file form_elm.h.

References NLMISC::clamp(), NLMISC::fromString(), and warning().

bool NLGEORGES::CFormElm::convertValue ( uint16 result,
const char *  value 
) const [inline]

Definition at line 532 of file form_elm.h.

References NLMISC::clamp(), NLMISC::fromString(), and warning().

bool NLGEORGES::CFormElm::convertValue ( sint16 result,
const char *  value 
) const [inline]

Definition at line 513 of file form_elm.h.

References NLMISC::clamp(), NLMISC::fromString(), and warning().

bool NLGEORGES::CFormElm::convertValue ( uint8 result,
const char *  value 
) const [inline]

Definition at line 494 of file form_elm.h.

References NLMISC::clamp(), NLMISC::fromString(), and warning().

bool NLGEORGES::CFormElm::convertValue ( sint8 result,
const char *  value 
) const [inline]
bool NLGEORGES::CFormElm::createNodeByName ( const char *  name,
const CFormDfn **  parentDfn,
uint indexDfn,
const CFormDfn **  nodeDfn,
const CType **  nodeType,
CFormElm **  node,
UFormDfn::TEntryType type,
bool array,
bool created 
)

Definition at line 594 of file form_elm.cpp.

References Create, Form, getInternalNodeByName(), NLGEORGES_FIRST_ROUND, ParentDfn, and ParentIndex.

Referenced by setValueByName().

bool NLGEORGES::CFormElm::deleteNodeByName ( const char *  name,
const CFormDfn **  parentDfn,
uint indexDfn,
const CFormDfn **  nodeDfn,
const CType **  nodeType,
CFormElm **  node,
UFormDfn::TEntryType type,
bool array 
)

Delete a node by name.

If the node already exists, return it Delete its parent if not used

Definition at line 610 of file form_elm.cpp.

References Delete, Form, getInternalNodeByName(), NLGEORGES_FIRST_ROUND, ParentDfn, and ParentIndex.

bool NLGEORGES::CFormElm::getArrayNode ( UFormElm **  result,
uint  arrayIndex 
) [virtual]

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 74 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayNode ( const UFormElm **  result,
uint  arrayIndex 
) const [virtual]

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 66 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayNodeName ( std::string &  result,
uint  arrayIndex 
) const [virtual]

Return the name of a table element.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 82 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArraySize ( uint size  )  const [virtual]

Return true if the element is an array and fill size with the array size.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 58 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( NLMISC::CRGBA result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Warning, only R, G and B members are filled, not A.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 170 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( bool result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 162 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( double result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 154 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( float result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 146 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( uint32 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 138 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( sint32 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 130 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( uint16 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 122 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( sint16 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 114 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( uint8 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 106 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( sint8 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 98 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getArrayValue ( std::string &  result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]

Get an array value.

The node must be an array of atom element.

Parameters:
result is a reference on the value to fill with the result.
arrayIndex is the array index to evaluate.
evaluate must be true if you want to have an evaluated value, false if you want the formula value.
where is a pointer on the information flag of the value. If Where is not NULL, it is filled with the position where the value has been found.
Returns:
true if the result has been filled, false if the value has not been found or the cast has failed or the evaluation has failed.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 90 of file form_elm.cpp.

References warning().

virtual void NLGEORGES::CFormElm::getDependencies ( std::set< std::string > &  dependencies  )  const [pure virtual]
bool NLGEORGES::CFormElm::getDfnName ( std::string &  dfnName  )  const [virtual]

Get the dfn filename for this virtual struct. Must be a virtual struct node.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmVirtualStruct.

Definition at line 192 of file form_elm.cpp.

CForm * NLGEORGES::CFormElm::getForm (  )  const

Definition at line 351 of file form_elm.cpp.

References Form.

Referenced by getNodeByName(), and warning().

virtual void NLGEORGES::CFormElm::getFormName ( std::string &  result,
const CFormElm child = NULL 
) const [pure virtual]
bool NLGEORGES::CFormElm::getInternalNodeByName ( CForm form,
const char *  name,
const CFormDfn **  parentDfn,
uint indexDfn,
const CFormDfn **  nodeDfn,
const CType **  nodeType,
CFormElm **  node,
UFormDfn::TEntryType type,
bool array,
TNodeAction  action,
bool created,
bool parentVDfnArray,
bool  verbose,
uint32  round 
) [static, protected]

Is createNode == Create, (*node)->Form must be == to the form argument.

Is createNode == Return, form argument is not used, can be undefined.

Only form, name, and action, must be defined. Then, else (*parentDfn / indexDfn ) or *node must be defined. Other values are for result only.

Definition at line 762 of file form_elm.cpp.

References NLGEORGES::CFormElmStruct::build(), Create, Delete, NLGEORGES::CFormElmVirtualStruct::DfnFilename, NLGEORGES::CFormElmArray::Elements, NLGEORGES::CFormElmStruct::Elements, NLGEORGES::CFormDfn::Entries, NLGEORGES::UFormDfn::EntryDfn, NLGEORGES::UFormDfn::EntryType, NLGEORGES::UFormDfn::EntryVirtualDfn, NLGEORGES::CFormElmStruct::FormDfn, NLGEORGES::CFormDfn::CEntry::getArrayFlag(), NLGEORGES::CFormDfn::CEntry::getDfnPtr(), NLGEORGES::CFormDfn::getEntry(), NLGEORGES::CForm::getFilename(), NLGEORGES::CFormElmStruct::getFormName(), getFormName(), NLGEORGES::UFormElm::getNodeByName(), getParent(), NLGEORGES::CForm::getParent(), NLGEORGES::CForm::getParentCount(), NLGEORGES::CForm::getRootNode(), NLGEORGES::CType::getType(), NLGEORGES::CFormDfn::CEntry::getType(), NLGEORGES::CFormDfn::CEntry::getTypePtr(), isArray(), isUsed(), NLGEORGES::UFormElm::isVirtualStruct(), nlassert, NLGEORGES_MAX_RECURSION, nlstop, nlverify, Return, NLMISC::safe_cast(), NLMISC::smprintf(), TokenArrayBegin, TokenArrayEnd, tokenize(), TokenPoint, TokenString, unlink(), and warning().

Referenced by arrayDeleteNodeByName(), arrayInsertNodeByName(), createNodeByName(), deleteNodeByName(), and getNodeByName().

bool NLGEORGES::CFormElm::getNodeByName ( const char *  name,
const CFormDfn **  parentDfn,
uint indexDfn,
const CFormDfn **  nodeDfn,
const CType **  nodeType,
CFormElm **  node,
UFormDfn::TEntryType type,
bool array,
bool parentVDfnArray,
bool  verbose,
uint32  round 
) const

Definition at line 627 of file form_elm.cpp.

References Form, getInternalNodeByName(), ParentDfn, ParentIndex, and Return.

bool NLGEORGES::CFormElm::getNodeByName ( UFormElm **  result,
const char *  name,
TWhereIsNode where,
bool  verbose,
uint32  round = 0 
) [virtual]

Definition at line 358 of file form_elm.cpp.

References getNodeByName().

bool NLGEORGES::CFormElm::getNodeByName ( const UFormElm **  result,
const char *  name,
TWhereIsNode where,
bool  verbose,
uint32  round = 0 
) const [virtual]
UFormElm * NLGEORGES::CFormElm::getParent (  )  const [virtual]

Definition at line 587 of file form_elm.cpp.

References ParentNode.

Referenced by getInternalNodeByName().

virtual UFormDfn* NLGEORGES::CFormElm::getStructDfn (  )  [inline, virtual]

Return the struct dfn.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmStruct.

Definition at line 132 of file form_elm.h.

bool NLGEORGES::CFormElm::getStructNode ( uint  element,
UFormElm **  result 
) [virtual]

Reimplemented in NLGEORGES::CFormElmStruct.

Definition at line 223 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getStructNode ( uint  element,
const UFormElm **  result 
) const [virtual]

Reimplemented in NLGEORGES::CFormElmStruct.

Definition at line 215 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getStructNodeName ( uint  element,
std::string &  result 
) const [virtual]

Return the element name.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmStruct.

Definition at line 207 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getStructSize ( uint size  )  const [virtual]

Return the struct size.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmStruct.

Definition at line 199 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( NLMISC::CRGBA result,
TEval  evaluate 
) const [virtual]

Warning, only R, G and B members are filled, not A.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 318 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( bool resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 310 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( double resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 302 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( float resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 294 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( uint32 resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 286 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( sint32 resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 278 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( uint16 resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 270 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( sint16 resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 262 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( uint8 resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 254 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( sint8 resultname,
TEval  evaluate 
) const [virtual]

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 246 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValue ( std::string &  result,
TEval  evaluate 
) const [virtual]

Return the atom value.

The numbers are clamped to the type limit values.

Parameters:
result is the reference on the value to fill with result
evaluate must be true if you want to have an evaluated value, false if you want the formula value.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 238 of file form_elm.cpp.

References warning().

bool NLGEORGES::CFormElm::getValueByName ( NLMISC::CRGBA result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Warning, only R, G and B members are filled, not A.

Implements NLGEORGES::UFormElm.

Definition at line 573 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( bool result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 559 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( double result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 545 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( float result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 531 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( uint32 result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 517 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( sint32 result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 503 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( uint16 result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 489 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( sint16 result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 475 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( uint8 result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 461 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( sint8 result,
const char *  name,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 447 of file form_elm.cpp.

References convertValue(), and getValueByName().

bool NLGEORGES::CFormElm::getValueByName ( std::string &  result,
const char *  namename,
TEval  evaluate,
TWhereIsValue where,
uint32  round = 0 
) const [virtual]

Get a form value with its name.

The numbers are clamped to the type limit values.

Parameters:
result is a reference on the value to fill with the result.
name is the form name of the value to found.
evaluate must be true if you want to have an evaluated value, false if you want the formula value.
where is a pointer on the information flag of the value. If Where is not NULL, it is filled with the position where the value has been found.
Returns:
true if the result has been filled, false if the value has not been found or the cast has failed or the evaluation has failed.
See also:
getNodeByName ()

Implements NLGEORGES::UFormElm.

Definition at line 404 of file form_elm.cpp.

References NLGEORGES::UFormDfn::EntryType, Form, getNodeByName(), NLGEORGES::CType::getValue(), nlassert, NLMISC::safe_cast(), and warning().

Referenced by getValueByName().

bool NLGEORGES::CFormElm::isArray (  )  const [virtual]

Return true if the element is an array.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmArray.

Definition at line 51 of file form_elm.cpp.

Referenced by arrayDeleteNodeByName(), arrayInsertNodeByName(), and getInternalNodeByName().

bool NLGEORGES::CFormElm::isAtom (  )  const [virtual]

Return true if the element is an atom.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 231 of file form_elm.cpp.

bool NLGEORGES::CFormElm::isStruct (  )  const [virtual]

Return true if the element is a struct or a virtual struct.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmStruct.

Definition at line 178 of file form_elm.cpp.

bool NLGEORGES::CFormElm::isUsed ( const CForm form  )  const [virtual]
bool NLGEORGES::CFormElm::isVirtualStruct (  )  const [virtual]

Return true if the element is a virtual struct.

Implements NLGEORGES::UFormElm.

Reimplemented in NLGEORGES::CFormElmVirtualStruct.

Definition at line 185 of file form_elm.cpp.

bool NLGEORGES::CFormElm::setValueByName ( NLMISC::CRGBA  value,
const char *  name,
bool created 
) [virtual]
bool NLGEORGES::CFormElm::setValueByName ( bool  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1638 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( double  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1631 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( float  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1624 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( uint32  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1617 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( sint32  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1610 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( uint16  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1603 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( sint16  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1596 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( uint8  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1589 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( sint8  value,
const char *  name,
bool created 
) [virtual]

Implements NLGEORGES::UFormElm.

Definition at line 1582 of file form_elm.cpp.

References setValueByName(), and NLMISC::toString().

bool NLGEORGES::CFormElm::setValueByName ( const char *  value,
const char *  name,
bool created 
) [virtual]

Set a form value with its name.

If the node doesn't exist, it is created.

Parameters:
value is a reference on the value to set in the form.
name is the form name of the value to set or create.
where is a pointer on the information flag of the value. If Where is not NULL, it is filled with the position where the value has been found.
created is a pointer on the creatation flag. If created is not NULL, it is filled with true if the value has been created, false it the value has been filled.
Returns:
true if the value has been set, false if the value has not been found or hasn't been created.

Implements NLGEORGES::UFormElm.

Definition at line 1530 of file form_elm.cpp.

References createNodeByName(), NLGEORGES::UFormDfn::EntryType, nlassert, NLMISC::safe_cast(), NLGEORGES::CFormElmAtom::setValue(), and warning().

Referenced by setValueByName().

const char * NLGEORGES::CFormElm::tokenize ( const char *  name,
std::string &  str,
uint errorIndex,
uint code 
) [static]

Definition at line 1480 of file form_elm.cpp.

References TokenArrayBegin, TokenArrayEnd, TokenPoint, and TokenString.

Referenced by getInternalNodeByName().

void NLGEORGES::CFormElm::unlink ( CFormElm child  )  [protected, virtual]

Unlink a child.

Definition at line 1522 of file form_elm.cpp.

References nlstop.

Referenced by getInternalNodeByName().

void NLGEORGES::CFormElm::warning ( bool  exception,
const char *  function,
const char *  format,
  ... 
) const [protected, virtual]
void NLGEORGES::CFormElm::warning ( bool  exception,
const char *  formName,
const char *  formFileName,
const char *  function,
const char *  format,
  ... 
) [static, protected]
virtual xmlNodePtr NLGEORGES::CFormElm::write ( xmlNodePtr  node,
const CForm form,
const char *  structName = NULL,
bool  forceWrite = false 
) const [pure virtual]

Friends And Related Function Documentation

friend class CForm [friend]

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 48 of file form_elm.h.

friend class CFormDfn [friend]

Definition at line 50 of file form_elm.h.

friend class CType [friend]

Reimplemented in NLGEORGES::CFormElmAtom.

Definition at line 49 of file form_elm.h.


Member Data Documentation

Definition at line 241 of file form_elm.h.

Referenced by CFormElm().


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

Generated on Thu Jan 7 08:30:16 2010 for NeL by  doxygen 1.6.1