casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Private Attributes
casa::VisBufferAutoPtr Class Reference

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

#include <VisBuffer.h>

List of all members.

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, Bool attachIt=False)
void set (ROVisibilityIterator &rovi, Bool attachIt=False)

Protected Member Functions

void construct (ROVisibilityIterator *rovi, 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());

</code>

Definition at line 1187 of file VisBuffer.h.


Constructor & Destructor Documentation


Member Function Documentation

void casa::VisBufferAutoPtr::construct ( ROVisibilityIterator rovi,
Bool  attachVi 
) [protected]
void casa::VisBufferAutoPtr::constructVb ( VisBuffer rovi) [protected]
VisBuffer& casa::VisBufferAutoPtr::operator* ( ) const
VisBuffer* casa::VisBufferAutoPtr::operator-> ( ) const
VisBufferAutoPtr& casa::VisBufferAutoPtr::operator= ( VisBufferAutoPtr other)
void casa::VisBufferAutoPtr::set ( ROVisibilityIterator rovi,
Bool  attachIt = False 
)
void casa::VisBufferAutoPtr::set ( ROVisibilityIterator rovi,
Bool  attachIt = False 
)

Member Data Documentation

Definition at line 1217 of file VisBuffer.h.


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