24 #include "ITKIOXMLExport.h"
87 virtual void SetParent(
DOMNode* node );
89 const DOMNode* GetParent()
const;
93 itkSetMacro( Name, std::string& );
94 itkGetConstReferenceMacro( Name, std::string );
98 itkSetMacro( ID, std::string& );
99 itkGetConstReferenceMacro( ID, std::string );
103 virtual std::string GetAttribute(
const std::string& key )
const;
106 virtual bool HasAttribute(
const std::string& key )
const;
109 virtual void SetAttribute(
const std::string& key,
const std::string& value );
112 virtual void RemoveAttribute(
const std::string& key );
118 virtual void GetAllAttributes(
AttributesListType& output,
bool keepOriginalOrder =
true )
const;
121 virtual void RemoveAllAttributes();
124 virtual SizeType GetNumberOfChildren()
const;
133 virtual void GetChildren(
const std::string& tag,
ChildrenListType& output );
139 virtual void RemoveAllChildren();
145 virtual void AddChildAtBegin(
DOMNode* node );
148 virtual void AddChildAtEnd(
DOMNode* node );
157 virtual void RemoveAllAttributesAndChildren();
170 virtual DOMNode* GetChildByID(
const std::string& value );
171 virtual const DOMNode* GetChildByID(
const std::string& value )
const;
181 virtual const DOMNode* GetRoot()
const;
185 virtual bool ShareRoot(
const DOMNode* node )
const;
204 virtual DOMNode* Find(
const std::string& path );
205 virtual const DOMNode* Find(
const std::string& path )
const;
209 virtual std::string GetPath()
const;
217 virtual void AddTextChild(
const std::string& text,
IdentifierType i=0 );
220 virtual void AddTextChildAtBegin(
const std::string& text );
223 virtual void AddTextChildAtEnd(
const std::string& text );
226 virtual void SetTextChild(
const std::string& text,
IdentifierType i=0 );
253 ITK_DISALLOW_COPY_AND_ASSIGN(
DOMNode);
263 #endif // itkDOMNode_h
std::map< AttributeKeyType, AttributeValueType > AttributesContainer
ChildrenContainer m_Children
SmartPointer< const Self > ConstPointer
Light weight base class for most itk classes.
OrderedAttributesContainer m_OrderedAttributes
Class to represent a special DOM node that holds a text string.
Class to represent a node in a Document Object Model (DOM) tree structure.
std::vector< const DOMNode * > ConstChildrenListType
std::string AttributeValueType
std::list< AttributeItemType * > OrderedAttributesContainer
std::pair< const AttributeKeyType, AttributeValueType > AttributeItemType
std::vector< DOMNode * > ChildrenListType
std::vector< Pointer > ChildrenContainer
SmartPointer< Self > Pointer
std::list< AttributeItemType > AttributesListType
Base class for most ITK classes.
std::string AttributeKeyType
AttributesContainer m_Attributes