class CCL::XmlNode
Overview
#include <xmltree.h> class XmlNode: public CCL::ObjectNode, public CCL::IXmlNode { public: // fields int indent = 0); IXmlNode; // methods DECLARE_CLASS (XmlNode, ObjectNode); XmlNode* getParentNode () const; XmlNode* findNode (StringRef name) const; MutableCString getNameCString () const; XmlNode* findNodeCString (StringID name) const; const StringDictionary& getAttributes () const; void setAttributes (const IStringDictionary& attributes); virtual StringRef CCL_API getAttribute (StringRef key) const; virtual void CCL_API setAttribute (StringRef key, StringRef value); MutableCString getAttributeCString (StringID key) const; void setAttributeCString (StringID key, StringID value); virtual String CCL_API getElementString (StringRef name) const; XmlNode* addElementString (StringRef name, StringRef value); PROPERTY_STRING (comment, Comment); virtual StringRef CCL_API getText () const; String& getText (); PROPERTY_VARIABLE (int, lineNumber, LineNumber); virtual IXmlNode&CCL_API newChildNode (StringRef name); ObjectNode* getParentNode () const; template <class T> T* getParentNode () const; };
Inherited Members
public: // typedefs typedef CStringRef MemberID; // fields IObjectNode; // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0; Unknown& operator = (const Unknown&); unsigned int getRetainCount () const; virtual Object*CCL_API revealObject (const void* moduleAddress) = 0; virtual void CCL_API addObserver (IObserver* observer) = 0; virtual void CCL_API removeObserver (IObserver* observer) = 0; virtual void CCL_API signal (MessageRef msg) = 0; virtual void CCL_API deferSignal (IMessage* msg) = 0; static ISubject void addObserver (IUnknown* unknown, IObserver* observer); static void removeObserver (IUnknown* unknown, IObserver* observer); virtual void CCL_API notify (ISubject* subject, MessageRef msg) = 0; static IObserver void notify ( IUnknown* unknown, ISubject* subject, MessageRef msg ); virtual const ITypeInfo&CCL_API getTypeInfo () const = 0; virtual tbool CCL_API getProperty (Variant& var, MemberID propertyId) const = 0; virtual tbool CCL_API setProperty (MemberID propertyId, const Variant& var) = 0; virtual tbool CCL_API getPropertyNames (IPropertyCollector& collector) const = 0; virtual tbool CCL_API invokeMethod (Variant& returnValue, MessageRef msg) = 0; DECLARE_BASE_CLASS (Object); virtual void CCL_API removeObserver (IObserver* observer); virtual void CCL_API signal (MessageRef msg); virtual void CCL_API deferSignal (IMessage* msg); virtual void deferChanged (); virtual void CCL_API notify (ISubject* subject, MessageRef msg); virtual bool equals (const Object& obj) const; virtual int compare (const Object& obj) const; virtual bool load (const Storage& storage); virtual bool save (const Storage& storage) const; virtual bool save (const OutputStorage& storage) const; virtual bool toString (String& string, int flags = 0) const; virtual int getHashCode (int size) const; IUnknown* asUnknown (); static void addGarbageCollected (Object* obj, bool globalScope = true); static void deferDestruction (Object* obj); static const void* getModuleAddress (); virtual StringRef CCL_API getObjectID () const = 0; virtual UIDRef CCL_API getObjectUID () const = 0; virtual UIDRef CCL_API getClassUID () const = 0; virtual IObjectNode*CCL_API getParent () const = 0; virtual IObjectNode*CCL_API getRoot () const = 0; virtual int CCL_API countChildren () const = 0; virtual IObjectNode*CCL_API getChild (int index) const = 0; virtual IObjectNode*CCL_API findChild (StringRef id) const = 0; virtual tbool CCL_API getChildDelegates (IMutableArray& delegates) const = 0; virtual tbool CCL_API getChildPath (String& path) const = 0; virtual IObjectNode*CCL_API lookupChild (StringRef path) const = 0; virtual StringRef CCL_API getObjectID () const; virtual UIDRef CCL_API getObjectUID () const; virtual UIDRef CCL_API getClassUID () const; virtual IObjectNode*CCL_API getParent () const; virtual IObjectNode*CCL_API getRoot () const; virtual int CCL_API countChildren () const; virtual IObjectNode*CCL_API getChild (int index) const; virtual IObjectNode*CCL_API findChild (StringRef id) const; virtual tbool CCL_API getChildDelegates (IMutableArray& delegates) const; virtual tbool CCL_API getChildPath (String& path) const; virtual IObjectNode*CCL_API lookupChild (StringRef path) const; DECLARE_CLASS (ObjectNode, Object); void setName (StringRef name); bool setUniqueName (StringRef name); StringRef getName () const; virtual Iterator* newIterator () const; virtual bool addChild (ObjectNode* child); virtual bool insertChild (int index, ObjectNode* child); virtual bool addChildSorted (ObjectNode* child); virtual bool removeChild (ObjectNode* child); virtual void removeAll (); virtual ObjectNode* findChildNode (StringRef id) const; virtual ObjectNode* findChildNode (MetaClassRef typeID) const; template <class T> T* findChildNode (StringRef id) const; template <class T> T* findChildNode () const; template <class T> T* getChildNode (int index) const; template <class I> I* findChildByInterface (bool deep = false) const; ObjectNode* getChildNode (int index) const; int getChildIndex (const ObjectNode* child) const; virtual StringRef getChildID (const ObjectNode* child) const; ObjectNode* getParentNode () const; template <class T> T* getParentNode () const; bool getRelativePath (String& path, ObjectNode* subNode) const; void signalDeep (MessageRef msg, bool recursive = false); virtual void notifyChildren ( ISubject* subject, MessageRef msg, bool recursive = false ); tresult queryChildInterface (UIDRef iid, void** ptr, bool recursive = false); template <class Lambda> bool visitChildren ( const Lambda& visitLambda, bool recursive ) const; void dump (int level = 0); virtual StringRef CCL_API getObjectID () const; virtual UIDRef CCL_API getObjectUID () const; virtual UIDRef CCL_API getClassUID () const; virtual IObjectNode*CCL_API getParent () const; virtual IObjectNode*CCL_API getRoot () const; virtual int CCL_API countChildren () const; virtual IObjectNode*CCL_API getChild (int index) const; virtual IObjectNode*CCL_API findChild (StringRef id) const; virtual StringRef CCL_API getAttribute (StringRef key) const = 0; virtual void CCL_API setAttribute (StringRef key, StringRef value) = 0; virtual StringRef CCL_API getText () const = 0; virtual void CCL_API setText (StringRef text) = 0; virtual String CCL_API getElementString (StringRef name) const = 0; virtual IXmlNode&CCL_API newChildNode (StringRef name) = 0;
Detailed Documentation
Methods
virtual StringRef CCL_API getAttribute (StringRef key) const
virtual void CCL_API setAttribute (StringRef key, StringRef value)
virtual String CCL_API getElementString (StringRef name) const
Get text of child node with given name.
XmlNode* addElementString (StringRef name, StringRef value)
Add simple child node with given name and text (no attributes).
PROPERTY_STRING (comment, Comment)
Comment before XML tag.
virtual StringRef CCL_API getText () const
PROPERTY_VARIABLE (int, lineNumber, LineNumber)
Line number.
virtual IXmlNode&CCL_API newChildNode (StringRef name)
Add new child node with given name.