Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XMLStackAttribute Class Template Reference

Node class for creating attributes in element nodes. More...

#include <XMLStack.h>

Inheritance diagram for XMLStackAttribute::

XMLStackNode List of all members.

Public Methods

 XMLStackAttribute (_XMLStackDocument *Doc, const _XMLStackString &Name, const _XMLStackString &NamespaceURI=_XMLStackString())
 Constructor which takes both an attribute name and an optional namespaceURI. More...

virtual ~XMLStackAttribute ()
 Destructor.

const _XMLStackStringgetNamespaceURI (void) const
 Returns the URI for the namespace (if any).

virtual void setValue (const _XMLStackString &Value)
 Sets the value for the attribute node. More...

virtual void setValue (unsigned long Value)
virtual void setValue (long Value)
virtual void setValue (unsigned int Value)
virtual void setValue (int Value)
virtual void setValue (unsigned short Value)
virtual void setValue (short Value)
virtual void setValue (signed char Value)
virtual void setValue (char Value)
virtual void setValue (unsigned char Value)
virtual void setValue (double Value, int Scale=6)
virtual void setValue (float Value, int Scale=6)
_XMLStackString xml (void) const
 Returns the XML for the attribute node.

bool isDirty (void) const
 Returns true if the node has been modified.

void setDirty (bool Dirty)
 Sets the dirty flag to the value passed in.

_XMLStackAttributeoperator= (const _XMLStackString &Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (unsigned long &Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (long Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (unsigned int Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (int Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (unsigned short Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (short Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (signed char Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (char Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (unsigned char Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (double Value)
 Convenience operator for setValue().

_XMLStackAttributeoperator= (float Value)
 Convenience operator for setValue().


Protected Methods

virtual _XMLStackNodeclone (void) const

Protected Attributes

_XMLStackString m_NamespaceURI
_XMLStackString m_Value
bool m_Dirty

Friends

class  XMLStackElement< _E, _Tr, _A >

Detailed Description

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>> class XMLStackAttribute

Node class for creating attributes in element nodes.

Definition at line 862 of file XMLStack.h.


Constructor & Destructor Documentation

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
XMLStackAttribute<_E, _Tr, _A>::XMLStackAttribute<_E, _Tr, _A> ( _XMLStackDocument * Doc,
const _XMLStackString & Name,
const _XMLStackString & NamespaceURI = _XMLStackString() ) [inline]
 

Constructor which takes both an attribute name and an optional namespaceURI.

The attribute name must conform to the rules for valid element names. Only some basic checking is done to make sure the name is valid, and only when the _DEBUG preprocessor symbol is defined.

If a NamespaceURI is provided, no checking is performed to see if it was declared in an ancestor element; it will be written out regardless. If you want the attribute in a namespace but don't want the xmlns declaration again, only prefix the attribute name with the namespace qualifier (e.g., "NamespaceQualifier:AttributeName"). Don't provide the NamespaceURI.

Parameters:
Doc   The XMLStackDocument this attribute belongs to
Name   The name of the attribute, along with any namespace prefix.
NamespaceURI   Optional string defining the namespace URI. The attribute name must have a namespace prefix. Attributes cannot be scoped to a default namespace.
Exceptions:
XMLStackException   Thrown if Name is invalid

Definition at line 888 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
XMLStackAttribute<_E, _Tr, _A>::~XMLStackAttribute<_E, _Tr, _A> ( ) [inline, virtual]
 

Destructor.

Definition at line 951 of file XMLStack.h.


Member Function Documentation

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackNode * XMLStackAttribute<_E, _Tr, _A>::clone ( void ) const [inline, protected, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 1138 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
const _XMLStackString & XMLStackAttribute<_E, _Tr, _A>::getNamespaceURI ( void ) const [inline]
 

Returns the URI for the namespace (if any).

Definition at line 954 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
bool XMLStackAttribute<_E, _Tr, _A>::isDirty ( void ) const [inline]
 

Returns true if the node has been modified.

Definition at line 1042 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( float Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1125 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( double Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1118 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( unsigned char Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1111 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( char Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1104 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( signed char Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1097 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( short Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1090 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( unsigned short Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1083 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( int Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1076 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( unsigned int Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1069 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( long Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1062 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( unsigned long & Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1055 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackAttribute<_E, _Tr, _A> & XMLStackAttribute<_E, _Tr, _A>::operator= ( const _XMLStackString & Value ) [inline]
 

Convenience operator for setValue().

Reimplemented from XMLStackNode.

Definition at line 1048 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setDirty ( bool Dirty ) [inline]
 

Sets the dirty flag to the value passed in.

Definition at line 1045 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( float Value,
int Scale = 6 ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 981 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( double Value,
int Scale = 6 ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 977 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( unsigned char Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 976 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( char Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 975 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( signed char Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 974 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( short Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 973 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( unsigned short Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 972 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( int Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 971 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( unsigned int Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 970 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( long Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 969 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( unsigned long Value ) [inline, virtual]
 

Reimplemented from XMLStackNode.

Definition at line 968 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
void XMLStackAttribute<_E, _Tr, _A>::setValue ( const _XMLStackString & Value ) [inline, virtual]
 

Sets the value for the attribute node.

Automatic conversion is performed for characters that must be escaped.

Reimplemented from XMLStackNode.

Definition at line 963 of file XMLStack.h.

Referenced by XMLStackProcessingInstruction::operator=(), XMLStackComment::operator=(), XMLStackCDATASection::operator=(), XMLStackText::operator=(), operator=(), XMLStackProcessingInstruction::setValue(), XMLStackComment::setValue(), XMLStackCDATASection::setValue(), XMLStackText::setValue(), and setValue().

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackString XMLStackAttribute<_E, _Tr, _A>::xml ( void ) const [inline]
 

Returns the XML for the attribute node.

Definition at line 988 of file XMLStack.h.


Friends And Related Function Documentation

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
friend class XMLStackElement< _E, _Tr, _A > [friend]
 

Definition at line 1142 of file XMLStack.h.


Member Data Documentation

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
bool XMLStackAttribute<_E, _Tr, _A>::m_Dirty [protected]
 

Definition at line 1136 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackString XMLStackAttribute<_E, _Tr, _A>::m_NamespaceURI [protected]
 

Definition at line 1134 of file XMLStack.h.

template<class _E, class _Tr = std::char_traits<_E>, class _A = std::allocator<_E>>
_XMLStackString XMLStackAttribute<_E, _Tr, _A>::m_Value [protected]
 

Definition at line 1135 of file XMLStack.h.


The documentation for this class was generated from the following file:
Generated at Mon Aug 6 11:54:21 2001 for XMLStack by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001