37#ifndef itkVectorDataContainer_h
38#define itkVectorDataContainer_h
40#include "itkDataObject.h"
41#include "itkObjectFactory.h"
71template <
typename TElementIdentifier,
typename TElement>
74 ,
public std::vector<TElement>
114 template <
typename InputIterator>
143 const STLContainerType &
151 friend class Iterator;
152 friend class ConstIterator;
159 Iterator() =
default;
165 Iterator & operator*() {
return *
this; }
166 Iterator * operator->() {
return this; }
177 Iterator temp(*
this);
206 Iterator temp(*
this);
215 return m_Iter == r.m_Iter;
220 return m_Iter != r.m_Iter;
225 return m_Iter == r.m_Iter;
230 return m_Iter != r.m_Iter;
237 return static_cast<ElementIdentifier
>(m_Pos);
249 VectorIterator m_Iter;
250 friend class ConstIterator;
258 ConstIterator() =
default;
259 ConstIterator(size_type d,
const VectorConstIterator & i)
263 ConstIterator(
const Iterator & r)
269 ConstIterator & operator*() {
return *
this; }
270 ConstIterator * operator->() {
return this; }
281 ConstIterator temp(*
this);
310 ConstIterator temp(*
this);
317 operator=(
const Iterator & r)
327 return m_Iter == r.m_Iter;
332 return m_Iter != r.m_Iter;
337 return m_Iter == r.m_Iter;
342 return m_Iter != r.m_Iter;
349 return static_cast<ElementIdentifier
>(m_Pos);
361 VectorConstIterator m_Iter;
362 friend class Iterator;
501#ifndef ITK_MANUAL_INSTANTIATION
502# include "itkVectorDataContainer.hxx"
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
void Initialize() override
VectorType STLContainerType
void InsertElement(ElementIdentifier, Element)
void CreateIndex(ElementIdentifier)
unsigned long Size() const
typename VectorType::size_type size_type
void DeleteIndex(ElementIdentifier)
typename VectorType::iterator VectorIterator
TElementIdentifier ElementIdentifier
ConstIterator End() const
Element GetElement(ElementIdentifier) const
VectorDataContainer(size_type n, const Element &x)
VectorDataContainer(InputIterator first, InputIterator last)
const Element & ElementAt(ElementIdentifier) const
ConstIterator Begin() const
SmartPointer< const Self > ConstPointer
Element & CreateElementAt(ElementIdentifier)
VectorDataContainer(size_type n)
void Reserve(ElementIdentifier)
STLContainerType & CastToSTLContainer()
bool GetElementIfIndexExists(ElementIdentifier, Element *) const
bool IndexExists(ElementIdentifier) const
VectorDataContainer(const Self &r)
typename VectorType::const_iterator VectorConstIterator
Element & ElementAt(ElementIdentifier)
void SetElement(ElementIdentifier, Element)
const STLContainerType & CastToSTLConstContainer() const
std::vector< Element > VectorType
bool ITKOpenCL_EXPORT operator==(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)
bool ITKOpenCL_EXPORT operator!=(const OpenCLCommandQueue &lhs, const OpenCLCommandQueue &rhs)