casa
5.7.0-16
|
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, 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 | |
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());
Definition at line 1198 of file VisBuffer.h.
casa::VisBufferAutoPtr::VisBufferAutoPtr | ( | ) |
casa::VisBufferAutoPtr::VisBufferAutoPtr | ( | VisBufferAutoPtr & | other | ) |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
casa::VisBufferAutoPtr::~VisBufferAutoPtr | ( | ) |
|
protected |
|
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 |
||
) |
|
private |
Definition at line 1228 of file VisBuffer.h.