casa::vi::VbCacheItemArray< T, IsComputed > Class Template Reference

#include <VisBufferImpl2Internal.h>

Inheritance diagram for casa::vi::VbCacheItemArray< T, IsComputed >:
casa::vi::VbCacheItem< T, IsComputed > casa::vi::VbCacheItemBase

List of all members.

Public Types

typedef VbCacheItem< T >::Filler Filler
typedef T::IteratorSTL::value_type ElementType

Public Member Functions

 VbCacheItemArray (bool isMutable=false)
virtual ~VbCacheItemArray ()
virtual void appendRows (Int nRows, Bool truncate)
virtual void copyRowElement (Int sourceRow, Int destinationRow)
virtual IPosition getShape () const
void initialize (VisBufferCache *cache, VisBufferImpl2 *vb, Filler filler, VisBufferComponent2 component, ShapePattern shapePattern, Bool isKey)
virtual Bool isShapeOk () const
Bool isArray () const
void resize (Bool copyValues)
void resizeRows (Int newNRows)
virtual void set (const T &newItem)
template<typename U >
void set (const U &newItem)
virtual String shapeErrorMessage (const IPosition *badShape=0) const

Protected Member Functions

void assign (T &dst, const T &src)

Static Protected Member Functions

static void copyRowElementAux (Cube< typename T::value_type > &cube, Int sourceRow, Int destinationRow)
static void copyRowElementAux (Matrix< typename T::value_type > &matrix, Int sourceRow, Int destinationRow)
static void copyRowElementAux (Array< typename T::value_type > &array, Int sourceRow, Int destinationRow)
static void copyRowElementAux (Vector< typename T::value_type > &vector, Int sourceRow, Int destinationRow)

Private Attributes

Int capacity_p
ShapePattern shapePattern_p

Detailed Description

template<typename T, Bool IsComputed = False>
class casa::vi::VbCacheItemArray< T, IsComputed >

Definition at line 394 of file VisBufferImpl2Internal.h.


Member Typedef Documentation

template<typename T, Bool IsComputed = False>
typedef T::IteratorSTL::value_type casa::vi::VbCacheItemArray< T, IsComputed >::ElementType

Definition at line 398 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
typedef VbCacheItem<T>::Filler casa::vi::VbCacheItemArray< T, IsComputed >::Filler

Reimplemented from casa::vi::VbCacheItem< T, IsComputed >.

Definition at line 397 of file VisBufferImpl2Internal.h.


Constructor & Destructor Documentation

template<typename T, Bool IsComputed = False>
casa::vi::VbCacheItemArray< T, IsComputed >::VbCacheItemArray ( bool  isMutable = false  )  [inline]

Definition at line 400 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
virtual casa::vi::VbCacheItemArray< T, IsComputed >::~VbCacheItemArray (  )  [inline, virtual]

Definition at line 402 of file VisBufferImpl2Internal.h.


Member Function Documentation

template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItemArray< T, IsComputed >::appendRows ( Int  nRows,
Bool  truncate 
) [inline, virtual]

Only used when time averaging

This item is empty or unfillable so leave it alone.

Make any excess rows disappear with a little hack to avoid a copy. This leaves the storage unchanged and merely changes the associated bookkeeping values.

The array needs to resized to hold nRows worth of data. If the shape of the existing array is the same as the existing one ignoring the number of rows then we expect the array

Determine if the existing shape is the same as the desired shape ignoring rows. If is the same, then the existing data will need to be copied in the event that the array needs to be resized (i.e., reallocated).

Only the number of rows differs from the current shape. This call will preserve any existing data.

Since the core shape is changing, the existing data is not useful; this call will not preserve it.

Reimplemented from casa::vi::VbCacheItem< T, IsComputed >.

Definition at line 404 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
void casa::vi::VbCacheItemArray< T, IsComputed >::assign ( T &  dst,
const T &  src 
) [inline, protected]

Reimplemented from casa::vi::VbCacheItem< T, IsComputed >.

Definition at line 602 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElement ( Int  sourceRow,
Int  destinationRow 
) [inline, virtual]

Reimplemented from casa::vi::VbCacheItem< T, IsComputed >.

Definition at line 467 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux ( Vector< typename T::value_type > &  vector,
Int  sourceRow,
Int  destinationRow 
) [inline, static, protected]

Definition at line 653 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux ( Array< typename T::value_type > &  array,
Int  sourceRow,
Int  destinationRow 
) [inline, static, protected]

Definition at line 633 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux ( Matrix< typename T::value_type > &  matrix,
Int  sourceRow,
Int  destinationRow 
) [inline, static, protected]

Definition at line 622 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux ( Cube< typename T::value_type > &  cube,
Int  sourceRow,
Int  destinationRow 
) [inline, static, protected]
template<typename T, Bool IsComputed = False>
virtual IPosition casa::vi::VbCacheItemArray< T, IsComputed >::getShape (  )  const [inline, virtual]
template<typename T, Bool IsComputed = False>
void casa::vi::VbCacheItemArray< T, IsComputed >::initialize ( VisBufferCache cache,
VisBufferImpl2 vb,
Filler  filler,
VisBufferComponent2  component,
ShapePattern  shapePattern,
Bool  isKey 
) [inline]
template<typename T, Bool IsComputed = False>
Bool casa::vi::VbCacheItemArray< T, IsComputed >::isArray (  )  const [inline, virtual]

Reimplemented from casa::vi::VbCacheItem< T, IsComputed >.

Definition at line 504 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
virtual Bool casa::vi::VbCacheItemArray< T, IsComputed >::isShapeOk (  )  const [inline, virtual]

Check to see if the shape of this data item is consistent with the expected shape.

Reimplemented from casa::vi::VbCacheItem< T, IsComputed >.

Definition at line 492 of file VisBufferImpl2Internal.h.

Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::shapeErrorMessage().

template<typename T, Bool IsComputed = False>
void casa::vi::VbCacheItemArray< T, IsComputed >::resize ( Bool  copyValues  )  [inline, virtual]

Reimplemented from casa::vi::VbCacheItemBase.

Definition at line 510 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
void casa::vi::VbCacheItemArray< T, IsComputed >::resizeRows ( Int  newNRows  )  [inline, virtual]

Change the last dimension to be the new number of rows, then resize, copying values.

Reimplemented from casa::vi::VbCacheItemBase.

Definition at line 527 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
template<typename U >
void casa::vi::VbCacheItemArray< T, IsComputed >::set ( const U &  newItem  )  [inline]

Reimplemented from casa::vi::VbCacheItem< T, IsComputed >.

Definition at line 565 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItemArray< T, IsComputed >::set ( const T &  newItem  )  [inline, virtual]

Now check for a conformant shape.

Reimplemented from casa::vi::VbCacheItem< T, IsComputed >.

Definition at line 545 of file VisBufferImpl2Internal.h.

Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::set().

template<typename T, Bool IsComputed = False>
virtual String casa::vi::VbCacheItemArray< T, IsComputed >::shapeErrorMessage ( const IPosition *  badShape = 0  )  const [inline, virtual]

Definition at line 575 of file VisBufferImpl2Internal.h.


Member Data Documentation

template<typename T, Bool IsComputed = False>
Int casa::vi::VbCacheItemArray< T, IsComputed >::capacity_p [private]
template<typename T, Bool IsComputed = False>
ShapePattern casa::vi::VbCacheItemArray< T, IsComputed >::shapePattern_p [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1