casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | List of all members
casacore::ArrayAccessor_RT< T, AxisN > Class Template Reference

Specialization for run-time axes. More...

#include <ArrayAccessor.h>

Inheritance diagram for casacore::ArrayAccessor_RT< T, AxisN >:
casacore::ArrayBaseAccessor< T >

Public Member Functions

 ArrayAccessor_RT (const AxisN ax=AxisN(0))
 Constructors. More...
 
 ArrayAccessor_RT (Array< T > &arr, const AxisN ax=AxisN(0))
 
 ArrayAccessor_RT (ArrayAccessor_RT< T, AxisN > &other)
 
 ArrayAccessor_RT (ArrayAccessor_RT< T, AxisN > &other, const AxisN ax)
 
template<uInt X>
 ArrayAccessor_RT (ArrayAccessor_RT< T, Axis< X > > &other, const AxisN ax=AxisN(0))
 
ArrayAccessor_RToperator= (const ArrayAccessor_RT< T, AxisN > &other)
 
template<uInt X>
ArrayAccessor_RToperator= (const ArrayAccessor_RT< T, Axis< X > > &other)
 
 ~ArrayAccessor_RT ()
 Destructor. More...
 
void init (const Array< T > &arr, const AxisN ax)
 (Re-)initialization to start of array (i.e. More...
 
void init (const AxisN ax)
 
void reset ()
 Reset to start of dimension or to specified pointer. More...
 
void reset (const T *p)
 
template<class X >
const T & next () const
 Indexing operations along another axis than the one of the current object. More...
 
template<class X >
T & next ()
 
template<class X >
const T & prev () const
 
template<class X >
T & prev ()
 
const T & next (const AxisN ax) const
 
T & next (const AxisN ax)
 
const T & prev (const AxisN ax) const
 
T & prev (const AxisN ax)
 
template<class X >
const T & index (const Int ix) const
 
template<class X >
T & index (const Int ix)
 
const T & index (const Int ix, const AxisN(ax)) const
 
T & index (const Int ix, const AxisN(ax))
 
Bool operator== (const ArrayAccessor_RT< T, AxisN > &other) const
 Comparisons. More...
 
Bool operator!= (const ArrayAccessor_RT< T, AxisN > &other) const
 
Bool operator== (const T *other) const
 
Bool operator!= (const T *other) const
 
- Public Member Functions inherited from casacore::ArrayBaseAccessor< T >
void operator+= (const uInt ix)
 Iterator-like operations. More...
 
void operator-= (const uInt ix)
 
void operator++ ()
 
void operator++ (int)
 
void operator-- ()
 
void operator-- (int)
 
const T & operator* () const
 Dereferencing. More...
 
T & operator* ()
 
T * data ()
 
const Array< T > & baseArray ()
 
uInt step ()
 
const T & operator[] (const Int ix) const
 Index along current axis. More...
 
T & operator[] (const Int ix)
 
const T * end ()
 End of index on line. More...
 
const T * end (const Int n)
 
const T * begin ()
 Start of index on line. More...
 
const T * begin (const Int n)
 
const T * rend ()
 End when reverse indexing. More...
 
const T * rend (const Int n)
 
const T * rbegin ()
 Begin when reverse indexing. More...
 
const T * rbegin (const Int n)
 

Private Member Functions

Int initOff (Int x, uInt ax)
 Get proper offset. More...
 
void initStep ()
 Initialize some internal values. More...
 

Additional Inherited Members

- Protected Member Functions inherited from casacore::ArrayBaseAccessor< T >
 ArrayBaseAccessor ()
 Default constructor (for use in e.g. More...
 
 ArrayBaseAccessor (const Array< T > &arr)
 Construct from an Array. More...
 
 ArrayBaseAccessor (const Array< T > &arr, const uInt ax)
 
 ArrayBaseAccessor (const ArrayBaseAccessor< T > &other)
 Copy constructor (copy semantics) More...
 
 ArrayBaseAccessor (const ArrayBaseAccessor< T > &other, const uInt ax)
 
 ~ArrayBaseAccessor ()
 Destructor. More...
 
ArrayBaseAccessoroperator= (const ArrayBaseAccessor< T > &other)
 Assignment (copy semantics) More...
 
void init (const Array< T > &arr)
 (Re-)initialize from Array More...
 
void init (const Array< T > &arr, const uInt ax)
 
void init (const uInt ax)
 
- Protected Attributes inherited from casacore::ArrayBaseAccessor< T >
const Array< T > * arrayPtr_p
 The pointer to belonging array. More...
 
uInt axis_p
 Current run-time axis. More...
 
T * ptr_p
 Current access pointer. More...
 
Int step_p
 The increment to go from one point along an axis, to the next. More...
 
const T * begin_p
 The start element of array. More...
 
const T * end_p
 The one element beyond last on line. More...
 

Detailed Description

template<class T>
class casacore::ArrayAccessor_RT< T, AxisN >

Specialization for run-time axes.

Intended use:

Public interface

Synopsis

This class is a specialization for run-time axis selection within the array accessor. The axis is specified in the constructors and in the special indexing operators (prev, next, index) with a parameter AxisN(n) in stead of a template parameter <Axis<n> >. Note that the name of the class is ArrayAccessor. The special name is only to bypass cxx2html problems with duplicate class names.

Definition at line 503 of file ArrayAccessor.h.

Constructor & Destructor Documentation

template<class T >
casacore::ArrayAccessor_RT< T, AxisN >::ArrayAccessor_RT ( const AxisN  ax = AxisN(0))
inlineexplicit

Constructors.

Definition at line 508 of file ArrayAccessor.h.

template<class T >
casacore::ArrayAccessor_RT< T, AxisN >::ArrayAccessor_RT ( Array< T > &  arr,
const AxisN  ax = AxisN(0) 
)
inlineexplicit

Definition at line 510 of file ArrayAccessor.h.

template<class T >
casacore::ArrayAccessor_RT< T, AxisN >::ArrayAccessor_RT ( ArrayAccessor_RT< T, AxisN > &  other)
inline

Definition at line 512 of file ArrayAccessor.h.

template<class T >
casacore::ArrayAccessor_RT< T, AxisN >::ArrayAccessor_RT ( ArrayAccessor_RT< T, AxisN > &  other,
const AxisN  ax 
)
inlineexplicit

Definition at line 514 of file ArrayAccessor.h.

template<class T >
template<uInt X>
casacore::ArrayAccessor_RT< T, AxisN >::ArrayAccessor_RT ( ArrayAccessor_RT< T, Axis< X > > &  other,
const AxisN  ax = AxisN(0) 
)
inlineexplicit

Definition at line 518 of file ArrayAccessor.h.

template<class T >
casacore::ArrayAccessor_RT< T, AxisN >::~ArrayAccessor_RT ( )
inline

Destructor.

Definition at line 533 of file ArrayAccessor.h.

Member Function Documentation

template<class T >
template<class X >
const T& casacore::ArrayAccessor_RT< T, AxisN >::index ( const Int  ix) const
inline

Definition at line 573 of file ArrayAccessor.h.

References N, and casacore::ptr_p.

template<class T >
template<class X >
T& casacore::ArrayAccessor_RT< T, AxisN >::index ( const Int  ix)
inline

Definition at line 576 of file ArrayAccessor.h.

References N, and casacore::ptr_p.

template<class T >
const T& casacore::ArrayAccessor_RT< T, AxisN >::index ( const Int  ix,
const   AxisNax 
) const
inline

Definition at line 578 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
T& casacore::ArrayAccessor_RT< T, AxisN >::index ( const Int  ix,
const   AxisNax 
)
inline

Definition at line 580 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
void casacore::ArrayAccessor_RT< T, AxisN >::init ( const Array< T > &  arr,
const AxisN  ax 
)
inline

(Re-)initialization to start of array (i.e.

element (0,0,0,...)) or re-initialize to an axis.

Definition at line 538 of file ArrayAccessor.h.

References casacore::ArrayBaseAccessor< T >::init().

template<class T >
void casacore::ArrayAccessor_RT< T, AxisN >::init ( const AxisN  ax)
inline

Definition at line 540 of file ArrayAccessor.h.

References casacore::ArrayBaseAccessor< T >::init().

template<class T >
Int casacore::ArrayAccessor_RT< T, AxisN >::initOff ( Int  x,
uInt  ax 
)
inlineprivate

Get proper offset.

Definition at line 596 of file ArrayAccessor.h.

template<class T >
void casacore::ArrayAccessor_RT< T, AxisN >::initStep ( )
inlineprivate

Initialize some internal values.

Definition at line 600 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
template<class X >
const T& casacore::ArrayAccessor_RT< T, AxisN >::next ( ) const
inline

Indexing operations along another axis than the one of the current object.

See for the indexing and iterator operations along the object's axis ArrayBaseAccessor

Definition at line 555 of file ArrayAccessor.h.

References N, and casacore::ptr_p.

template<class T >
template<class X >
T& casacore::ArrayAccessor_RT< T, AxisN >::next ( )
inline

Definition at line 558 of file ArrayAccessor.h.

References N, and casacore::ptr_p.

template<class T >
const T& casacore::ArrayAccessor_RT< T, AxisN >::next ( const AxisN  ax) const
inline

Definition at line 564 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
T& casacore::ArrayAccessor_RT< T, AxisN >::next ( const AxisN  ax)
inline

Definition at line 566 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
Bool casacore::ArrayAccessor_RT< T, AxisN >::operator!= ( const ArrayAccessor_RT< T, AxisN > &  other) const
inline

Definition at line 588 of file ArrayAccessor.h.

References casacore::ptr_p, and casacore::ArrayBaseAccessor< T >::ptr_p.

template<class T >
Bool casacore::ArrayAccessor_RT< T, AxisN >::operator!= ( const T *  other) const
inline

Definition at line 591 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
ArrayAccessor_RT& casacore::ArrayAccessor_RT< T, AxisN >::operator= ( const ArrayAccessor_RT< T, AxisN > &  other)
inline

Definition at line 521 of file ArrayAccessor.h.

References casacore::ArrayBaseAccessor< T >::operator=().

template<class T >
template<uInt X>
ArrayAccessor_RT& casacore::ArrayAccessor_RT< T, AxisN >::operator= ( const ArrayAccessor_RT< T, Axis< X > > &  other)
inline

Definition at line 527 of file ArrayAccessor.h.

References casacore::ArrayBaseAccessor< T >::operator=().

template<class T >
Bool casacore::ArrayAccessor_RT< T, AxisN >::operator== ( const ArrayAccessor_RT< T, AxisN > &  other) const
inline

Comparisons.

Definition at line 586 of file ArrayAccessor.h.

References casacore::ptr_p, and casacore::ArrayBaseAccessor< T >::ptr_p.

template<class T >
Bool casacore::ArrayAccessor_RT< T, AxisN >::operator== ( const T *  other) const
inline

Definition at line 590 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
template<class X >
const T& casacore::ArrayAccessor_RT< T, AxisN >::prev ( ) const
inline

Definition at line 560 of file ArrayAccessor.h.

References N, and casacore::ptr_p.

template<class T >
template<class X >
T& casacore::ArrayAccessor_RT< T, AxisN >::prev ( )
inline

Definition at line 563 of file ArrayAccessor.h.

References N, and casacore::ptr_p.

template<class T >
const T& casacore::ArrayAccessor_RT< T, AxisN >::prev ( const AxisN  ax) const
inline

Definition at line 568 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
T& casacore::ArrayAccessor_RT< T, AxisN >::prev ( const AxisN  ax)
inline

Definition at line 570 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
void casacore::ArrayAccessor_RT< T, AxisN >::reset ( )
inline

Reset to start of dimension or to specified pointer.

Definition at line 546 of file ArrayAccessor.h.

References casacore::ptr_p.

template<class T >
void casacore::ArrayAccessor_RT< T, AxisN >::reset ( const T *  p)
inline

Definition at line 547 of file ArrayAccessor.h.

References casacore::ptr_p.


The documentation for this class was generated from the following file: