ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::DOMTextNode Class Reference

#include <itkDOMTextNode.h>

Detailed Description

Class to represent a special DOM node that holds a text string.

A text node has no attributes and children. So a text node is always a leaf node, and the special attribute "id" cannot be used. In this implementation, a text node is internally represented using a special tag name of "!". This is not a problem as "!" is not a valid tag name in any XML file.

Definition at line 40 of file itkDOMTextNode.h.

+ Inheritance diagram for itk::DOMTextNode:
+ Collaboration diagram for itk::DOMTextNode:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = DOMTextNode
 
using Superclass = DOMNode
 
- Public Types inherited from itk::DOMNode
using AttributeItemType = std::pair< const AttributeKeyType, AttributeValueType >
 
using AttributeKeyType = std::string
 
using AttributesListType = std::list< AttributeItemType >
 
using AttributeValueType = std::string
 
using ChildrenListType = std::vector< DOMNode * >
 
using ConstChildrenListType = std::vector< const DOMNode * >
 
using ConstPointer = SmartPointer< const Self >
 
using IdentifierType = int
 
using OffsetType = int
 
using Pointer = SmartPointer< Self >
 
using Self = DOMNode
 
using SizeType = vcl_size_t
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

const char * GetNameOfClass () const override
 
virtual void SetText (const std::string &_arg)
 
virtual const std::string & GetText () const
 
- Public Member Functions inherited from itk::DOMNode
virtual void AddChild (DOMNode *node, IdentifierType i=0)
 
virtual void AddChildAtBegin (DOMNode *node)
 
virtual void AddChildAtEnd (DOMNode *node)
 
virtual void AddTextChild (const std::string &text, IdentifierType i=0)
 
virtual void AddTextChildAtBegin (const std::string &text)
 
virtual void AddTextChildAtEnd (const std::string &text)
 
virtual void GetAllAttributes (AttributesListType &output, bool keepOriginalOrder=true) const
 
virtual void GetAllChildren (ChildrenListType &output)
 
virtual void GetAllChildren (ConstChildrenListType &output) const
 
virtual std::string GetAttribute (const std::string &key) const
 
virtual void GetChildren (const std::string &tag, ChildrenListType &output)
 
virtual void GetChildren (const std::string &tag, ConstChildrenListType &output) const
 
const char * GetNameOfClass () const override
 
virtual SizeType GetNumberOfChildren () const
 
virtual std::string GetPath () const
 
virtual bool HasAttribute (const std::string &key) const
 
virtual void RemoveAllAttributes ()
 
virtual void RemoveAllAttributesAndChildren ()
 
virtual void RemoveAllChildren ()
 
virtual void RemoveAttribute (const std::string &key)
 
virtual void RemoveChild (IdentifierType i=0)
 
virtual void SetAttribute (const std::string &key, const std::string &value)
 
virtual void SetChild (DOMNode *node, IdentifierType i=0)
 
virtual void SetTextChild (const std::string &text, IdentifierType i=0)
 
virtual bool ShareRoot (const DOMNode *node) const
 
virtual void SetParent (DOMNode *node)
 
DOMNodeGetParent ()
 
const DOMNodeGetParent () const
 
virtual void SetName (const std::string &_arg)
 
virtual const std::string & GetName () const
 
virtual void SetID (const std::string &_arg)
 
virtual const std::string & GetID () const
 
virtual DOMNodeGetChild (IdentifierType i=0)
 
virtual const DOMNodeGetChild (IdentifierType i=0) const
 
virtual DOMNodeGetChild (const std::string &tag, IdentifierType i=0)
 
virtual const DOMNodeGetChild (const std::string &tag, IdentifierType i=0) const
 
virtual DOMNodeGetChildByID (const std::string &value)
 
virtual const DOMNodeGetChildByID (const std::string &value) const
 
virtual DOMNodeGetSibling (OffsetType i)
 
virtual const DOMNodeGetSibling (OffsetType i) const
 
virtual DOMNodeGetRoot ()
 
virtual const DOMNodeGetRoot () const
 
virtual DOMNodeFind (const std::string &path)
 
virtual const DOMNodeFind (const std::string &path) const
 
virtual DOMTextNodeGetTextChild (IdentifierType i=0)
 
virtual const DOMTextNodeGetTextChild (IdentifierType i=0) const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual const char * GetNameOfClass () const
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::DOMNode
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 DOMTextNode ()
 
- Protected Member Functions inherited from itk::DOMNode
 DOMNode ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

std::string m_Text {}
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ ConstPointer

Definition at line 49 of file itkDOMTextNode.h.

◆ Pointer

Definition at line 48 of file itkDOMTextNode.h.

◆ Self

Standard class type aliases.

Definition at line 46 of file itkDOMTextNode.h.

◆ Superclass

Definition at line 47 of file itkDOMTextNode.h.

Constructor & Destructor Documentation

◆ DOMTextNode()

itk::DOMTextNode::DOMTextNode ( )
inlineprotected

Definition at line 63 of file itkDOMTextNode.h.

References itk::DOMNode::SetName().

Member Function Documentation

◆ GetNameOfClass()

const char * itk::DOMTextNode::GetNameOfClass ( ) const
overridevirtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::DOMNode.

◆ GetText()

virtual const std::string & itk::DOMTextNode::GetText ( ) const
virtual

Functions to set/get the enclosed text of this node.

◆ New()

static Pointer itk::DOMTextNode::New ( )
static

Method for creation through the object factory.

◆ SetText()

virtual void itk::DOMTextNode::SetText ( const std::string &  _arg)
virtual

Functions to set/get the enclosed text of this node.

Member Data Documentation

◆ m_Text

std::string itk::DOMTextNode::m_Text {}
private

Variable to hold the text string of this node.

Definition at line 67 of file itkDOMTextNode.h.


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