|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLGEORGES::CFormElm Class ReferenceBase class of form elments.
More...
#include <form_elm.h>
Inheritance diagram for NLGEORGES::CFormElm:
List of all members.
Public Methods |
| CFormElm (CForm *form, CFormElm *parentNode, const CFormDfn *parentDfn, uint parentIndex) |
virtual | ~CFormElm () |
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=true) const |
| Return a node pointer with its name. More...
|
virtual bool | getNodeByName (UFormElm **result, const char *name, TWhereIsNode *where, bool verbose=true) |
virtual bool | getValueByName (std::string &result, const char *name, bool evaluate, TWhereIsValue *where) const |
| Get a form value with its name. More...
|
virtual bool | getValueByName (sint8 &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (uint8 &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (sint16 &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (uint16 &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (sint32 &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (uint32 &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (float &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (double &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (bool &result, const char *name, bool evaluate, TWhereIsValue *where) const |
virtual bool | getValueByName (NLMISC::CRGBA &result, const char *name, bool evaluate, TWhereIsValue *where) const |
| Warning, only R, G and B members are filled, not A. More...
|
virtual bool | setValueByName (const char *value, const char *name, bool *created) |
| Set a form value with its name. More...
|
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. More...
|
virtual bool | getArraySize (uint &size) const |
| Return true if the element is an array and fill size with the array size. More...
|
virtual bool | getArrayNode (const UFormElm **result, uint arrayIndex) const |
| Get a array sub element const pointer. More...
|
virtual bool | getArrayNode (UFormElm **result, uint arrayIndex) |
| Get a array sub element mutable pointer. More...
|
virtual bool | getArrayNodeName (std::string &result, uint arrayIndex) const |
| Return the name of a table element. More...
|
virtual bool | getArrayValue (std::string &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
| Get an array value. More...
|
virtual bool | getArrayValue (sint8 &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (uint8 &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (sint16 &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (uint16 &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (sint32 &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (uint32 &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (float &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (double &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (bool &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
virtual bool | getArrayValue (NLMISC::CRGBA &result, uint arrayIndex, bool evaluate, TWhereIsValue *where) const |
| Warning, only R, G and B members are filled, not A. More...
|
virtual bool | isStruct () const |
| Return true if the element is a struct or a virtual struct. More...
|
virtual bool | isVirtualStruct () const |
| Return true if the element is a virtual struct. More...
|
virtual bool | getDfnName (std::string &dfnName) const |
| Get the dfn filename for this virtual struct. Must be a virtual struct node. More...
|
virtual bool | getStructSize (uint &size) const |
| Return the struct size. More...
|
virtual bool | getStructNodeName (uint element, std::string &result) const |
| Return the element name. More...
|
virtual bool | getStructNode (uint element, const UFormElm **result) const |
| Return a const element pointer. Can be NULL if the node doesn't exist. More...
|
virtual bool | getStructNode (uint element, UFormElm **result) |
| Return a mutable element pointer. Can be NULL if the node doesn't exist. More...
|
virtual bool | isAtom () const |
| Return true if the element is an atom. More...
|
virtual bool | getValue (std::string &result, bool evaluate) const |
| Return the atom value. More...
|
virtual bool | getValue (sint8 &result, bool evaluate) const |
virtual bool | getValue (uint8 &result, bool evaluate) const |
virtual bool | getValue (sint16 &result, bool evaluate) const |
virtual bool | getValue (uint16 &result, bool evaluate) const |
virtual bool | getValue (sint32 &result, bool evaluate) const |
virtual bool | getValue (uint32 &result, bool evaluate) const |
virtual bool | getValue (float &result, bool evaluate) const |
virtual bool | getValue (double &result, bool evaluate) const |
virtual bool | getValue (bool &result, bool evaluate) const |
virtual bool | getValue (NLMISC::CRGBA &result, bool evaluate) const |
| Warning, only R, G and B members are filled, not A. More...
|
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. More...
|
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) 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. More...
|
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. More...
|
virtual xmlNodePtr | write (xmlNodePtr node, const CForm *form, const char *structName=NULL, bool forceWrite=false) const=0 |
Static Public Methods |
bool | convertValue (sint8 &result, const char *value) |
bool | convertValue (uint8 &result, const char *value) |
bool | convertValue (sint16 &result, const char *value) |
bool | convertValue (uint16 &result, const char *value) |
bool | convertValue (sint32 &result, const char *value) |
bool | convertValue (uint32 &result, const char *value) |
bool | convertValue (float &result, const char *value) |
bool | convertValue (double &result, const char *value) |
bool | convertValue (bool &result, const char *value) |
bool | convertValue (NLMISC::CRGBA &result, const char *value) |
const char * | tokenize (const char *name, std::string &str, uint &errorIndex, uint &code) |
Protected Types |
enum | TNodeAction { Return,
Create,
Delete
} |
Protected Methods |
virtual void | unlink (CFormElm *child) |
| Unlink a child. More...
|
Static Protected Methods |
bool | getIternalNodeByName (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) |
| Is createNode == Create, (*node)->Form must be == to the form argument. More...
|
Protected Attributes |
CForm * | Form |
CFormElm * | ParentNode |
const CFormDfn * | ParentDfn |
uint | ParentIndex |
Private Types |
enum | TToken { TokenString = 0,
TokenPoint,
TokenArrayBegin,
TokenArrayEnd
} |
Friends |
class | CForm |
class | CType |
class | CFormDfn |
Detailed Description
Base class of form elments.
Definition at line 45 of file form_elm.h.
Member Enumeration Documentation
enum NLGEORGES::CFormElm::TNodeAction [protected]
|
|
enum NLGEORGES::CFormElm::TToken [private]
|
|
|
-
Enumeration values:
-
TokenString |
|
TokenPoint |
|
TokenArrayBegin |
|
TokenArrayEnd |
|
Definition at line 234 of file form_elm.h. |
Constructor & Destructor Documentation
NLGEORGES::CFormElm::CFormElm |
( |
CForm * |
form, |
|
|
CFormElm * |
parentNode, |
|
|
const CFormDfn * |
parentDfn, |
|
|
uint |
parentIndex |
|
) |
|
|
NLGEORGES::CFormElm::~CFormElm |
( |
|
) |
[virtual] |
|
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 |
|
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 |
|
bool NLGEORGES::CFormElm::convertValue |
( |
NLMISC::CRGBA & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
bool & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
double & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
float & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
uint32 & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
sint32 & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
uint16 & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
sint16 & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
uint8 & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
bool NLGEORGES::CFormElm::convertValue |
( |
sint8 & |
result, |
|
|
const char * |
value |
|
) |
[inline, static] |
|
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 |
|
) |
|
|
bool NLGEORGES::CFormElm::getArrayNode |
( |
UFormElm ** |
result, |
|
|
uint |
arrayIndex |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::getArrayNode |
( |
const UFormElm ** |
result, |
|
|
uint |
arrayIndex |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayNodeName |
( |
std::string & |
result, |
|
|
uint |
arrayIndex |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArraySize |
( |
uint & |
size |
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
bool & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
double & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
float & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
uint32 & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
sint32 & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
uint16 & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
sint16 & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
uint8 & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
sint8 & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getArrayValue |
( |
std::string & |
result, |
|
|
uint |
arrayIndex, |
|
|
bool |
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 87 of file form_elm.cpp.
References nlwarning, and uint. |
bool NLGEORGES::CFormElm::getDfnName |
( |
std::string & |
dfnName |
) |
const [virtual] |
|
CForm * NLGEORGES::CFormElm::getForm |
( |
|
) |
const |
|
virtual void NLGEORGES::CFormElm::getFormName |
( |
std::string & |
result, |
|
|
const CFormElm * |
child = NULL |
|
) |
const [pure virtual] |
|
bool NLGEORGES::CFormElm::getIternalNodeByName |
( |
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 |
|
) |
[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. Others value are for result only.
Definition at line 757 of file form_elm.cpp.
References CForm, CFormDfn, CFormElm, Create, CType, Delete, nlassert, nlstop, nlverify, nlwarning, Return, NLMISC::smprintf, TokenArrayBegin, TokenArrayEnd, tokenize, TokenPoint, TokenString, type, and uint.
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 |
|
) |
const |
|
bool NLGEORGES::CFormElm::getNodeByName |
( |
UFormElm ** |
result, |
|
|
const char * |
name, |
|
|
TWhereIsNode * |
where, |
|
|
bool |
verbose = true |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::getNodeByName |
( |
const UFormElm ** |
result, |
|
|
const char * |
name, |
|
|
TWhereIsNode * |
where, |
|
|
bool |
verbose = true |
|
) |
const [virtual] |
|
|
Return a node pointer with its name.
-
Parameters:
-
result |
will be filled with the node pointer. Can be NULL if the node doesn't exist. |
name |
is the form node name |
where |
is a pointer on the information flag of the value. If Where is not NULL, it is filled with the position where the node has been found. If result is NULL, where is undefined. |
-
Returns:
-
true if the result has been filled, false if the node is not referenced.
About the node existance
An atom node exist if its value are defined. A struct node exist if one of its children exist. An array node exist if one of its children exist. If the node doesn't exist, you can't have a pointer on it with getNodeByName(). It returns NULL. But, you can evaluate the value of non-existant atom nodes with getValueByName().
About the form name:
Struct elements name must be separeted by '.' Struct indexes must be between '[' and ']'
Exemple: "position.x" : get the element named x in the struct named position "entities[2].color" : get the node named color in the second element of the entities array
Implements NLGEORGES::UFormElm.
Definition at line 366 of file form_elm.cpp.
References CFormDfn, CFormElm, CType, Form, NLGEORGES::UFormElm::NodeForm, NLGEORGES::UFormElm::NodeParentForm, type, and uint.
Referenced by getValueByName. |
UFormElm * NLGEORGES::CFormElm::getParent |
( |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getStructNode |
( |
uint |
element, |
|
|
UFormElm ** |
result |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::getStructNode |
( |
uint |
element, |
|
|
const UFormElm ** |
result |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getStructNodeName |
( |
uint |
element, |
|
|
std::string & |
result |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getStructSize |
( |
uint & |
size |
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
NLMISC::CRGBA & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
bool & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
double & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
float & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
uint32 & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
sint32 & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
uint16 & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
sint16 & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
uint8 & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
sint8 & |
result, |
|
|
bool |
evaluate |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValue |
( |
std::string & |
result, |
|
|
bool |
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 235 of file form_elm.cpp.
References nlwarning. |
bool NLGEORGES::CFormElm::getValueByName |
( |
NLMISC::CRGBA & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
bool & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
double & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
float & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
uint32 & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
sint32 & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
uint16 & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
sint16 & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
uint8 & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
sint8 & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::getValueByName |
( |
std::string & |
result, |
|
|
const char * |
name, |
|
|
bool |
evaluate, |
|
|
TWhereIsValue * |
where |
|
) |
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 399 of file form_elm.cpp.
References CFormDfn, CFormElm, CType, Form, getNodeByName, nlassert, nlwarning, type, uint, and uint32.
Referenced by getValueByName. |
bool NLGEORGES::CFormElm::isArray |
( |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::isAtom |
( |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::isStruct |
( |
|
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::isUsed |
( |
const CForm * |
form |
) |
const [virtual] |
|
bool NLGEORGES::CFormElm::isVirtualStruct |
( |
|
) |
const [virtual] |
|
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] |
|
bool NLGEORGES::CFormElm::setValueByName |
( |
double |
value, |
|
|
const char * |
name, |
|
|
bool * |
created |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::setValueByName |
( |
float |
value, |
|
|
const char * |
name, |
|
|
bool * |
created |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::setValueByName |
( |
uint32 |
value, |
|
|
const char * |
name, |
|
|
bool * |
created |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::setValueByName |
( |
sint32 |
value, |
|
|
const char * |
name, |
|
|
bool * |
created |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::setValueByName |
( |
uint16 |
value, |
|
|
const char * |
name, |
|
|
bool * |
created |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::setValueByName |
( |
sint16 |
value, |
|
|
const char * |
name, |
|
|
bool * |
created |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::setValueByName |
( |
uint8 |
value, |
|
|
const char * |
name, |
|
|
bool * |
created |
|
) |
[virtual] |
|
bool NLGEORGES::CFormElm::setValueByName |
( |
sint8 |
value, |
|
|
const char * |
name, |
|
|
bool * |
created |
|
) |
[virtual] |
|
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 1485 of file form_elm.cpp.
References CFormDfn, CFormElm, createNodeByName, CType, nlassert, nlwarning, type, and uint.
Referenced by setValueByName. |
const char * NLGEORGES::CFormElm::tokenize |
( |
const char * |
name, |
|
|
std::string & |
str, |
|
|
uint & |
errorIndex, |
|
|
uint & |
code |
|
) |
[static] |
|
void NLGEORGES::CFormElm::unlink |
( |
CFormElm * |
child |
) |
[protected, virtual] |
|
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]
|
|
friend class CFormDfn [friend]
|
|
friend class CType [friend]
|
|
Member Data Documentation
CForm* NLGEORGES::CFormElm::Form [protected]
|
|
|
Definition at line 221 of file form_elm.h.
Referenced by arrayDeleteNodeByName, arrayInsertNodeByName, CFormElm, createNodeByName, deleteNodeByName, NLGEORGES::CFormElmArray::getArrayValue, getForm, getNodeByName, getValueByName, NLGEORGES::CFormElmArray::isUsed, and isUsed. |
const CFormDfn* NLGEORGES::CFormElm::ParentDfn [protected]
|
|
uint NLGEORGES::CFormElm::ParentIndex [protected]
|
|
CFormElm* NLGEORGES::CFormElm::ParentNode [protected]
|
|
The documentation for this class was generated from the following files:
|
|