INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
gbxiceutilacfr::Store< Type > Class Template ReferenceThread-safe storage for a single data objects. More...
Detailed Descriptiontemplate<class Type>
Thread-safe storage for a single data objects.
|
void gbxiceutilacfr::Store< Type >::get | ( | Type & | obj | ) | [inline] |
Returns the contents of the Store. This operation makes the data in the Store "not new", i.e. isNewData returns FALSE. Calls to get() when the Store is empty raises an gbxutilacfr::Exception exception.
Referenced by gbxsmartbatteryacfr::OceanServer::getData(), and gbxsmartbatteryacfr::OceanServer::walk().
int gbxiceutilacfr::Store< Type >::getNext | ( | Type & | obj, | |
int | timeoutMs = -1 | |||
) | [inline] |
Waits until the next update and returns the new value. If the Store is empty, getNext blocks until the Store is set and returns the new value. By default, there is no timeout (negative value). Returns 0 if successful.
If timeout is set to a positive value (in milliseconds) and the wait times out, the function returns -1 and the object argument itself is not touched. In the rare event of spurious wakeup, the return value is 1.
bool gbxiceutilacfr::Store< Type >::isEmpty | ( | ) | const [inline] |
Returns TRUE if there's something in the Store. The Store starts its life empty but after the object is set once, it will be non-empty again until purge() is called.
Referenced by gbxsmartbatteryacfr::OceanServer::getData(), gbxsmartbatteryacfr::OceanServer::haveData(), and gbxsmartbatteryacfr::OceanServer::walk().
void gbxiceutilacfr::Store< Type >::peek | ( | Type & | obj | ) | const [inline] |
Returns the contents of the Store. This operation does not modify anything, i.e. the contents of the store remain "new" (unlike get()). Calls to peek() when the Store is empty raises an gbxutilacfr::Exception exception.
void gbxiceutilacfr::Store< Type >::purge | ( | ) | [inline] |