diff --git a/code/nel/include/nel/georges/u_form_elm.h b/code/nel/include/nel/georges/u_form_elm.h index e6a294ece..dd72487e2 100644 --- a/code/nel/include/nel/georges/u_form_elm.h +++ b/code/nel/include/nel/georges/u_form_elm.h @@ -224,6 +224,8 @@ public: // ** Atom element methods + /// Returns the type of the atom. NULL otherwise. + virtual const class UType *getType () = 0; /// Return true if the element is an atom virtual bool isAtom () const = 0; diff --git a/code/nel/src/georges/form_elm.cpp b/code/nel/src/georges/form_elm.cpp index 9991187a6..fc117d503 100644 --- a/code/nel/src/georges/form_elm.cpp +++ b/code/nel/src/georges/form_elm.cpp @@ -228,6 +228,13 @@ bool CFormElm::isAtom () const // *************************************************************************** +const CType* CFormElm::getType () +{ + warning (false, "getType", "This node is not an atom."); + return 0; +} +// *************************************************************************** + bool CFormElm::getValue (string &/* result */, TEval /* evaluate */) const { warning (false, "getValue", "This node is not an atom."); @@ -2808,6 +2815,13 @@ bool CFormElmAtom::isAtom () const // *************************************************************************** +const CType* CFormElmAtom::getType () +{ + return Type; +} + +// *************************************************************************** + void CFormElmAtom::getDependencies (std::set &/* dependencies */) const { } diff --git a/code/nel/src/georges/form_elm.h b/code/nel/src/georges/form_elm.h index c318c771b..2eb603da3 100644 --- a/code/nel/src/georges/form_elm.h +++ b/code/nel/src/georges/form_elm.h @@ -87,6 +87,7 @@ public: 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 const CType *getType (); virtual bool isArray () const; virtual bool getArraySize (uint &size) const; virtual bool getArrayNode (const UFormElm **result, uint arrayIndex) const; @@ -432,6 +433,7 @@ public: bool setParent (CFormElm *parent); void getFormName (std::string &result, const CFormElm *child) const; void getDependencies (std::set &dependencies) const; + const CType* getType (); // Call by CFormLoader void read (xmlNodePtr node, CFormLoader &loader, const CType *type, CForm *form);