Define an array of elements. More...
#include <form_elm.h>
Inherits NLGEORGES::CFormElm.
Classes | |
| class | CElement |
Public Member Functions | |
| CFormElmArray (CForm *form, const CFormDfn *formDfn, const CType *type, CFormElm *parentNode, const CFormDfn *parentDfn, uint parentIndex) | |
| virtual | ~CFormElmArray () |
| void | clean () |
| Reset contents. | |
| bool | isArray () const |
| Return true if the element is an array. | |
| bool | getArraySize (uint &size) const |
| Return true if the element is an array and fill size with the array size. | |
| bool | getArrayNode (const UFormElm **result, uint arrayIndex) const |
| bool | getArrayNode (UFormElm **result, uint arrayIndex) |
| bool | getArrayNodeName (std::string &result, uint arrayIndex) const |
| Return the name of a table element. | |
| bool | getArrayValue (std::string &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| Get an array value. | |
| bool | getArrayValue (sint8 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (uint8 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (sint16 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (uint16 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (sint32 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (uint32 &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (float &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (double &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (bool &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| bool | getArrayValue (NLMISC::CRGBA &result, uint arrayIndex, TEval evaluate, TWhereIsValue *where) const |
| Warning, only R, G and B members are filled, not A. | |
| xmlNodePtr | write (xmlNodePtr node, const CForm *form, const char *structName, bool forceWrite=false) const |
| bool | setParent (CFormElm *parent) |
| void | unlink (CFormElm *child) |
| bool | isUsed (const CForm *form) const |
| void | getFormName (std::string &result, const CFormElm *child) const |
| void | getDependencies (std::set< std::string > &dependencies) const |
| void | read (xmlNodePtr node, CFormLoader &loader, CForm *form) |
| virtual void | warning (bool exception, const char *function, const char *format,...) const |
Public Attributes | |
| NLMISC::CSmartPtr< CFormDfn > | FormDfn |
| const CType * | Type |
| std::vector< CElement > | Elements |
Define an array of elements.
Definition at line 353 of file form_elm.h.
| NLGEORGES::CFormElmArray::CFormElmArray | ( | CForm * | form, | |
| const CFormDfn * | formDfn, | |||
| const CType * | type, | |||
| CFormElm * | parentNode, | |||
| const CFormDfn * | parentDfn, | |||
| uint | parentIndex | |||
| ) |
Definition at line 2247 of file form_elm.cpp.
| NLGEORGES::CFormElmArray::~CFormElmArray | ( | ) | [virtual] |
Definition at line 2255 of file form_elm.cpp.
| void NLGEORGES::CFormElmArray::clean | ( | void | ) | [virtual] |
Reset contents.
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2262 of file form_elm.cpp.
References Elements.
Referenced by read().
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2326 of file form_elm.cpp.
| bool NLGEORGES::CFormElmArray::getArrayNode | ( | const UFormElm ** | result, | |
| uint | arrayIndex | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2291 of file form_elm.cpp.
| bool NLGEORGES::CFormElmArray::getArrayNodeName | ( | std::string & | result, | |
| uint | arrayIndex | |||
| ) | const [virtual] |
Return the name of a table element.
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2307 of file form_elm.cpp.
References Elements, NLMISC::toString(), and warning().
Return true if the element is an array and fill size with the array size.
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2283 of file form_elm.cpp.
References Elements.
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | NLMISC::CRGBA & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Warning, only R, G and B members are filled, not A.
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2543 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | bool & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2523 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | double & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2503 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | float & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2483 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | uint32 & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2463 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | sint32 & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2443 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | uint16 & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2423 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | sint16 & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2403 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | uint8 & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2383 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::getArrayValue | ( | sint8 & | result, | |
| uint | arrayIndex, | |||
| TEval | evaluate, | |||
| TWhereIsValue * | where | |||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2363 of file form_elm.cpp.
References NLGEORGES::CFormElm::convertValue(), Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| bool NLGEORGES::CFormElmArray::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. |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2343 of file form_elm.cpp.
References Elements, NLGEORGES::CFormElm::Form, NLGEORGES::CType::getValue(), NLGEORGES_FIRST_ROUND, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, Type, and warning().
| void NLGEORGES::CFormElmArray::getDependencies | ( | std::set< std::string > & | dependencies | ) | const [virtual] |
Implements NLGEORGES::CFormElm.
Definition at line 2773 of file form_elm.cpp.
References Elements, FormDfn, NLGEORGES::CType::getDependencies(), and Type.
| void NLGEORGES::CFormElmArray::getFormName | ( | std::string & | result, | |
| const CFormElm * | child | |||
| ) | const |
Definition at line 2714 of file form_elm.cpp.
References Elements, NLGEORGES::CFormElm::getFormName(), NLGEORGES::CFormElm::ParentNode, NLMISC::smprintf(), and warning().
Referenced by warning().
| bool NLGEORGES::CFormElmArray::isArray | ( | ) | const [virtual] |
Return true if the element is an array.
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2276 of file form_elm.cpp.
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2702 of file form_elm.cpp.
References NLGEORGES::CFormElm::Form.
Referenced by write().
| void NLGEORGES::CFormElmArray::read | ( | xmlNodePtr | node, | |
| CFormLoader & | loader, | |||
| CForm * | form | |||
| ) |
Definition at line 2596 of file form_elm.cpp.
References clean(), Elements, FormDfn, nlassert, NLGEORGES::CFormElm::ParentDfn, NLGEORGES::CFormElm::ParentIndex, NLGEORGES::CFormElmStruct::read(), NLGEORGES::CFormElmAtom::read(), and Type.
Referenced by NLGEORGES::CFormElmStruct::read().
Definition at line 2677 of file form_elm.cpp.
| void NLGEORGES::CFormElmArray::unlink | ( | CFormElm * | child | ) |
Definition at line 2684 of file form_elm.cpp.
| void NLGEORGES::CFormElmArray::warning | ( | bool | exception, | |
| const char * | function, | |||
| const char * | format, | |||
| ... | ||||
| ) | const [virtual] |
Reimplemented from NLGEORGES::CFormElm.
Definition at line 2756 of file form_elm.cpp.
References NLGEORGES::CFormElm::Form, NLGEORGES::CForm::getFilename(), and getFormName().
Referenced by getArrayNode(), getArrayNodeName(), getArrayValue(), and getFormName().
| xmlNodePtr NLGEORGES::CFormElmArray::write | ( | xmlNodePtr | node, | |
| const CForm * | form, | |||
| const char * | structName, | |||
| bool | forceWrite = false | |||
| ) | const [virtual] |
Implements NLGEORGES::CFormElm.
Definition at line 2563 of file form_elm.cpp.
| std::vector<CElement> NLGEORGES::CFormElmArray::Elements |
Definition at line 412 of file form_elm.h.
Referenced by NLGEORGES::CFormElm::arrayDeleteNodeByName(), NLGEORGES::CFormElm::arrayInsertNodeByName(), clean(), getArrayNode(), getArrayNodeName(), getArraySize(), getArrayValue(), getDependencies(), getFormName(), NLGEORGES::CFormElm::getInternalNodeByName(), read(), unlink(), and write().
Definition at line 362 of file form_elm.h.
Referenced by CFormElmArray(), getDependencies(), and read().
Definition at line 365 of file form_elm.h.
Referenced by CFormElmArray(), getArrayValue(), getDependencies(), and read().
1.6.1