xmltooling::AbstractSimpleElement Class Reference

AbstractXMLObject mixin that implements a simple string-based content model. More...

#include <xmltooling/AbstractSimpleElement.h>

Inheritance diagram for xmltooling::AbstractSimpleElement:

xmltooling::AbstractXMLObject xmltooling::XMLObject List of all members.

Public Member Functions

bool hasChildren () const
 Checks if this XMLObject has children.
const std::list< XMLObject * > & getOrderedChildren () const
 Returns an unmodifiable list of child objects in the order that they should appear in the serialized representation.
void removeChild (XMLObject *child)
 Used by a child's detach method to isolate the child from this parent object in preparation for destroying the parent (this object).
virtual const XMLCh * getTextContent (unsigned int position=0) const
 Returns the text content at the specified position relative to any child elements.
virtual void setTextContent (const XMLCh *value, unsigned int position=0)
 Sets (or clears) text content relative to a child element's position.

Protected Member Functions

 AbstractSimpleElement (const AbstractSimpleElement &src)
 Copy constructor.

Detailed Description

AbstractXMLObject mixin that implements a simple string-based content model.

Inherit from this class to support string-based element content.


Member Function Documentation

const std::list<XMLObject*>& xmltooling::AbstractSimpleElement::getOrderedChildren (  )  const [inline, virtual]

Returns an unmodifiable list of child objects in the order that they should appear in the serialized representation.

The validity of the returned list is not maintained if any non-const operations are performed on the parent object.

Returns:
the list of children

Implements xmltooling::XMLObject.

virtual const XMLCh* xmltooling::AbstractSimpleElement::getTextContent ( unsigned int  position = 0  )  const [inline, virtual]

Returns the text content at the specified position relative to any child elements.

A zero represents leading text, 1 comes after the first child, and so forth.

Parameters:
position the relative child element position of the text
Returns:
the designated text value

Implements xmltooling::XMLObject.

bool xmltooling::AbstractSimpleElement::hasChildren (  )  const [inline, virtual]

Checks if this XMLObject has children.

Returns:
true if this XMLObject has children, false if not

Implements xmltooling::XMLObject.

void xmltooling::AbstractSimpleElement::removeChild ( XMLObject child  )  [virtual]

Used by a child's detach method to isolate the child from this parent object in preparation for destroying the parent (this object).

Parameters:
child the child object to remove

Implements xmltooling::XMLObject.

virtual void xmltooling::AbstractSimpleElement::setTextContent ( const XMLCh *  value,
unsigned int  position = 0 
) [inline, virtual]

Sets (or clears) text content relative to a child element's position.

Parameters:
value value to set, or NULL to clear
position position relative to child element

Implements xmltooling::XMLObject.


The documentation for this class was generated from the following file:
Generated on Mon Oct 19 14:18:34 2009 for xmltooling by  doxygen 1.4.7