Changed: #1048 getType() in UFormElm
This commit is contained in:
parent
8bdc216597
commit
b47435695a
3 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue