#include <VisBufferImpl2Internal.h>
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 |
Definition at line 394 of file VisBufferImpl2Internal.h.
typedef T::IteratorSTL::value_type casa::vi::VbCacheItemArray< T, IsComputed >::ElementType |
Definition at line 398 of file VisBufferImpl2Internal.h.
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.
casa::vi::VbCacheItemArray< T, IsComputed >::VbCacheItemArray | ( | bool | isMutable = false |
) | [inline] |
Definition at line 400 of file VisBufferImpl2Internal.h.
virtual casa::vi::VbCacheItemArray< T, IsComputed >::~VbCacheItemArray | ( | ) | [inline, virtual] |
Definition at line 402 of file VisBufferImpl2Internal.h.
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.
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.
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.
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.
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.
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.
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux | ( | Cube< typename T::value_type > & | cube, | |
Int | sourceRow, | |||
Int | destinationRow | |||
) | [inline, static, protected] |
Definition at line 608 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::copyRowElement().
virtual IPosition casa::vi::VbCacheItemArray< T, IsComputed >::getShape | ( | ) | const [inline, virtual] |
Definition at line 472 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::appendRows().
void casa::vi::VbCacheItemArray< T, IsComputed >::initialize | ( | VisBufferCache * | cache, | |
VisBufferImpl2 * | vb, | |||
Filler | filler, | |||
VisBufferComponent2 | component, | |||
ShapePattern | shapePattern, | |||
Bool | isKey | |||
) | [inline] |
Definition at line 479 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::initialize().
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.
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().
void casa::vi::VbCacheItemArray< T, IsComputed >::resize | ( | Bool | copyValues | ) | [inline, virtual] |
Reimplemented from casa::vi::VbCacheItemBase.
Definition at line 510 of file VisBufferImpl2Internal.h.
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.
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.
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().
virtual String casa::vi::VbCacheItemArray< T, IsComputed >::shapeErrorMessage | ( | const IPosition * | badShape = 0 |
) | const [inline, virtual] |
Definition at line 575 of file VisBufferImpl2Internal.h.
Int casa::vi::VbCacheItemArray< T, IsComputed >::capacity_p [private] |
Definition at line 660 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::resize().
ShapePattern casa::vi::VbCacheItemArray< T, IsComputed >::shapePattern_p [private] |
Definition at line 661 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::appendRows(), casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::initialize(), casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::isShapeOk(), casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::resize(), casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::resizeRows(), casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::set(), and casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::shapeErrorMessage().