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;
127 virtual void GetAllChildren( ChildrenListType& output );
130 virtual void GetAllChildren( ConstChildrenListType& output )
const;
133 virtual void GetChildren(
const std::string& tag, ChildrenListType& output );
136 virtual void GetChildren(
const std::string& tag, ConstChildrenListType& output )
const;
139 virtual void RemoveAllChildren();
142 virtual void AddChild(
DOMNode* node, IdentifierType i=0 );
145 virtual void AddChildAtBegin(
DOMNode* node );
148 virtual void AddChildAtEnd(
DOMNode* node );
151 virtual void SetChild(
DOMNode* node, IdentifierType i=0 );
154 virtual void RemoveChild( IdentifierType i=0 );
157 virtual void RemoveAllAttributesAndChildren();
160 virtual DOMNode* GetChild( IdentifierType i=0 );
161 virtual const DOMNode* GetChild( IdentifierType i=0 )
const;
165 virtual DOMNode* GetChild(
const std::string& tag, IdentifierType i=0 );
166 virtual const DOMNode* GetChild(
const std::string& tag, IdentifierType i=0 )
const;
170 virtual DOMNode* GetChildByID(
const std::string& value );
171 virtual const DOMNode* GetChildByID(
const std::string& value )
const;
175 virtual DOMNode* GetSibling( OffsetType i );
176 virtual const DOMNode* GetSibling( OffsetType i )
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;
212 virtual DOMTextNode* GetTextChild( IdentifierType i=0 );
213 virtual const DOMTextNode* GetTextChild( IdentifierType i=0 )
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 DOMNode(
const Self &) ITK_DELETE_FUNCTION;
254 void operator=(const Self &) ITK_DELETE_FUNCTION;
259 #include "itkDOMTextNode.h" 264 #endif // itkDOMNode_h std::map< AttributeKeyType, AttributeValueType > AttributesContainer
ChildrenContainer m_Children
SmartPointer< const Self > ConstPointer
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
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
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