casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
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

Public Types

typedef VbCacheItem< T >::Filler Filler
 
typedef T::IteratorSTL::value_type ElementType
 
- Public Types inherited from casa::vi::VbCacheItem< T, IsComputed >
typedef T DataType
 
typedef void(VisBufferImpl2::* Filler )(T &) const
 

Public Member Functions

 VbCacheItemArray (bool isMutable=false)
 
virtual ~VbCacheItemArray ()
 
virtual void appendRows (casacore::Int nRows, casacore::Bool truncate)
 
virtual void copyRowElement (casacore::Int sourceRow, casacore::Int destinationRow)
 
virtual casacore::IPosition getShape () const
 
void initialize (VisBufferCache *cache, VisBufferImpl2 *vb, Filler filler, VisBufferComponent2 component, ShapePattern shapePattern, casacore::Bool isKey)
 
virtual casacore::Bool isShapeOk () const
 
casacore::Bool isArray () const
 
void resize (casacore::Bool copyValues)
 
void resizeRows (casacore::Int newNRows)
 
virtual void set (const T &newItem)
 
template<typename U >
void set (const U &newItem)
 
virtual casacore::String shapeErrorMessage (const casacore::IPosition *badShape=0) const
 
- Public Member Functions inherited from casa::vi::VbCacheItem< T, IsComputed >
 VbCacheItem (bool isMutable=false)
 
virtual ~VbCacheItem ()
 
virtual void clear (casacore::Bool clearStatusOnly)
 
virtual void clearDirty ()
 
virtual void fill () const
 
const T & get () const
 
T & getRef (casacore::Bool fillIfAbsent=true)
 
void initialize (VisBufferCache *cache, VisBufferImpl2 *vb, Filler filler, VisBufferComponent2 component=VisBufferComponent2::Unknown, casacore::Bool isKey=true)
 
casacore::Bool isDirty () const
 
casacore::Bool isPresent () const
 
template<typename U >
void set (const U &newItem)
 
template<typename U >
void setSpecial (const U &newItem)
 
virtual void setDirty ()
 
virtual casacore::String shapeErrorMessage () const
 
- Public Member Functions inherited from casa::vi::VbCacheItemBase
 VbCacheItemBase (bool isMutable)
 
virtual ~VbCacheItemBase ()
 
VisBufferComponent2 getComponent () const
 

Protected Member Functions

void assign (T &dst, const T &src)
 
- Protected Member Functions inherited from casa::vi::VbCacheItem< T, IsComputed >
void assign (T &lhs, const T &rhs)
 
virtual void copy (const VbCacheItemBase *otherRaw, casacore::Bool fetchIfNeeded)
 
virtual void

copy (const VbCacheItemBase * otherRaw, casacore::Bool markAsCached) { Convert generic pointer to one pointint to this cache item type. More...

 
void copyAux (const VbCacheItem< T, IsComputed > *other, bool fetchIfNeeded)
 
T & getItem () const
 
void setAsPresent (casacore::Bool isPresent=true) const
 
- Protected Member Functions inherited from casa::vi::VbCacheItemBase
VisBufferImpl2getVb () const
 
virtual void initialize (VisBufferCache *cache, VisBufferImpl2 *vb, VisBufferComponent2 component, casacore::Bool isKey=true)
 
casacore::Bool isKey () const
 
bool isMutable () const
 
void setIsKey (casacore::Bool isKey)
 

Static Protected Member Functions

static void copyRowElementAux (casacore::Cube< typename T::value_type > &cube, casacore::Int sourceRow, casacore::Int destinationRow)
 
static void copyRowElementAux (casacore::Matrix< typename T::value_type > &matrix, casacore::Int sourceRow, casacore::Int destinationRow)
 
static void copyRowElementAux (casacore::Array< typename T::value_type > &array, casacore::Int sourceRow, casacore::Int destinationRow)
 
static void copyRowElementAux (casacore::Vector< typename T::value_type > &vector, casacore::Int sourceRow, casacore::Int destinationRow)
 
- Static Protected Member Functions inherited from casa::vi::VbCacheItem< T, IsComputed >
template<typename E >
static void clearValue (casacore::Array< E > &value)
 
static void clearValue (casacore::Int &value)
 
static void clearValue (casacore::MDirection &value)
 

Private Attributes

casacore::Int capacity_p
 
ShapePattern shapePattern_p
 

Detailed Description

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

Definition at line 395 of file VisBufferImpl2Internal.h.

Member Typedef Documentation

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

Definition at line 399 of file VisBufferImpl2Internal.h.

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

Definition at line 398 of file VisBufferImpl2Internal.h.

Constructor & Destructor Documentation

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

Definition at line 401 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
virtual casa::vi::VbCacheItemArray< T, IsComputed >::~VbCacheItemArray ( )
inlinevirtual

Definition at line 403 of file VisBufferImpl2Internal.h.

Member Function Documentation

template<typename T, casacore::Bool IsComputed = false>
virtual void casa::vi::VbCacheItemArray< T, IsComputed >::appendRows ( casacore::Int  nRows,
casacore::Bool  truncate 
)
inlinevirtual

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 405 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
void casa::vi::VbCacheItemArray< T, IsComputed >::assign ( T &  dst,
const T &  src 
)
inlineprotected

Definition at line 603 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
virtual void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElement ( casacore::Int  sourceRow,
casacore::Int  destinationRow 
)
inlinevirtual

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

Definition at line 468 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux ( casacore::Cube< typename T::value_type > &  cube,
casacore::Int  sourceRow,
casacore::Int  destinationRow 
)
inlinestaticprotected
template<typename T, casacore::Bool IsComputed = false>
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux ( casacore::Matrix< typename T::value_type > &  matrix,
casacore::Int  sourceRow,
casacore::Int  destinationRow 
)
inlinestaticprotected

Definition at line 623 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux ( casacore::Array< typename T::value_type > &  array,
casacore::Int  sourceRow,
casacore::Int  destinationRow 
)
inlinestaticprotected

Definition at line 634 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
static void casa::vi::VbCacheItemArray< T, IsComputed >::copyRowElementAux ( casacore::Vector< typename T::value_type > &  vector,
casacore::Int  sourceRow,
casacore::Int  destinationRow 
)
inlinestaticprotected

Definition at line 654 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
virtual casacore::IPosition casa::vi::VbCacheItemArray< T, IsComputed >::getShape ( ) const
inlinevirtual
template<typename T, casacore::Bool IsComputed = false>
void casa::vi::VbCacheItemArray< T, IsComputed >::initialize ( VisBufferCache cache,
VisBufferImpl2 vb,
Filler  filler,
VisBufferComponent2  component,
ShapePattern  shapePattern,
casacore::Bool  isKey 
)
inline

Definition at line 480 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
casacore::Bool casa::vi::VbCacheItemArray< T, IsComputed >::isArray ( ) const
inlinevirtual

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

Definition at line 505 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
virtual casacore::Bool casa::vi::VbCacheItemArray< T, IsComputed >::isShapeOk ( ) const
inlinevirtual

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 493 of file VisBufferImpl2Internal.h.

Referenced by casa::vi::VbCacheItemArray< casacore::casacore::Vector< casacore::uInt > >::shapeErrorMessage().

template<typename T, casacore::Bool IsComputed = false>
void casa::vi::VbCacheItemArray< T, IsComputed >::resize ( casacore::Bool  copyValues)
inlinevirtual

Reimplemented from casa::vi::VbCacheItemBase.

Definition at line 511 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
void casa::vi::VbCacheItemArray< T, IsComputed >::resizeRows ( casacore::Int  newNRows)
inlinevirtual

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

Reimplemented from casa::vi::VbCacheItemBase.

Definition at line 528 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
virtual void casa::vi::VbCacheItemArray< T, IsComputed >::set ( const T &  newItem)
inlinevirtual

Now check for a conformant shape.

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

Definition at line 546 of file VisBufferImpl2Internal.h.

Referenced by casa::vi::VbCacheItemArray< casacore::casacore::Vector< casacore::uInt > >::set().

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

Definition at line 566 of file VisBufferImpl2Internal.h.

template<typename T, casacore::Bool IsComputed = false>
virtual casacore::String casa::vi::VbCacheItemArray< T, IsComputed >::shapeErrorMessage ( const casacore::IPosition badShape = 0) const
inlinevirtual

Definition at line 576 of file VisBufferImpl2Internal.h.

Member Data Documentation

template<typename T, casacore::Bool IsComputed = false>
casacore::Int casa::vi::VbCacheItemArray< T, IsComputed >::capacity_p
private
template<typename T, casacore::Bool IsComputed = false>
ShapePattern casa::vi::VbCacheItemArray< T, IsComputed >::shapePattern_p
private

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