DUECA/DUSIME
|
This is a facilitator for writing multi-stream data. More...
Public Member Functions | |
MultiStreamWriter (MultiStreamWriteToken< T > &token, const TimeSpec &ts) | |
Constructor. More... | |
~MultiStreamWriter () | |
Destructor. More... | |
bool | ok () |
Check that the stream writing is OK. More... | |
This is a facilitator for writing multi-stream data.
By creating a "MultiStreamWriter", the access token is used to gain access to the data in the channel. When at the end of scope the MultiStreamWriter is destroyed, the access is released again, and the actual data is sent.
An example, suppose you have created a MultiStreamChannelWriteToken for a channel with MyData objects:
MultiStream channels work differently from Event and Stream channels, in that the data written there is persistent. The next time you create a MultiStreamWriter on a channel, the data you had written before is present (and readable) in the Writer. If you want, you can limit yourself to only writing the changes.
|
inline |
Constructor.
Gains access to the channel for which the token was made.
token | Read access token. |
ts | Time specification. |
|
inline |
Destructor.
Releases the access again with a token.
|
inline |
Check that the stream writing is OK.
Only applicable in code without exceptions.