|
wxXml2
|
Represents a node property. More...
#include <xml2.h>


Public Member Functions | |
| wxXml2Property () | |
| Constructs an empty property; it cannot be used until you Create() it. | |
| wxXml2Property (const wxString &name, const wxString &value, wxXml2Node &owner=wxXml2EmptyNode) | |
| Constructs a property associated with the given node. | |
| wxXml2Property (xmlAttr *pattr) | |
| Wraps the given XML structure. | |
| wxXml2Property (const wxXml2Property &prop) | |
| Copies the given wrapper (does not imply the XML structure copy). | |
| virtual | ~wxXml2Property () |
| Destructor. | |
| bool | operator== (const wxXml2Property &p) const |
| Returns TRUE if the two wxXml2Properties have the same name (case insensitive comparison is performed) and same values (case sensitive comparison). | |
| bool | operator!= (const wxXml2Property &p) const |
| Returns NOT operator==. | |
| wxXml2Property & | operator= (const wxXml2Property &p) |
| Assignment operator. | |
| void | Create (const wxString &name, const wxString &value, wxXml2Node &owner=wxXml2EmptyNode) |
| Builds this XML property. | |
| bool | IsUnlinked () const |
| Returns TRUE if this property is not linked to any wider XML tree. | |
| bool | IsNonEmpty () const |
| Returns TRUE if this object is wrapping a non-NULL object. | |
| wxString | GetName () const |
| wxString | GetValue () const |
| wxXml2Property | GetNext () const |
| wxXml2Property | GetPrevious () const |
| wxXml2Node | GetOwner () const |
| xmlAttr * | GetObj () const |
| Returns the XML structure wrapped by this class. | |
| void | SetValue (const wxString &value) |
| void | SetName (const wxString &name) |
| void | SetNext (wxXml2Property &next) |
| void | SetPrevious (wxXml2Property &prev) |
| void | SetOwner (wxXml2Node &owner) |
| Links this class with a wxXml2Node: it will have the duty of destroy this object. | |
Public Member Functions inherited from wxXml2Wrapper | |
| wxXml2Wrapper () | |
| Constructs this wrapper but not its wrapped data. | |
| virtual | ~wxXml2Wrapper () |
| The wxXml2Wrapper destructor will free the memory of the underlying libxml2 structure only if it is not linked to any XML tree. | |
| virtual void | DestroyIfUnlinked () |
| Destroys the wrapped data if it is unlinked. | |
Protected Member Functions | |
| void | Destroy () |
| Destroys the data wrapped by this class freeing its memory. | |
| void | SetAsEmpty () |
| Sets this element as empty: that is wrapping a NULL pointer. | |
| void | Copy (const wxXml2Property &prop) |
| int & | GetPrivate () const |
| Copies the given object. | |
Protected Member Functions inherited from wxXml2Wrapper | |
| void | ResetRefCount () |
| void | IncRefCount () |
| void | DecRefCount () |
| int | GetRefCount () const |
| void | UnwrappingOld () |
| This function should be called each time the internal pointer of the class is going to be replaced by another one. | |
| void | JustWrappedNew () |
| This function should be called each time the internal pointer of the class has been replaced by another one. | |
Represents a node property.
Example: in
"src" is property with value "hello.gif" and "id" is a property with value "3".
|
inline |
Constructs an empty property; it cannot be used until you Create() it.
|
inline |
Constructs a property associated with the given node.
|
inline |
Wraps the given XML structure.
References wxXml2Wrapper::JustWrappedNew().
|
inline |
Copies the given wrapper (does not imply the XML structure copy).
|
inlinevirtual |
Destructor.
References wxXml2Wrapper::DestroyIfUnlinked().
|
inlineprotected |
References wxXml2Wrapper::JustWrappedNew(), and wxXml2Wrapper::UnwrappingOld().
| void wxXml2Property::Create | ( | const wxString & | name, |
| const wxString & | value, | ||
| wxXml2Node & | owner = wxXml2EmptyNode |
||
| ) |
Builds this XML property.
References wxXml2Node::GetObj(), wxXml2Wrapper::JustWrappedNew(), wxXml2Wrapper::UnwrappingOld(), and WX2XML.
Referenced by wxXml2Node::AddProperty(), and SetOwner().
|
inlineprotectedvirtual |
Destroys the data wrapped by this class freeing its memory.
This function should not try to update the reference count since it should have been already updated by the caller.
Implements wxXml2Wrapper.
References wxXml2Wrapper::SetAsEmpty().
|
inline |
References XML2WX.
Referenced by wxXml2Node::AddProperty(), wxXml2Node::GetPropVal(), wxXml2Node::HasProp(), operator==(), and SetOwner().
|
inline |
References wxXml2EmptyProperty, and wxXml2Property.
Referenced by wxXml2Node::GetPropVal(), wxXml2Node::HasProp(), and SetNext().
|
inline |
Returns the XML structure wrapped by this class.
Referenced by operator==(), SetNext(), SetPrevious(), and wxXml2Node::SetProperties().
| wxXml2Node wxXml2Property::GetOwner | ( | ) | const |
References wxXml2Node.
|
inline |
References wxXml2EmptyProperty, and wxXml2Property.
Referenced by SetPrevious().
|
inlineprotectedvirtual |
Copies the given object.
This function should be used to implement copy constructor and assignment operators. Returns the private member of the wrapped structure.
Implements wxXml2Wrapper.
|
inline |
References XML2WX.
Referenced by wxXml2Node::AddProperty(), wxXml2Node::GetPropVal(), operator==(), and SetOwner().
|
inlinevirtual |
Returns TRUE if this object is wrapping a non-NULL object.
Implements wxXml2Wrapper.
|
virtual |
Returns TRUE if this property is not linked to any wider XML tree.
Implements wxXml2Wrapper.
|
inline |
Returns NOT operator==.
|
inline |
Assignment operator.
| bool wxXml2Property::operator== | ( | const wxXml2Property & | p | ) | const |
Returns TRUE if the two wxXml2Properties have the same name (case insensitive comparison is performed) and same values (case sensitive comparison).
References GetName(), GetObj(), GetValue(), and wxCHECK_NULL_POINTERS.
|
inlineprotectedvirtual |
Sets this element as empty: that is wrapping a NULL pointer.
This function must not free the memory of the currently wrapped pointer: it must just reset that pointer to NULL. This function is used by DestroyIfUnlinked().
Implements wxXml2Wrapper.
| void wxXml2Property::SetName | ( | const wxString & | name | ) |
References WX2XML.
| void wxXml2Property::SetNext | ( | wxXml2Property & | next | ) |
References GetNext(), GetObj(), SetPrevious(), and wxXml2EmptyProperty.
Referenced by SetPrevious().
| void wxXml2Property::SetOwner | ( | wxXml2Node & | owner | ) |
Links this class with a wxXml2Node: it will have the duty of destroy this object.
References Create(), GetName(), and GetValue().
| void wxXml2Property::SetPrevious | ( | wxXml2Property & | prev | ) |
References GetObj(), GetPrevious(), SetNext(), and wxXml2EmptyProperty.
Referenced by SetNext().
| void wxXml2Property::SetValue | ( | const wxString & | value | ) |
References WX2XML.
1.8.2