# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLGEORGES::UFormElm Class Reference

#include <u_form_elm.h>

Inheritance diagram for NLGEORGES::UFormElm:

NLGEORGES::CFormElm NLGEORGES::CFormElmArray NLGEORGES::CFormElmAtom NLGEORGES::CFormElmStruct NLGEORGES::CFormElmVirtualStruct List of all members.

Public Types

enum  TWhereIsNode { NodeForm, NodeParentForm, NodeDfn, NodeType }
 Where a node has been found. More...

enum  TWhereIsValue {
  ValueForm, ValueParentForm, ValueDefaultDfn, ValueDefaultType,
  Dummy = 0xffffffff
}
 Where a value has been found. More...


Public Methods

virtual bool getNodeByName (const UFormElm **result, const char *name, TWhereIsNode *where=NULL, bool reserved=true) const=0
 Return a node pointer with its name. More...

virtual bool getNodeByName (UFormElm **result, const char *name, TWhereIsNode *where=NULL, bool reserved=true)=0
virtual bool getValueByName (std::string &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
 Get a form value with its name. More...

virtual bool getValueByName (sint8 &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (uint8 &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (sint16 &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (uint16 &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (sint32 &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (uint32 &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (float &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (double &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (bool &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getValueByName (NLMISC::CRGBA &result, const char *name, bool evaluate=true, TWhereIsValue *where=NULL) const=0
 Warning, only R, G and B members are filled, not A. More...

virtual bool setValueByName (const char *value, const char *name, bool *created=NULL)=0
 Set a form value with its name. More...

virtual bool setValueByName (sint8 value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (uint8 value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (sint16 value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (uint16 value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (sint32 value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (uint32 value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (float value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (double value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (bool value, const char *name, bool *created=NULL)=0
virtual bool setValueByName (NLMISC::CRGBA value, const char *name, bool *created=NULL)=0
virtual bool isArray () const=0
 Return true if the element is an array. More...

virtual bool getArraySize (uint &size) const=0
 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=0
 Get a array sub element const pointer. More...

virtual bool getArrayNode (UFormElm **result, uint arrayIndex)=0
 Get a array sub element mutable pointer. More...

virtual bool getArrayValue (std::string &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
 Get an array value. More...

virtual bool getArrayValue (sint8 &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (uint8 &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (sint16 &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (uint16 &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (sint32 &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (uint32 &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (float &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (double &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (bool &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
virtual bool getArrayValue (NLMISC::CRGBA &result, uint arrayIndex, bool evaluate=true, TWhereIsValue *where=NULL) const=0
 Warning, only R, G and B members are filled, not A. More...

virtual bool getArrayNodeName (std::string &result, uint arrayIndex) const=0
 Return the name of a table element. More...

virtual bool isStruct () const=0
 Return true if the element is a struct or a virtual struct. More...

virtual bool isVirtualStruct () const=0
 Return true if the element is a virtual struct. More...

virtual bool getDfnName (std::string &dfnName) const=0
 Get the dfn filename for this virtual struct. Must be a virtual struct node. More...

virtual bool getStructSize (uint &size) const=0
 Return the struct size. More...

virtual bool getStructNodeName (uint element, std::string &result) const=0
 Return the element name. More...

virtual bool getStructNode (uint element, const UFormElm **result) const=0
 Return a const element pointer. Can be NULL if the node doesn't exist. More...

virtual bool getStructNode (uint element, UFormElm **result)=0
 Return a mutable element pointer. Can be NULL if the node doesn't exist. More...

virtual bool isAtom () const=0
 Return true if the element is an atom. More...

virtual bool getValue (std::string &result, bool evaluate=true) const=0
 Return the atom value. More...

virtual bool getValue (sint8 &result, bool evaluate=true) const=0
virtual bool getValue (uint8 &result, bool evaluate=true) const=0
virtual bool getValue (sint16 &result, bool evaluate=true) const=0
virtual bool getValue (uint16 &result, bool evaluate=true) const=0
virtual bool getValue (sint32 &result, bool evaluate=true) const=0
virtual bool getValue (uint32 &result, bool evaluate=true) const=0
virtual bool getValue (float &result, bool evaluate=true) const=0
virtual bool getValue (double &result, bool evaluate=true) const=0
virtual bool getValue (bool &result, bool evaluate=true) const=0
virtual bool getValue (NLMISC::CRGBA &result, bool evaluate=true) const=0
 Warning, only R, G and B members are filled, not A. More...


Member Enumeration Documentation

enum NLGEORGES::UFormElm::TWhereIsNode
 

Where a node has been found.

Enumeration values:
NodeForm 
NodeParentForm  The node has been found in the form.
NodeDfn  The node has been found in the parent form.
NodeType  The node is a DFN.

Definition at line 48 of file u_form_elm.h.

enum NLGEORGES::UFormElm::TWhereIsValue
 

Where a value has been found.

Enumeration values:
ValueForm 
ValueParentForm  The value has been found in the form.
ValueDefaultDfn  The value has been found in the parent form.
ValueDefaultType  The value has been found in the DFN default value.
Dummy  The value has been found in the TYPE default value.

Definition at line 87 of file u_form_elm.h.


Member Function Documentation

virtual bool NLGEORGES::UFormElm::getArrayNode UFormElm **    result,
uint    arrayIndex
[pure virtual]
 

Get a array sub element mutable pointer.

If return true, fill result with the arrayIndex cell's element pointer. Can be NULL if the node doesn't exist.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayNode const UFormElm **    result,
uint    arrayIndex
const [pure virtual]
 

Get a array sub element const pointer.

If return true, fill result with the arrayIndex cell's element Can be NULL if the node doesn't exist.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayNodeName std::string &    result,
uint    arrayIndex
const [pure virtual]
 

Return the name of a table element.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArraySize uint   size const [pure virtual]
 

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

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue NLMISC::CRGBA   result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

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

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue bool &    result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue double &    result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue float &    result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue uint32   result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue sint32   result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue uint16   result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue sint16   result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue uint8   result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue sint8   result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getArrayValue std::string &    result,
uint    arrayIndex,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure 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.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getDfnName std::string &    dfnName const [pure virtual]
 

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

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getNodeByName UFormElm **    result,
const char *    name,
TWhereIsNode   where = NULL,
bool    reserved = true
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getNodeByName const UFormElm **    result,
const char *    name,
TWhereIsNode   where = NULL,
bool    reserved = true
const [pure 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

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getStructNode uint    element,
UFormElm **    result
[pure virtual]
 

Return a mutable element pointer. Can be NULL if the node doesn't exist.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getStructNode uint    element,
const UFormElm **    result
const [pure virtual]
 

Return a const element pointer. Can be NULL if the node doesn't exist.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getStructNodeName uint    element,
std::string &    result
const [pure virtual]
 

Return the element name.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getStructSize uint   size const [pure virtual]
 

Return the struct size.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue NLMISC::CRGBA   result,
bool    evaluate = true
const [pure virtual]
 

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

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue bool &    result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue double &    result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue float &    result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue uint32   result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue sint32   result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue uint16   result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue sint16   result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue uint8   result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue sint8   result,
bool    evaluate = true
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValue std::string &    result,
bool    evaluate = true
const [pure 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.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName NLMISC::CRGBA   result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

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

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName bool &    result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName double &    result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName float &    result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName uint32   result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName sint32   result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName uint16   result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName sint16   result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName uint8   result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName sint8   result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::getValueByName std::string &    result,
const char *    name,
bool    evaluate = true,
TWhereIsValue   where = NULL
const [pure 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 ()

Implemented in NLGEORGES::CFormElm.

Referenced by NLSOUND::CSound::importForm.

virtual bool NLGEORGES::UFormElm::isArray   const [pure virtual]
 

Return true if the element is an array.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::isAtom   const [pure virtual]
 

Return true if the element is an atom.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::isStruct   const [pure virtual]
 

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

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::isVirtualStruct   const [pure virtual]
 

Return true if the element is a virtual struct.

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName NLMISC::CRGBA    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName bool    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName double    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName float    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName uint32    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName sint32    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName uint16    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName sint16    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName uint8    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName sint8    value,
const char *    name,
bool *    created = NULL
[pure virtual]
 

Implemented in NLGEORGES::CFormElm.

virtual bool NLGEORGES::UFormElm::setValueByName const char *    value,
const char *    name,
bool *    created = NULL
[pure 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.

Implemented in NLGEORGES::CFormElm.


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