38#ifndef __itkVectorDataContainer_h
39#define __itkVectorDataContainer_h
41#include "itkDataObject.h"
42#include "itkObjectFactory.h"
73typename TElementIdentifier,
78 public std::vector< TElement >
113 template<
typename InputIterator >
159 Iterator & operator*() {
return *
this; }
160 Iterator * operator->() {
return this; }
161 Iterator & operator++() { ++m_Pos; ++m_Iter;
return *
this; }
162 Iterator operator++(
int ) {
Iterator temp( *
this ); ++m_Pos; ++m_Iter;
return temp; }
163 Iterator operator+=(
int j ){ m_Pos += j; m_Iter += j;
return *
this; }
164 Iterator operator-=(
int j ){ m_Pos -= j; m_Iter -= j;
return *
this; }
165 Iterator & operator--() { --m_Pos; --m_Iter;
return *
this; }
166 Iterator operator--(
int ) {
Iterator temp( *
this ); --m_Pos; --m_Iter;
return temp; }
177 Element & Value(
void )
const {
return *m_Iter; }
198 ConstIterator & operator++() { ++m_Pos; ++m_Iter;
return *
this; }
200 ConstIterator operator+=(
int j ){ m_Pos += j; m_Iter += j;
return *
this; }
201 ConstIterator operator-=(
int j ){ m_Pos -= j; m_Iter -= j;
return *
this; }
202 ConstIterator & operator--() { --m_Pos; --m_Iter;
return *
this; }
205 ConstIterator & operator=(
const Iterator & r ) { m_Pos = r.m_Pos; m_Iter = r.m_Iter;
return *
this; }
216 const Element & Value(
void )
const {
return *m_Iter; }
324 unsigned long Size(
void )
const;
354#ifndef ITK_MANUAL_INSTANTIATION
355#include "itkVectorDataContainer.hxx"
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
SmartPointer< Self > Pointer
std::vector< Element > VectorType
VectorType::iterator VectorIterator
void InsertElement(ElementIdentifier, Element)
void CreateIndex(ElementIdentifier)
VectorType STLContainerType
ConstIterator Begin(void) const
void DeleteIndex(ElementIdentifier)
friend class ConstIterator
TElementIdentifier ElementIdentifier
VectorType::const_iterator VectorConstIterator
VectorType::size_type size_type
Element GetElement(ElementIdentifier) const
VectorDataContainer(size_type n, const Element &x)
VectorDataContainer(InputIterator first, InputIterator last)
const Element & ElementAt(ElementIdentifier) const
ConstIterator End(void) const
void Initialize(void) override
Element & CreateElementAt(ElementIdentifier)
SmartPointer< const Self > ConstPointer
VectorDataContainer(size_type n)
void Reserve(ElementIdentifier)
STLContainerType & CastToSTLContainer()
bool GetElementIfIndexExists(ElementIdentifier, Element *) const
bool IndexExists(ElementIdentifier) const
VectorDataContainer(const Self &r)
Element & ElementAt(ElementIdentifier)
void SetElement(ElementIdentifier, Element)
unsigned long Size(void) const
const STLContainerType & CastToSTLConstContainer() const
bool ITKOpenCL_EXPORT operator==(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
bool ITKOpenCL_EXPORT operator!=(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)