#include <VisBufferImpl2Internal.h>
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 |
T | item_p |
Friends | |
class | VisBufferImpl2 |
Provides a common base class for all of the cached value classes. |
Definition at line 108 of file VisBufferImpl2Internal.h.
typedef T casa::vi::VbCacheItem< T, IsComputed >::DataType |
Definition at line 114 of file VisBufferImpl2Internal.h.
typedef void(VisBufferImpl2::* casa::vi::VbCacheItem< T, IsComputed >::Filler)(T &) const |
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 115 of file VisBufferImpl2Internal.h.
casa::vi::VbCacheItem< T, IsComputed >::VbCacheItem | ( | bool | isMutable = false |
) | [inline] |
Definition at line 117 of file VisBufferImpl2Internal.h.
virtual casa::vi::VbCacheItem< T, IsComputed >::~VbCacheItem | ( | ) | [inline, virtual] |
Definition at line 121 of file VisBufferImpl2Internal.h.
virtual void casa::vi::VbCacheItem< T, IsComputed >::appendRows | ( | Int | , | |
Bool | ||||
) | [inline, virtual] |
Noop for scalars
Implements casa::vi::VbCacheItemBase.
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 123 of file VisBufferImpl2Internal.h.
void casa::vi::VbCacheItem< T, IsComputed >::assign | ( | T & | lhs, | |
const T & | rhs | |||
) | [inline, protected] |
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 299 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::set().
virtual void casa::vi::VbCacheItem< T, IsComputed >::clear | ( | Bool | clearStatusOnly | ) | [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
Definition at line 129 of file VisBufferImpl2Internal.h.
virtual void casa::vi::VbCacheItem< T, IsComputed >::clearDirty | ( | ) | [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
Definition at line 139 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::clear().
static void casa::vi::VbCacheItem< T, IsComputed >::clearValue | ( | MDirection & | value | ) | [inline, static, protected] |
Definition at line 313 of file VisBufferImpl2Internal.h.
static void casa::vi::VbCacheItem< T, IsComputed >::clearValue | ( | Int & | value | ) | [inline, static, protected] |
Definition at line 309 of file VisBufferImpl2Internal.h.
static void casa::vi::VbCacheItem< T, IsComputed >::clearValue | ( | Array< E > & | value | ) | [inline, static, protected] |
Definition at line 305 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::clear().
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.
void casa::vi::VbCacheItem< T, IsComputed >::copyAux | ( | const VbCacheItem< T, IsComputed > * | other, | |
bool | fetchIfNeeded | |||
) | [inline, protected] |
Definition at line 355 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::copy().
virtual void casa::vi::VbCacheItem< T, IsComputed >::copyRowElement | ( | Int | , | |
Int | ||||
) | [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
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 144 of file VisBufferImpl2Internal.h.
virtual void casa::vi::VbCacheItem< T, IsComputed >::fill | ( | ) | const [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
Definition at line 148 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::get(), and casa::vi::VbCacheItem< Cube< Complex >, False >::getRef().
const T& casa::vi::VbCacheItem< T, IsComputed >::get | ( | ) | const [inline] |
Definition at line 165 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::copyAux().
T& casa::vi::VbCacheItem< T, IsComputed >::getItem | ( | ) | const [inline, protected] |
Definition at line 374 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::appendRows(), casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::copyRowElement(), casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::getShape(), 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(), and casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::shapeErrorMessage().
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().
void casa::vi::VbCacheItem< T, IsComputed >::initialize | ( | VisBufferCache * | cache, | |
VisBufferImpl2 * | vb, | |||
Filler | filler, | |||
VisBufferComponent2 | component = VisBufferComponent2::Unknown , |
|||
Bool | isKey = True | |||
) | [inline] |
Definition at line 195 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::initialize().
Bool casa::vi::VbCacheItem< T, IsComputed >::isArray | ( | ) | const [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
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 203 of file VisBufferImpl2Internal.h.
Bool casa::vi::VbCacheItem< T, IsComputed >::isDirty | ( | ) | const [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
Definition at line 209 of file VisBufferImpl2Internal.h.
Bool casa::vi::VbCacheItem< T, IsComputed >::isPresent | ( | ) | const [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
Definition at line 215 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::copyAux(), casa::vi::VbCacheItem< Cube< Complex >, False >::get(), casa::vi::VbCacheItem< Cube< Complex >, False >::getRef(), casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::set(), casa::vi::VbCacheItem< Cube< Complex >, False >::setAsPresent(), and casa::vi::VisBufferCache::sortCorrelationItem().
virtual Bool casa::vi::VbCacheItem< T, IsComputed >::isShapeOk | ( | ) | const [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
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 221 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::set().
void casa::vi::VbCacheItem< T, IsComputed >::set | ( | const U & | newItem | ) | [inline] |
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 256 of file VisBufferImpl2Internal.h.
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.
void casa::vi::VbCacheItem< T, IsComputed >::setAsPresent | ( | Bool | isPresent = True |
) | const [inline, protected, virtual] |
Implements casa::vi::VbCacheItemBase.
Definition at line 380 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::appendRows(), casa::vi::VbCacheItem< Cube< Complex >, False >::clear(), casa::vi::VbCacheItem< Cube< Complex >, False >::copyAux(), casa::vi::VbCacheItem< Cube< Complex >, False >::get(), casa::vi::VbCacheItem< Cube< Complex >, False >::getRef(), casa::vi::VbCacheItem< Cube< Complex >, False >::set(), and casa::vi::VbCacheItem< Cube< Complex >, False >::setSpecial().
virtual void casa::vi::VbCacheItem< T, IsComputed >::setDirty | ( | ) | [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
Definition at line 283 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::resizeRows().
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.
virtual String casa::vi::VbCacheItem< T, IsComputed >::shapeErrorMessage | ( | ) | const [inline, virtual] |
Implements casa::vi::VbCacheItemBase.
Definition at line 289 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItemArray< Vector< SquareMatrix< Complex, 2 > >, True >::set(), and casa::vi::VbCacheItem< Cube< Complex >, False >::set().
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.
Filler casa::vi::VbCacheItem< T, IsComputed >::filler_p [private] |
Definition at line 387 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::fill(), and casa::vi::VbCacheItem< Cube< Complex >, False >::initialize().
Bool casa::vi::VbCacheItem< T, IsComputed >::isDirty_p [mutable, private] |
Definition at line 388 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::clearDirty(), casa::vi::VbCacheItem< Cube< Complex >, False >::copyAux(), casa::vi::VbCacheItem< Cube< Complex >, False >::get(), casa::vi::VbCacheItem< Cube< Complex >, False >::getRef(), casa::vi::VbCacheItem< Cube< Complex >, False >::isDirty(), casa::vi::VbCacheItem< Cube< Complex >, False >::set(), casa::vi::VbCacheItem< Cube< Complex >, False >::setDirty(), and casa::vi::VbCacheItem< Cube< Complex >, False >::setSpecial().
Bool casa::vi::VbCacheItem< T, IsComputed >::isPresent_p [mutable, private] |
Definition at line 389 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::isPresent(), and casa::vi::VbCacheItem< Cube< Complex >, False >::setAsPresent().
T casa::vi::VbCacheItem< T, IsComputed >::item_p [mutable, private] |
Definition at line 390 of file VisBufferImpl2Internal.h.
Referenced by casa::vi::VbCacheItem< Cube< Complex >, False >::clear(), casa::vi::VbCacheItem< Cube< Complex >, False >::copyAux(), casa::vi::VbCacheItem< Cube< Complex >, False >::fill(), casa::vi::VbCacheItem< Cube< Complex >, False >::get(), casa::vi::VbCacheItem< Cube< Complex >, False >::getItem(), casa::vi::VbCacheItem< Cube< Complex >, False >::getRef(), casa::vi::VbCacheItem< Cube< Complex >, False >::set(), and casa::vi::VbCacheItem< Cube< Complex >, False >::setSpecial().