18 #ifndef __itkPSMContainer_h 19 #define __itkPSMContainer_h 21 #include "itkDataObject.h" 23 #include "itkWeakPointer.h" 24 #include "itkCommand.h" 25 #include "itkPSMAttribute.h" 48 typedef DataObject Superclass;
49 typedef SmartPointer<Self> Pointer;
50 typedef SmartPointer<const Self> ConstPointer;
51 typedef WeakPointer<const Self> ConstWeakPointer;
64 inline bool operator()(
unsigned int a,
unsigned int b)
const 69 typedef std::map<unsigned int, T, ltcmp>
MapType;
76 typedef typename MapType::const_iterator Superclass;
77 ConstIterator(
const typename MapType::const_iterator &o) : Superclass(o) {}
80 inline const T &operator*()
const 81 {
return Superclass::operator*().second; }
82 inline unsigned long int GetIndex()
const 83 {
return Superclass::operator*().first; }
91 typedef typename MapType::iterator Superclass;
92 Iterator(
const typename MapType::iterator &o) : Superclass(o) {}
95 inline T &operator*()
const 96 {
return Superclass::operator*().second; }
98 inline unsigned long int GetIndex()
const 99 {
return Superclass::operator*().first; }
110 {
return m_Map.begin(); }
111 inline typename MapType::const_iterator GetMapEnd()
const 112 {
return m_Map.end(); }
113 inline typename MapType::iterator GetMapBegin()
114 {
return m_Map.begin(); }
115 inline typename MapType::iterator GetMapEnd()
116 {
return m_Map.end(); }
120 inline T &
operator[](
const unsigned long int &k) {
return m_Map[k]; }
121 inline const T&operator[](
const unsigned long int &k)
const {
return m_Map[k]; }
126 if ( m_Map.find(k) != m_Map.end())
return true;
131 unsigned long int GetSize()
const {
return m_Map.size(); }
135 typename MapType::size_type
Erase(
const unsigned int &k )
136 {
return m_Map.erase(k); }
140 void PrintSelf(std::ostream& os, Indent indent)
const 142 Superclass::PrintSelf(os,indent);
144 os << indent <<
"PSMContainer: " << std::endl;
153 void operator=(
const Self&);
MapType::size_type Erase(const unsigned int &k)
bool HasIndex(unsigned long int k) const
ConstIterator GetBegin() const
unsigned long int GetSize() const
MapType::const_iterator GetMapBegin() const
T & operator[](const unsigned long int &k)
A container class that holds particle position information for the PSMParticleSystem class...
std::map< unsigned int, T, ltcmp > MapType