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

#include <VisBufferImpl2Internal.h>

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

List of all members.

Public Types

typedef T DataType
typedef void(VisBufferImpl2::* Filler )(T &) const

Public Member Functions

 VbCacheItem (bool isMutable=false)
virtual ~VbCacheItem ()
virtual void appendRows (Int, Bool)
virtual void clear (Bool clearStatusOnly)
virtual void clearDirty ()
virtual void copyRowElement (Int, Int)
virtual void fill () const
const T & get () const
T & getRef (Bool fillIfAbsent=True)
void initialize (VisBufferCache *cache, VisBufferImpl2 *vb, Filler filler, VisBufferComponent2 component=VisBufferComponent2::Unknown, Bool isKey=True)
Bool isArray () const
Bool isDirty () const
Bool isPresent () const
virtual Bool isShapeOk () const
virtual void set (const T &newItem)
template<typename U >
void set (const U &newItem)
template<typename U >
void setSpecial (const U &newItem)
virtual void setDirty ()
virtual String shapeErrorMessage () const

Protected Member Functions

void assign (T &lhs, const T &rhs)
virtual void copy (const VbCacheItemBase *otherRaw, Bool fetchIfNeeded)
 virtual void copy (const VbCacheItemBase * otherRaw, Bool markAsCached) { Convert generic pointer to one pointint to this cache item type.
void copyAux (const VbCacheItem< T, IsComputed > *other, bool fetchIfNeeded)
T & getItem () const
void setAsPresent (Bool isPresent=True) const

Static Protected Member Functions

template<typename E >
static void clearValue (Array< E > &value)
static void clearValue (Int &value)
static void clearValue (MDirection &value)

Private Attributes

Filler filler_p
Bool isDirty_p
Bool isPresent_p
item_p

Friends

class VisBufferImpl2
 Provides a common base class for all of the cached value classes.

Detailed Description

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

Definition at line 108 of file VisBufferImpl2Internal.h.


Member Typedef Documentation

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

Definition at line 114 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
typedef void(VisBufferImpl2::* casa::vi::VbCacheItem< T, IsComputed >::Filler)(T &) const

Constructor & Destructor Documentation

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

Definition at line 117 of file VisBufferImpl2Internal.h.

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

Definition at line 121 of file VisBufferImpl2Internal.h.


Member Function Documentation

template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItem< T, IsComputed >::appendRows ( Int  ,
Bool   
) [inline, virtual]
template<typename T, Bool IsComputed = False>
void casa::vi::VbCacheItem< T, IsComputed >::assign ( T &  lhs,
const T &  rhs 
) [inline, protected]
template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItem< T, IsComputed >::clear ( Bool  clearStatusOnly  )  [inline, virtual]

Implements casa::vi::VbCacheItemBase.

Definition at line 129 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItem< T, IsComputed >::clearDirty (  )  [inline, virtual]
template<typename T, Bool IsComputed = False>
static void casa::vi::VbCacheItem< T, IsComputed >::clearValue ( MDirection &  value  )  [inline, static, protected]

Definition at line 313 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
static void casa::vi::VbCacheItem< T, IsComputed >::clearValue ( Int &  value  )  [inline, static, protected]

Definition at line 309 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
template<typename E >
static void casa::vi::VbCacheItem< T, IsComputed >::clearValue ( Array< E > &  value  )  [inline, static, protected]
template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItem< T, IsComputed >::copy ( const VbCacheItemBase otherRaw,
Bool  fetchIfNeeded 
) [inline, protected, virtual]

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

const VbCacheItem * other = dynamic_cast <const VbCacheItem *> (otherRaw); Assert (other != 0);

Capture the cached status of the other item

isPresent_p = other->isPresent_p;

If the other item was cached then copy it over otherwise clear out this item.

if (isPresent_p){ item_p = other->item_p; } else { item_p = T ();

if (markAsCached){ isPresent_p = True; } } }

Definition at line 347 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
void casa::vi::VbCacheItem< T, IsComputed >::copyAux ( const VbCacheItem< T, IsComputed > *  other,
bool  fetchIfNeeded 
) [inline, protected]
template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItem< T, IsComputed >::copyRowElement ( Int  ,
Int   
) [inline, virtual]
template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItem< T, IsComputed >::fill (  )  const [inline, virtual]
template<typename T, Bool IsComputed = False>
const T& casa::vi::VbCacheItem< T, IsComputed >::get (  )  const [inline]
template<typename T, Bool IsComputed = False>
T& casa::vi::VbCacheItem< T, IsComputed >::getItem (  )  const [inline, protected]
template<typename T, Bool IsComputed = False>
T& casa::vi::VbCacheItem< T, IsComputed >::getRef ( Bool  fillIfAbsent = True  )  [inline]

Caller is getting a modifiabled reference to the datum (otherwise they would use "get"): assume that it will be used to modify the datum and mark it as dirty.

Definition at line 177 of file VisBufferImpl2Internal.h.

Referenced by casa::vi::VisBufferCache::sortCorrelationItem().

template<typename T, Bool IsComputed = False>
void casa::vi::VbCacheItem< T, IsComputed >::initialize ( VisBufferCache cache,
VisBufferImpl2 vb,
Filler  filler,
VisBufferComponent2  component = VisBufferComponent2::Unknown,
Bool  isKey = True 
) [inline]
template<typename T, Bool IsComputed = False>
Bool casa::vi::VbCacheItem< T, IsComputed >::isArray (  )  const [inline, virtual]
template<typename T, Bool IsComputed = False>
Bool casa::vi::VbCacheItem< T, IsComputed >::isDirty (  )  const [inline, virtual]

Implements casa::vi::VbCacheItemBase.

Definition at line 209 of file VisBufferImpl2Internal.h.

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

Set operations to a rekeyable VB are allowed to change the shapes of the values. When T derives from Array, the assign method will use Array::assign which resizes the destination value to match the source value. For nonkeyable VBs, the normal operator= method is used which for Arrays will throw an exception when a shape incompatibility exists between the source and destination.

Reimplemented in casa::vi::VbCacheItemArray< T, IsComputed >, casa::vi::VbCacheItemArray< Cube< Bool > >, casa::vi::VbCacheItemArray< Matrix< Double > >, casa::vi::VbCacheItemArray< Vector< MDirection > >, casa::vi::VbCacheItemArray< Vector< Bool > >, casa::vi::VbCacheItemArray< Cube< Complex > >, casa::vi::VbCacheItemArray< Vector< Int > >, casa::vi::VbCacheItemArray< Vector< uInt > >, casa::vi::VbCacheItemArray< Vector< Double > >, casa::vi::VbCacheItemArray< Cube< Float > >, casa::vi::VbCacheItemArray< Vector< Float > >, casa::vi::VbCacheItemArray< Matrix< Float > >, casa::vi::VbCacheItemArray< Array< Bool > >, and casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >.

Definition at line 227 of file VisBufferImpl2Internal.h.

template<typename T, Bool IsComputed = False>
void casa::vi::VbCacheItem< T, IsComputed >::setAsPresent ( Bool  isPresent = True  )  const [inline, protected, virtual]
template<typename T, Bool IsComputed = False>
virtual void casa::vi::VbCacheItem< T, IsComputed >::setDirty (  )  [inline, virtual]
template<typename T, Bool IsComputed = False>
template<typename U >
void casa::vi::VbCacheItem< T, IsComputed >::setSpecial ( const U &  newItem  )  [inline]

For internal use for items which aren't really demand-fetched

Definition at line 273 of file VisBufferImpl2Internal.h.

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

Friends And Related Function Documentation

template<typename T, Bool IsComputed = False>
friend class VisBufferImpl2 [friend]

Provides a common base class for all of the cached value classes.

This is required because the actualy value classes use a template to capture the underlying value type.

Reimplemented from casa::vi::VbCacheItemBase.

Definition at line 110 of file VisBufferImpl2Internal.h.


Member Data Documentation

template<typename T, Bool IsComputed = False>
Filler casa::vi::VbCacheItem< T, IsComputed >::filler_p [private]
template<typename T, Bool IsComputed = False>
Bool casa::vi::VbCacheItem< T, IsComputed >::isDirty_p [mutable, private]
template<typename T, Bool IsComputed = False>
Bool casa::vi::VbCacheItem< T, IsComputed >::isPresent_p [mutable, private]
template<typename T, Bool IsComputed = False>
T casa::vi::VbCacheItem< T, IsComputed >::item_p [mutable, 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