Separatista
Separatista::AttributedLeafElement Class Reference

#include <attributedleafelement.h>

Inheritance diagram for Separatista::AttributedLeafElement:
Separatista::LeafElement Separatista::Element

Public Member Functions

IOErrorCode toDOMDocument (xercesc::DOMDocument *pDocument, xercesc::DOMElement *pParent, const ErrorOptions errorOptions=ThrowExceptions) const
 
void fromDOMDocument (xercesc::DOMElement *pDOMElement, const ErrorOptions errorOptions=ThrowExceptions)
 
const wchar_t * getAttributeValue (const wchar_t *pAttributeName) const
 
void setAttributeValue (const wchar_t *pAttributeName, const wchar_t *pValue)
 
- Public Member Functions inherited from Separatista::LeafElement
IOErrorCode toDOMDocument (xercesc::DOMDocument *pDocument, xercesc::DOMElement *pParent, const ErrorOptions errorOptions=ThrowExceptions) const
 
void fromDOMDocument (xercesc::DOMElement *pDOMElement, const ErrorOptions errorOptions=ThrowExceptions)
 
const wchar_t * getTextValue () const
 
void setValue (const wchar_t *pValue, const ErrorOptions errorOptions=ThrowExceptions)
 
- Public Member Functions inherited from Separatista::Element
const ElementDescriptorgetElementDescriptor () const
 
void addElementListener (ElementListener *pElementListener)
 
void removeElementListener (ElementListener *pElementListener)
 
const wchar_t * getTag () const
 
virtual ElementgetElementByTag (const wchar_t *pTagName, size_t nIndex=0) const
 
virtual ElementcreateElementByTag (const wchar_t *pTagName, size_t nIndex=0)
 
virtual void destroyElement (Element *pChildElement)
 
time_t getDateValue () const
 
void setValue (const time_t Value, bool bWithTime=false, const ErrorOptions errorOptions=ThrowExceptions)
 
int getIntValue () const
 
void setValue (const int Value, const ErrorOptions errorOptions=ThrowExceptions)
 
double getDoubleValue () const
 
void setValue (const double d, const ErrorOptions errorOptions=ThrowExceptions)
 
bool isEmpty () const
 
virtual TagKeyRange getAllByTagName (const wchar_t *pTagName)
 

Static Public Member Functions

static ElementcreateElement (const ChildElementDescriptor *pChildElementDescriptor)
 
- Static Public Member Functions inherited from Separatista::LeafElement
static ElementcreateElement (const ChildElementDescriptor *pChildElementDescriptor)
 

Protected Member Functions

 AttributedLeafElement (const ChildElementDescriptor *pChildElementDescriptor)
 Protected constructor.
 
- Protected Member Functions inherited from Separatista::LeafElement
 LeafElement (const ChildElementDescriptor *pChildElementDescriptor)
 Protected constructor.
 
- Protected Member Functions inherited from Separatista::Element
 Element (const ChildElementDescriptor *pChildElementDescriptor)
 
virtual ~Element ()
 
ElementgetParentElement () const
 
void onElementValueChanged (const wchar_t *pNewValue)
 Calls a registered ElementListener's elementValueChanged.
 
void onElementCreated (Element *pChildElement)
 Calls a registered ElementListener's elementCreated.
 
void onElementDeleted ()
 Calls a registered ElementListener's elementDeleted.
 

Protected Attributes

std::map< std::wstring, std::wstring > m_Attributes
 
- Protected Attributes inherited from Separatista::LeafElement
std::wstring m_value
 

Additional Inherited Members

- Public Types inherited from Separatista::Element
enum  ErrorOptions { ThrowExceptions = 0, ClearValue, AcceptValue }
 
typedef std::map< const TagKey, Element * > TagKeyMap
 
- Static Protected Member Functions inherited from Separatista::Element
static void deleteElement (Element *pChildElement)
 

Detailed Description

AttributedLeafElements are elements that hold a value and Attributes

Member Function Documentation

◆ createElement()

Element * AttributedLeafElement::createElement ( const ChildElementDescriptor pChildElementDescriptor)
static

Creates the element from it's descriptor

◆ fromDOMDocument()

void AttributedLeafElement::fromDOMDocument ( xercesc::DOMElement *  pDOMElement,
const ErrorOptions  errorOptions = ThrowExceptions 
)
virtual

Tries to load it's value from the document element.

Parameters
DocumentIteratorThe document iterator to call to continue reading or get value from.

Implements Separatista::Element.

◆ getAttributeValue()

const wchar_t * AttributedLeafElement::getAttributeValue ( const wchar_t *  pAttributeName) const
virtual
See also
Element::getAttributeValue

Reimplemented from Separatista::Element.

◆ setAttributeValue()

void AttributedLeafElement::setAttributeValue ( const wchar_t *  pAttributeName,
const wchar_t *  pValue 
)
virtual
See also
Element::setAttributeValue

Reimplemented from Separatista::Element.

◆ toDOMDocument()

IOErrorCode AttributedLeafElement::toDOMDocument ( xercesc::DOMDocument *  pDOMDocument,
xercesc::DOMElement *  pDOMParent,
const ErrorOptions  errorOptions = ThrowExceptions 
) const
virtual

Abstract method to call to write an element to a DOMDocument.

Parameters
pDocumentThe DOMDocument to create the element for.
pParentThe DOMElement to append the element to.
Returns
Pointer to the new created DOMElement, or NULL
See also
createElement

Implements Separatista::Element.


The documentation for this class was generated from the following files: