The class used to implement RAII for data uploading. More...
Public Types | |
typedef DataType_t | DataType |
The type of data being exchanged. More... | |
Public Member Functions | |
DatumToUpload (DataUploader< DataType > &uploader) | |
Constructor. More... | |
~DatumToUpload () | |
Destructor. More... | |
operator bool () const | |
Cast to bool. More... | |
const DataType * | operator-> () const |
Overloading of the -> operator to access the datum (const version) More... | |
DataType * | operator-> () |
Overloading of the -> operator to access the datum. More... | |
bool | operator== (const DataType *other) const |
Comparison operator with a pointer to DataType. More... | |
void | uploadDatum () |
Uploads the datum. More... | |
Detailed Description
template<class DataType_t>
class farsa::DatumToUpload< DataType_t >
The class used to implement RAII for data uploading.
A helper class to ease the creation and upload of a datum: the datum is created when this object is created and it is uploaded when this object is destroyed. See dataexchange.h for more information
- Warning
- Functions in this class are NOT thread safe
Definition at line 228 of file dataexchange.h.
Member Typedef Documentation
typedef DataType_t DataType |
The type of data being exchanged.
Definition at line 454 of file dataexchange.h.
Constructor & Destructor Documentation
|
inline |
Constructor.
- Parameters
-
uploader the uploader that has to upload a new datum
Definition at line 462 of file dataexchange.h.
|
inline |
Destructor.
Uploads the datum if it hasn't been uploaded yet
Definition at line 474 of file dataexchange.h.
Member Function Documentation
|
inline |
Cast to bool.
- Returns
- true if the datum pointer is non-null
Definition at line 530 of file dataexchange.h.
|
inline |
Overloading of the -> operator to access the datum (const version)
- Returns
- a const pointer to the datum
Definition at line 499 of file dataexchange.h.
|
inline |
Overloading of the -> operator to access the datum.
- Returns
- a pointer to the datum
Definition at line 509 of file dataexchange.h.
|
inline |
Comparison operator with a pointer to DataType.
- Parameters
-
other a pointer to DataType
- Returns
- true if the two pointer are the same
Definition at line 520 of file dataexchange.h.
|
inline |
Uploads the datum.
From this point on the datum pointer will be NULL
Definition at line 484 of file dataexchange.h.
The documentation for this class was generated from the following file:
- utilities/include/dataexchange.h