casa
$Rev:20696$
|
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 () | |
VisBufferAutoPtr & | operator= (VisBufferAutoPtr &other) |
VisBuffer & | operator* () const |
VisBuffer * | operator-> () const |
VisBuffer * | get () const |
VisBuffer * | release () |
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 | |
VisBuffer * | visBuffer_p |
A convenience class to assist in migrating code to potentially use asynchronous I/O.
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.
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.
casa::VisBufferAutoPtr::VisBufferAutoPtr | ( | VisBuffer & | ) | [explicit] |
casa::VisBufferAutoPtr::VisBufferAutoPtr | ( | VisBuffer * | ) | [explicit] |
casa::VisBufferAutoPtr::VisBufferAutoPtr | ( | ROVisibilityIterator * | rovi | ) | [explicit] |
casa::VisBufferAutoPtr::VisBufferAutoPtr | ( | ROVisibilityIterator & | rovi | ) | [explicit] |
void casa::VisBufferAutoPtr::construct | ( | ROVisibilityIterator * | rovi, |
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 | ) |
void casa::VisBufferAutoPtr::set | ( | VisBuffer & | ) |
void casa::VisBufferAutoPtr::set | ( | VisBuffer * | ) |
void casa::VisBufferAutoPtr::set | ( | ROVisibilityIterator * | rovi, |
Bool | attachIt = False |
||
) |
void casa::VisBufferAutoPtr::set | ( | ROVisibilityIterator & | rovi, |
Bool | attachIt = False |
||
) |
VisBuffer* casa::VisBufferAutoPtr::visBuffer_p [private] |
Definition at line 1217 of file VisBuffer.h.