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 Reference Thread-safe storage for a single data objects. More...
Detailed Descriptiontemplate<class Type> class gbxiceutilacfr::Store< Type > Thread-safe storage for a single data objects. This container is similar to a circular Buffer of size one but with two differences:
You can use this container for storing smart pointers (e.g. IceUtil smart pointers). In this case the container will only store the pointer and will not perform a deep copy. Write to it with set(). Read its contents with get(). Trying to read from an empty Store raises an gbxutilacfr::Exception.
Member Function Documentation◆ get()
template<class Type >
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(). ◆ getNext()
template<class Type >
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. ◆ isEmpty()
template<class Type >
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(). ◆ peek()
template<class Type >
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. ◆ purge()
template<class Type >
The documentation for this class was generated from the following file: |