Shapeworks Studio  2.1
Shape analysis software suite
itkPSMDOMNode.h
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef __itkPSMDOMNode_h
20 #define __itkPSMDOMNode_h
21 
22 #include "itkDOMNode.h"
23 #include "itkObject.h"
24 #include "itkObjectFactory.h"
25 
26 #include <string>
27 #include <vector>
28 #include <list>
29 #include <map>
30 
31 namespace itk
32 {
33 
46 class PSMDOMNode : public DOMNode
47 {
48 public:
50  typedef PSMDOMNode Self;
51  typedef DOMNode Superclass;
52  typedef SmartPointer< Self > Pointer;
53  typedef SmartPointer< const Self > ConstPointer;
54 
56  itkNewMacro(Self);
57 
59  itkTypeMacro(PSMDOMNode, DOMNode);
60 
62  typedef Superclass::ChildrenListType ChildrenListType;
63  typedef Superclass::ConstChildrenListType ConstChildrenListType;
64 
66  typedef Superclass::AttributeKeyType AttributeKeyType;
67  typedef Superclass::AttributeValueType AttributeValueType;
68 
69  typedef Superclass::AttributeItemType AttributeItemType;
70 
72  typedef Superclass::AttributesListType AttributesListType;
73 
74  typedef Superclass::SizeType SizeType;
75  typedef Superclass::IdentifierType IdentifierType;
76  typedef Superclass::OffsetType OffsetType;
77 
79  const std::vector<std::string> &GetText() const
80  {
81  return m_TextVector;
82  }
83  std::vector<std::string> &GetText()
84  {
85  return m_TextVector;
86  }
87 
89  void AddText(const std::string &s)
90  {
91  m_TextVector.push_back(s);
92  }
93 
94 protected:
95  PSMDOMNode() {}
96  void PrintSelf(std::ostream &os, Indent indent) const
97  { Superclass::PrintSelf(os,indent); }
98 
99 private:
103  std::vector<std::string> m_TextVector;
104 
105  PSMDOMNode(const Self &); //purposely not implemented
106  void operator=(const Self &); //purposely not implemented
107 
108 };
109 
110 } // namespace itk
111 
112 #include "itkStringTools.h"
113 #include "itkFancyString.h"
114 
115 #endif // __itkPSMDOMNode_h
Superclass::ChildrenListType ChildrenListType
Definition: itkPSMDOMNode.h:62
const std::vector< std::string > & GetText() const
Definition: itkPSMDOMNode.h:79
Superclass::AttributesListType AttributesListType
Definition: itkPSMDOMNode.h:72
Class to represent a node in the PSM Document Object Model (DOM) tree structure.
Definition: itkPSMDOMNode.h:46
void AddText(const std::string &s)
Definition: itkPSMDOMNode.h:89
Superclass::AttributeKeyType AttributeKeyType
Definition: itkPSMDOMNode.h:66
itkTypeMacro(PSMDOMNode, DOMNode)
PSMDOMNode Self
Definition: itkPSMDOMNode.h:50