18 #ifndef __itkFixedArray_h
19 #define __itkFixedArray_h
49 template<
typename TValue,
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< TValue
>( *input++ );
151 template<
typename TScalarValue >
171 template<
typename TFixedArrayValueType >
178 while ( i != this->
End() )
180 *i++ =
static_cast< TValue
>( *input++ );
207 #if defined( __GNUC__ )
208 #if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 9 )
209 #pragma GCC diagnostic push
210 #pragma GCC diagnostic ignored "-Warray-bounds"
215 #if defined( __GNUC__ )
216 #if ( __GNUC__ == 4 ) && ( __GNUC_MINOR__ == 9 )
217 #pragma GCC diagnostic pop
258 ConstReverseIterator
rBegin()
const;
260 ReverseIterator
rEnd();
262 ConstReverseIterator
rEnd()
const;
277 template<
typename TValue,
unsigned int VLength >
278 std::ostream & operator<<(std::ostream & os, const FixedArray< TValue, VLength > & arr);
281 #ifndef ITK_MANUAL_INSTANTIATION
282 #include "itkFixedArray.hxx"
ReverseIterator(Iterator i)
reference operator[](long index)
ConstReverseIterator(ConstIterator i)
const_reference operator[](unsigned short index) const
A const reverse iterator through an array.
bool operator==(const ConstReverseIterator &rit) const
ConstIterator operator--(int)
ConstReverseIterator(const ReverseIterator &rit)
bool operator==(const FixedArray &r) const
reference operator[](short index)
const_reference GetElement(unsigned short index) const
reference operator[](int index)
ConstIterator operator++()
bool operator!=(const FixedArray &r) const
const ValueType * const_pointer
reference operator[](unsigned int index)
FixedArray(const TScalarValue *r)
const ValueType & const_reference
void Fill(const ValueType &)
ConstIterator operator--()
const_reference operator[](long long index) const
bool operator==(const ReverseIterator &rit) const
Simulate a standard C array with copy semnatics.
static const unsigned int Length
static FixedArray Filled(const ValueType &)
reference operator[](unsigned short index)
reference operator[](long long index)
bool operator!=(const ReverseIterator &rit) const
const_reference operator[](short index) const
ConstIterator operator++(int)
void SetElement(unsigned short index, const_reference value)
A reverse iterator through an array.
const_reference operator[](long index) const
const_reference operator[](unsigned long index) const
bool operator!=(const ConstReverseIterator &rit) const
const_reference operator[](unsigned long long index) const
const_reference operator[](unsigned int index) const
FixedArray & operator=(const FixedArray< TFixedArrayValueType, VLength > &r)
Iterator operator->() const
const_reference operator[](int index) const
FixedArray(const FixedArray< TFixedArrayValueType, VLength > &r)
reference operator[](unsigned long long index)
static const unsigned int Dimension
ValueType CArray[VLength]
ValueType * GetDataPointer()
ConstIterator operator->() const
const ValueType & operator*() const
const ValueType * GetDataPointer() const
reference operator[](unsigned long index)
const ValueType * ConstIterator
ValueType & operator*() const