18 #ifndef __itkFixedArray_h
19 #define __itkFixedArray_h
49 template<
typename TValueType,
unsigned int VLength = 3 >
54 itkStaticConstMacro(
Length,
unsigned int, VLength);
57 itkStaticConstMacro(
Dimension,
unsigned int, VLength);
71 class ConstReverseIterator;
139 template<
typename TFixedArrayValueType >
144 while ( i != this->
End() )
146 *i++ =
static_cast< TValueType
>( *input++ );
151 template<
typename TScalarValue >
171 template<
typename TFixedArrayValueType >
178 while ( i != this->
End() )
180 *i++ =
static_cast< TValueType
>( *input++ );
246 ConstReverseIterator
rBegin()
const;
248 ReverseIterator
rEnd();
250 ConstReverseIterator
rEnd()
const;
265 template<
typename TValueType,
unsigned int VLength >
266 std::ostream & operator<<(std::ostream & os, const FixedArray< TValueType, VLength > & arr);
269 #ifndef ITK_MANUAL_INSTANTIATION
270 #include "itkFixedArray.hxx"
ConstReverseIterator(ConstIterator i)
const_reference operator[](unsigned long index) const
ConstReverseIterator(const ReverseIterator &rit)
FixedArray(const TScalarValue *r)
reference operator[](long long index)
const_reference GetElement(unsigned short index) const
ConstIterator operator++()
A const reverse iterator through an array.
static FixedArray Filled(const ValueType &)
const ValueType * GetDataPointer() const
static const unsigned int Dimension
bool operator!=(const FixedArray &r) const
reference operator[](unsigned int index)
bool operator!=(const ReverseIterator &rit) const
const_reference operator[](unsigned int index) const
reference operator[](int index)
bool operator==(const ReverseIterator &rit) const
Simulate a standard C array with copy semnatics.
const ValueType & const_reference
ConstIterator operator--()
void Fill(const ValueType &)
static const unsigned int Length
reference operator[](unsigned short index)
FixedArray & operator=(const FixedArray< TFixedArrayValueType, VLength > &r)
reference operator[](short index)
A reverse iterator through an array.
Iterator operator->() const
ValueType * GetDataPointer()
ConstIterator operator++(int)
reference operator[](unsigned long index)
bool operator!=(const ConstReverseIterator &rit) const
reference operator[](unsigned long long index)
const_reference operator[](long index) const
const_reference operator[](int index) const
void SetElement(unsigned short index, const_reference value)
const ValueType * ConstIterator
bool operator==(const FixedArray &r) const
bool operator==(const ConstReverseIterator &rit) const
reference operator[](long index)
const ValueType * const_pointer
ConstIterator operator->() const
ValueType CArray[VLength]
const_reference operator[](long long index) const
const_reference operator[](short index) const
ReverseIterator(Iterator i)
ConstIterator operator--(int)
const_reference operator[](unsigned short index) const
FixedArray(const FixedArray< TFixedArrayValueType, VLength > &r)
ValueType & operator*() const
const_reference operator[](unsigned long long index) const
const ValueType & operator*() const