wxXml2Property Class Reference

#include <xml2.h>

Inheritance diagram for wxXml2Property:

wxXml2Wrapper List of all members.

Detailed Description

Represents a node property.

Example: in

hello.gif
"src" is property with value "hello.gif" and "id" is a property with value "3".


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==.
wxXml2Propertyoperator= (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.

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
 Returns the private member of the wrapped structure.


Constructor & Destructor Documentation

wxXml2Property::wxXml2Property (  )  [inline]

Constructs an empty property; it cannot be used until you Create() it.

wxXml2Property::wxXml2Property ( const wxString &  name,
const wxString &  value,
wxXml2Node owner = wxXml2EmptyNode 
) [inline]

Constructs a property associated with the given node.

wxXml2Property::wxXml2Property ( xmlAttr *  pattr  )  [inline]

Wraps the given XML structure.

wxXml2Property::wxXml2Property ( const wxXml2Property prop  )  [inline]

Copies the given wrapper (does not imply the XML structure copy).

virtual wxXml2Property::~wxXml2Property (  )  [inline, virtual]

Destructor.


Member Function Documentation

void wxXml2Property::Copy ( const wxXml2Property prop  )  [inline, protected]

void wxXml2Property::Create ( const wxString &  name,
const wxString &  value,
wxXml2Node owner = wxXml2EmptyNode 
)

Builds this XML property.

void wxXml2Property::Destroy (  )  [inline, protected, virtual]

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.

wxString wxXml2Property::GetName (  )  const [inline]

wxXml2Property wxXml2Property::GetNext (  )  const [inline]

xmlAttr* wxXml2Property::GetObj (  )  const [inline]

Returns the XML structure wrapped by this class.

wxXml2Node wxXml2Property::GetOwner (  )  const

wxXml2Property wxXml2Property::GetPrevious (  )  const [inline]

int& wxXml2Property::GetPrivate (  )  const [inline, protected, virtual]

Returns the private member of the wrapped structure.

This function should be used to implement copy constructor and assignment operators.

Implements wxXml2Wrapper.

wxString wxXml2Property::GetValue (  )  const [inline]

bool wxXml2Property::IsNonEmpty (  )  const [inline, virtual]

Returns TRUE if this object is wrapping a non-NULL object.

Implements wxXml2Wrapper.

bool wxXml2Property::IsUnlinked (  )  const [virtual]

Returns TRUE if this property is not linked to any wider XML tree.

Implements wxXml2Wrapper.

bool wxXml2Property::operator!= ( const wxXml2Property p  )  const [inline]

Returns NOT operator==.

wxXml2Property& wxXml2Property::operator= ( const wxXml2Property p  )  [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).

void wxXml2Property::SetAsEmpty (  )  [inline, protected, virtual]

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  ) 

void wxXml2Property::SetNext ( wxXml2Property next  ) 

void wxXml2Property::SetOwner ( wxXml2Node owner  ) 

Links this class with a wxXml2Node: it will have the duty of destroy this object.

void wxXml2Property::SetPrevious ( wxXml2Property prev  ) 

void wxXml2Property::SetValue ( const wxString &  value  ) 


The documentation for this class was generated from the following files:
Generated on Thu Sep 28 14:58:02 2006 for wxXml2 by  doxygen 1.4.7