casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
casa::VisBufferAutoPtr Class Reference

A convenience class to assist in migrating code to potentially use asynchronous I/O. More...

#include <VisBuffer.h>

Public Member Functions

 VisBufferAutoPtr ()
 
 VisBufferAutoPtr (VisBufferAutoPtr &other)
 
 VisBufferAutoPtr (VisBuffer &)
 
 VisBufferAutoPtr (VisBuffer *)
 
 VisBufferAutoPtr (ROVisibilityIterator *rovi)
 
 VisBufferAutoPtr (ROVisibilityIterator &rovi)
 
 ~VisBufferAutoPtr ()
 
VisBufferAutoPtroperator= (VisBufferAutoPtr &other)
 
VisBufferoperator* () const
 
VisBufferoperator-> () const
 
VisBufferget () const
 
VisBufferrelease ()
 
void set (VisBuffer &)
 
void set (VisBuffer *)
 
void set (ROVisibilityIterator *rovi, casacore::Bool attachIt=false)
 
void set (ROVisibilityIterator &rovi, casacore::Bool attachIt=false)
 

Protected Member Functions

void construct (ROVisibilityIterator *rovi, casacore::Bool attachVi)
 
void constructVb (VisBuffer *rovi)
 

Private Attributes

VisBuffervisBuffer_p
 

Detailed Description

A convenience class to assist in migrating code to potentially use asynchronous I/O.

Prerequisite

Synopsis

When existing code is modified to potentially use asynchronous I/O the current VisBuffer usage is probably using automatic (stack) storage which will have to be replaced to allow VisBufferAsync objects (which derive from VisBuffer) to be used with asynchronous I/O. The goal of this class is to make that transition easier. The user will replace their existing declaration of a VisBuffer object with a declaration of a VisBufferAutoPtr object. Depending on the attributes of the VisBuffer reference/pointer or the ROVisibilityIterator provided in the VisBufferAutoPtr constructor, the appropriate type of VisBuffer will be created dynamically. The VisBufferAutoPtr will also function somewhat like an auto_ptr and delete the underlying object when the VisBufferAutoPtr object is destroyed.

Once the straight VisBuffer declaration is replaced, then the code in its scope will need to be modified to dereference the VisBufferAutoPtr or to delete use of the address-of operator, "&", applied to the previous VisBuffer variable. See the example below.

Example

Before adding asynchronous I/O support

VisBuffer vb (vi);

doSomething (vb); // void doSomething (VisBuffer &); doSomethingElse (& vb); // void doSomethingElse (VisBuffer *);

After adding asynchronous I/O support

VisBufferAutoPtr vb (vi);

doSomething (* vb); doSomethingElse (vb.get());

Definition at line 1198 of file VisBuffer.h.

Constructor & Destructor Documentation

casa::VisBufferAutoPtr::VisBufferAutoPtr ( )
casa::VisBufferAutoPtr::VisBufferAutoPtr ( VisBufferAutoPtr other)
casa::VisBufferAutoPtr::VisBufferAutoPtr ( VisBuffer )
explicit
casa::VisBufferAutoPtr::VisBufferAutoPtr ( VisBuffer )
explicit
casa::VisBufferAutoPtr::VisBufferAutoPtr ( ROVisibilityIterator rovi)
explicit
casa::VisBufferAutoPtr::VisBufferAutoPtr ( ROVisibilityIterator rovi)
explicit
casa::VisBufferAutoPtr::~VisBufferAutoPtr ( )

Member Function Documentation

void casa::VisBufferAutoPtr::construct ( ROVisibilityIterator rovi,
casacore::Bool  attachVi 
)
protected
void casa::VisBufferAutoPtr::constructVb ( VisBuffer rovi)
protected
VisBuffer* casa::VisBufferAutoPtr::get ( ) const
VisBuffer& casa::VisBufferAutoPtr::operator* ( ) const
VisBuffer* casa::VisBufferAutoPtr::operator-> ( ) const
VisBufferAutoPtr& casa::VisBufferAutoPtr::operator= ( VisBufferAutoPtr other)
VisBuffer* casa::VisBufferAutoPtr::release ( )
void casa::VisBufferAutoPtr::set ( VisBuffer )
void casa::VisBufferAutoPtr::set ( VisBuffer )
void casa::VisBufferAutoPtr::set ( ROVisibilityIterator rovi,
casacore::Bool  attachIt = false 
)
void casa::VisBufferAutoPtr::set ( ROVisibilityIterator rovi,
casacore::Bool  attachIt = false 
)

Member Data Documentation

VisBuffer* casa::VisBufferAutoPtr::visBuffer_p
private

Definition at line 1228 of file VisBuffer.h.


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