Base class of form elements. More...
#include <form_elm.h>
Inherits NLGEORGES::UFormElm.
Inherited by NLGEORGES::CFormElmArray, NLGEORGES::CFormElmAtom, and NLGEORGES::CFormElmStruct.
Public Member Functions | |
| CFormElm (CForm *form, CFormElm *parentNode, const CFormDfn *parentDfn, uint parentIndex) | |
| virtual | ~CFormElm () |
| virtual void | clean () |
| Reset contents. | |
| CForm * | getForm () 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 UFormElm * | getParent () 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 UFormDfn * | getStructDfn () |
| 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 | |
| CForm * | Form |
| CFormElm * | ParentNode |
| const CFormDfn * | ParentDfn |
| uint | ParentIndex |
| uint32 | Round |
Private Types | |
| enum | TToken { TokenString = 0, TokenPoint, TokenArrayBegin, TokenArrayEnd } |
Friends | |
| class | CForm |
| class | CType |
| class | CFormDfn |
Base class of form elements.
Definition at line 46 of file form_elm.h.
enum NLGEORGES::CFormElm::TNodeAction [protected] |
Definition at line 193 of file form_elm.h.
enum NLGEORGES::CFormElm::TToken [private] |
Definition at line 249 of file form_elm.h.
| 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().
| 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 |
Insert an array node by name The index asked must be < the size of the array.
Definition at line 643 of file form_elm.cpp.
References NLGEORGES::CFormElmStruct::build(), Create, NLGEORGES::CFormElmArray::Elements, NLGEORGES::UFormDfn::EntryDfn, NLGEORGES::UFormDfn::EntryType, NLGEORGES::UFormDfn::EntryVirtualDfn, Form, getInternalNodeByName(), isArray(), nlassert, NLGEORGES_FIRST_ROUND, nlstop, ParentDfn, ParentIndex, and NLMISC::safe_cast().
| 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] |
Definition at line 654 of file form_elm.h.
References NLMISC::CRGBA::B, NLMISC::clamp(), NLMISC::CRGBA::G, NLMISC::CRGBA::R, and warning().
Definition at line 623 of file form_elm.h.
References NLMISC::fromString(), NLMISC::toLower(), and warning().
Definition at line 605 of file form_elm.h.
References NLMISC::fromString(), and warning().
Definition at line 589 of file form_elm.h.
References NLMISC::fromString(), and warning().
Definition at line 570 of file form_elm.h.
References NLMISC::clamp(), NLMISC::fromString(), and warning().
Definition at line 551 of file form_elm.h.
References NLMISC::clamp(), NLMISC::fromString(), and warning().
Definition at line 532 of file form_elm.h.
References NLMISC::clamp(), NLMISC::fromString(), and warning().
Definition at line 513 of file form_elm.h.
References NLMISC::clamp(), NLMISC::fromString(), and warning().
Definition at line 494 of file form_elm.h.
References NLMISC::clamp(), NLMISC::fromString(), and warning().
Definition at line 475 of file form_elm.h.
References NLMISC::clamp(), NLMISC::fromString(), and warning().
Referenced by NLGEORGES::CFormElmArray::getArrayValue(), NLGEORGES::CFormElmAtom::getValue(), and getValueByName().
| 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.
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().
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.
| 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. |
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] |
Implemented in NLGEORGES::CFormElmStruct, NLGEORGES::CFormElmArray, and NLGEORGES::CFormElmAtom.
| 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] |
Definition at line 371 of file form_elm.cpp.
References Form, getForm(), NLGEORGES::UFormElm::NodeForm, and NLGEORGES::UFormElm::NodeParentForm.
Referenced by getNodeByName(), and getValueByName().
| 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.
Reimplemented in NLGEORGES::CFormElmStruct.
Definition at line 223 of file form_elm.cpp.
References warning().
Reimplemented in NLGEORGES::CFormElmStruct.
Definition at line 215 of file form_elm.cpp.
References warning().
Return the element name.
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmStruct.
Definition at line 207 of file form_elm.cpp.
References warning().
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().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 310 of file form_elm.cpp.
References warning().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 302 of file form_elm.cpp.
References warning().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 294 of file form_elm.cpp.
References warning().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 286 of file form_elm.cpp.
References warning().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 278 of file form_elm.cpp.
References warning().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 270 of file form_elm.cpp.
References warning().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 262 of file form_elm.cpp.
References warning().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 254 of file form_elm.cpp.
References warning().
Implements NLGEORGES::UFormElm.
Reimplemented in NLGEORGES::CFormElmAtom.
Definition at line 246 of file form_elm.cpp.
References warning().
Return the atom value.
The numbers are clamped to the type limit values.
| 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.
| 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. |
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.
Reimplemented in NLGEORGES::CFormElmStruct, NLGEORGES::CFormElmVirtualStruct, and NLGEORGES::CFormElmArray.
Definition at line 344 of file form_elm.cpp.
References Form.
Referenced by getInternalNodeByName(), and NLGEORGES::CFormElmAtom::write().
| 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] |
Implements NLGEORGES::UFormElm.
Definition at line 1645 of file form_elm.cpp.
References NLMISC::CRGBA::B, NLMISC::CRGBA::G, NLMISC::CRGBA::R, setValueByName(), and NLMISC::smprintf().
| 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.
| 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. |
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] |
Reimplemented in NLGEORGES::CFormElmStruct, NLGEORGES::CFormElmVirtualStruct, NLGEORGES::CFormElmArray, and NLGEORGES::CFormElmAtom.
Definition at line 1669 of file form_elm.cpp.
References NLGEORGES::CForm::getFilename(), getForm(), getFormName(), and warning().
| void NLGEORGES::CFormElm::warning | ( | bool | exception, | |
| const char * | formName, | |||
| const char * | formFileName, | |||
| const char * | function, | |||
| const char * | format, | |||
| ... | ||||
| ) | [static, protected] |
Definition at line 1654 of file form_elm.cpp.
Referenced by convertValue(), getArrayNode(), getArrayNodeName(), getArraySize(), getArrayValue(), getInternalNodeByName(), getStructNode(), getStructNodeName(), getStructSize(), getValue(), getValueByName(), setValueByName(), and warning().
| virtual xmlNodePtr NLGEORGES::CFormElm::write | ( | xmlNodePtr | node, | |
| const CForm * | form, | |||
| const char * | structName = NULL, |
|||
| bool | forceWrite = false | |||
| ) | const [pure virtual] |
Implemented in NLGEORGES::CFormElmStruct, NLGEORGES::CFormElmVirtualStruct, NLGEORGES::CFormElmArray, and NLGEORGES::CFormElmAtom.
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.
CForm* NLGEORGES::CFormElm::Form [protected] |
Definition at line 229 of file form_elm.h.
Referenced by arrayDeleteNodeByName(), arrayInsertNodeByName(), CFormElm(), createNodeByName(), deleteNodeByName(), NLGEORGES::CFormElmArray::getArrayValue(), getForm(), getNodeByName(), NLGEORGES::CFormElmAtom::getValue(), getValueByName(), NLGEORGES::CFormElmArray::isUsed(), isUsed(), NLGEORGES::CFormElmAtom::warning(), NLGEORGES::CFormElmArray::warning(), NLGEORGES::CFormElmVirtualStruct::warning(), and NLGEORGES::CFormElmStruct::warning().
const CFormDfn* NLGEORGES::CFormElm::ParentDfn [protected] |
Definition at line 235 of file form_elm.h.
Referenced by arrayDeleteNodeByName(), arrayInsertNodeByName(), CFormElm(), createNodeByName(), deleteNodeByName(), NLGEORGES::CFormElmArray::getArrayValue(), getNodeByName(), NLGEORGES::CFormElmAtom::getValue(), and NLGEORGES::CFormElmArray::read().
uint NLGEORGES::CFormElm::ParentIndex [protected] |
Definition at line 238 of file form_elm.h.
Referenced by arrayDeleteNodeByName(), arrayInsertNodeByName(), CFormElm(), createNodeByName(), deleteNodeByName(), NLGEORGES::CFormElmArray::getArrayValue(), getNodeByName(), NLGEORGES::CFormElmAtom::getValue(), and NLGEORGES::CFormElmArray::read().
CFormElm* NLGEORGES::CFormElm::ParentNode [protected] |
Definition at line 232 of file form_elm.h.
Referenced by CFormElm(), NLGEORGES::CFormElmAtom::getFormName(), NLGEORGES::CFormElmArray::getFormName(), NLGEORGES::CFormElmStruct::getFormName(), and getParent().
uint32 NLGEORGES::CFormElm::Round [protected] |
Definition at line 241 of file form_elm.h.
Referenced by CFormElm().
1.6.1