NLGEORGES::CFormElmArray Class Reference

Define an array of elements. More...

#include <form_elm.h>

Inherits NLGEORGES::CFormElm.

List of all members.

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< CFormDfnFormDfn
const CTypeType
std::vector< CElementElements

Detailed Description

Define an array of elements.

Definition at line 353 of file form_elm.h.


Constructor & Destructor Documentation

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.

References FormDfn, and Type.

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

Definition at line 2255 of file form_elm.cpp.


Member Function Documentation

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().

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

Reimplemented from NLGEORGES::CFormElm.

Definition at line 2326 of file form_elm.cpp.

References Elements, and warning().

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

Reimplemented from NLGEORGES::CFormElm.

Definition at line 2291 of file form_elm.cpp.

References Elements, and warning().

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().

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

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]
bool NLGEORGES::CFormElmArray::getArrayValue ( bool result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
bool NLGEORGES::CFormElmArray::getArrayValue ( double result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
bool NLGEORGES::CFormElmArray::getArrayValue ( float result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
bool NLGEORGES::CFormElmArray::getArrayValue ( uint32 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
bool NLGEORGES::CFormElmArray::getArrayValue ( sint32 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
bool NLGEORGES::CFormElmArray::getArrayValue ( uint16 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
bool NLGEORGES::CFormElmArray::getArrayValue ( sint16 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
bool NLGEORGES::CFormElmArray::getArrayValue ( uint8 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
bool NLGEORGES::CFormElmArray::getArrayValue ( sint8 result,
uint  arrayIndex,
TEval  evaluate,
TWhereIsValue where 
) const [virtual]
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.

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.

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
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.

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

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 
)
bool NLGEORGES::CFormElmArray::setParent ( CFormElm parent  ) 

Definition at line 2677 of file form_elm.cpp.

void NLGEORGES::CFormElmArray::unlink ( CFormElm child  ) 

Definition at line 2684 of file form_elm.cpp.

References Elements, and nlassert.

void NLGEORGES::CFormElmArray::warning ( bool  exception,
const char *  function,
const char *  format,
  ... 
) const [virtual]
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.

References Elements, and isUsed().


Member Data Documentation

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().


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

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