# 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::CFormElmStruct Class Reference

Define a structure of elements. More...

#include <form_elm.h>

Inheritance diagram for NLGEORGES::CFormElmStruct:

NLGEORGES::CFormElm NLGEORGES::UFormElm NLGEORGES::CFormElmVirtualStruct List of all members.

Public Methods

 CFormElmStruct (CForm *form, CFormElm *parentNode, const CFormDfn *parentDfn, uint parentIndex)
 ~CFormElmStruct ()
void clean ()
void build (const CFormDfn *dfn)
bool isStruct () const
 Return true if the element is a struct or a virtual struct. More...

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

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

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

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

bool isUsed (const CForm *form) const
xmlNodePtr write (xmlNodePtr node, const CForm *form, const char *structName, bool forceWrite=false) const
void unlink (CFormElm *child)
 Unlink a child. More...

void getFormName (std::string &result, const CFormElm *child) const
void read (xmlNodePtr node, CFormLoader &loader, const CFormDfn *dfn, CForm *form)
virtual void warning (bool exception, const char *function, const char *format,...) const

Public Attributes

NLMISC::CSmartPtr< CFormDfnFormDfn
std::vector< CFormElmStructElmElements

Detailed Description

Define a structure of elements.

This structure has pointers on named sub structures in Elements. If a sub structure is empty, its pointer is NULL.

Definition at line 259 of file form_elm.h.


Constructor & Destructor Documentation

NLGEORGES::CFormElmStruct::CFormElmStruct CForm   form,
CFormElm   parentNode,
const CFormDfn   parentDfn,
uint    parentIndex
 

Definition at line 1729 of file form_elm.cpp.

References FormDfn.

Referenced by read.

NLGEORGES::CFormElmStruct::~CFormElmStruct  
 

Definition at line 1736 of file form_elm.cpp.

References clean.


Member Function Documentation

void NLGEORGES::CFormElmStruct::build const CFormDfn   dfn
 

Definition at line 2036 of file form_elm.cpp.

References clean, Elements, and FormDfn.

Referenced by read.

void NLGEORGES::CFormElmStruct::clean  
 

Definition at line 1743 of file form_elm.cpp.

References Elements.

Referenced by build, and ~CFormElmStruct.

void NLGEORGES::CFormElmStruct::getFormName std::string &    result,
const CFormElm   child
const [virtual]
 

Implements NLGEORGES::CFormElm.

Definition at line 2093 of file form_elm.cpp.

References Elements, NLGEORGES::CFormElm::ParentNode, and warning.

Referenced by NLGEORGES::CFormElmVirtualStruct::warning, and warning.

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

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

Reimplemented from NLGEORGES::CFormElm.

Definition at line 1804 of file form_elm.cpp.

References Elements, and warning.

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

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

Reimplemented from NLGEORGES::CFormElm.

Definition at line 1788 of file form_elm.cpp.

References Elements, and warning.

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

Return the element name.

Reimplemented from NLGEORGES::CFormElm.

Definition at line 1772 of file form_elm.cpp.

References Elements, and warning.

bool NLGEORGES::CFormElmStruct::getStructSize uint   size const [virtual]
 

Return the struct size.

Reimplemented from NLGEORGES::CFormElm.

Definition at line 1764 of file form_elm.cpp.

References Elements.

bool NLGEORGES::CFormElmStruct::isStruct   const [virtual]
 

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

Reimplemented from NLGEORGES::CFormElm.

Definition at line 1757 of file form_elm.cpp.

bool NLGEORGES::CFormElmStruct::isUsed const CForm   form const [virtual]
 

Reimplemented from NLGEORGES::CFormElm.

Reimplemented in NLGEORGES::CFormElmVirtualStruct.

Definition at line 2024 of file form_elm.cpp.

References Elements.

Referenced by write.

void NLGEORGES::CFormElmStruct::read xmlNodePtr    node,
CFormLoader   loader,
const CFormDfn   dfn,
CForm   form
 

Definition at line 1852 of file form_elm.cpp.

References build, CFormElmStruct, Elements, FormDfn, nlassert, and warning.

void NLGEORGES::CFormElmStruct::unlink CFormElm   child [virtual]
 

Unlink a child.

Reimplemented from NLGEORGES::CFormElm.

Definition at line 2075 of file form_elm.cpp.

References Elements, and nlassert.

void NLGEORGES::CFormElmStruct::warning bool    exception,
const char *    function,
const char *    format,
...   
const [virtual]
 

Reimplemented from NLGEORGES::CFormElm.

Reimplemented in NLGEORGES::CFormElmVirtualStruct.

Definition at line 2133 of file form_elm.cpp.

References NLGEORGES::CFormElm::Form, format, getFormName, and NLGEORGES::warning.

Referenced by getFormName, getStructNode, getStructNodeName, and read.

xmlNodePtr NLGEORGES::CFormElmStruct::write xmlNodePtr    node,
const CForm   form,
const char *    structName,
bool    forceWrite = false
const [virtual]
 

Implements NLGEORGES::CFormElm.

Reimplemented in NLGEORGES::CFormElmVirtualStruct.

Definition at line 1820 of file form_elm.cpp.

References Elements, and isUsed.


Member Data Documentation

std::vector<CFormElmStructElm> NLGEORGES::CFormElmStruct::Elements
 

Definition at line 310 of file form_elm.h.

Referenced by build, clean, getFormName, getStructNode, getStructNodeName, getStructSize, isUsed, read, unlink, NLGEORGES::CFormElmVirtualStruct::write, and write.

NLMISC::CSmartPtr<CFormDfn> NLGEORGES::CFormElmStruct::FormDfn
 

Definition at line 270 of file form_elm.h.

Referenced by build, CFormElmStruct, NLGEORGES::CFormElmVirtualStruct::read, and read.


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