Changed: #1048 getType() in UFormElm

This commit is contained in:
aquiles 2010-08-03 15:26:44 +02:00
parent 8bdc216597
commit b47435695a
3 changed files with 18 additions and 0 deletions

View file

@ -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;

View file

@ -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<std::string> &/* dependencies */) const
{
}

View file

@ -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<std::string> &dependencies) const;
const CType* getType ();
// Call by CFormLoader
void read (xmlNodePtr node, CFormLoader &loader, const CType *type, CForm *form);