24 #include "ITKIOXMLExport.h"
56 ITK_DISALLOW_COPY_AND_ASSIGN(
DOMNode);
88 virtual void SetParent(
DOMNode* node );
90 const DOMNode* GetParent()
const;
94 itkSetMacro( Name, std::string& );
95 itkGetConstReferenceMacro( Name, std::string );
99 itkSetMacro( ID, std::string& );
100 itkGetConstReferenceMacro( ID, std::string );
104 virtual std::string GetAttribute(
const std::string& key )
const;
107 virtual bool HasAttribute(
const std::string& key )
const;
110 virtual void SetAttribute(
const std::string& key,
const std::string& value );
113 virtual void RemoveAttribute(
const std::string& key );
119 virtual void GetAllAttributes(
AttributesListType& output,
bool keepOriginalOrder =
true )
const;
122 virtual void RemoveAllAttributes();
125 virtual SizeType GetNumberOfChildren()
const;
134 virtual void GetChildren(
const std::string& tag,
ChildrenListType& output );
140 virtual void RemoveAllChildren();
146 virtual void AddChildAtBegin(
DOMNode* node );
149 virtual void AddChildAtEnd(
DOMNode* node );
158 virtual void RemoveAllAttributesAndChildren();
171 virtual DOMNode* GetChildByID(
const std::string& value );
172 virtual const DOMNode* GetChildByID(
const std::string& value )
const;
182 virtual const DOMNode* GetRoot()
const;
186 virtual bool ShareRoot(
const DOMNode* node )
const;
205 virtual DOMNode* Find(
const std::string& path );
206 virtual const DOMNode* Find(
const std::string& path )
const;
210 virtual std::string GetPath()
const;
218 virtual void AddTextChild(
const std::string& text,
IdentifierType i=0 );
221 virtual void AddTextChildAtBegin(
const std::string& text );
224 virtual void AddTextChildAtEnd(
const std::string& text );
227 virtual void SetTextChild(
const std::string& text,
IdentifierType i=0 );
263 #endif // itkDOMNode_h
ChildrenContainer m_Children
std::string AttributeKeyType
Light weight base class for most itk classes.
OrderedAttributesContainer m_OrderedAttributes
Class to represent a special DOM node that holds a text string.
std::map< AttributeKeyType, AttributeValueType > AttributesContainer
std::list< AttributeItemType > AttributesListType
Class to represent a node in a Document Object Model (DOM) tree structure.
std::pair< const AttributeKeyType, AttributeValueType > AttributeItemType
std::vector< const DOMNode * > ConstChildrenListType
std::vector< Pointer > ChildrenContainer
std::vector< DOMNode * > ChildrenListType
std::string AttributeValueType
Base class for most ITK classes.
std::list< AttributeItemType * > OrderedAttributesContainer
AttributesContainer m_Attributes