Cue Class Reference
Namespace | ohm::flip |
Inherits from | |
Declared in | ohm/flip/Cue.h |
Companion Guide |
Overview
The Cue class implements a Flip signaling type. The following sections will only document the public API.
Partial Class Diagram

Methods Overview
Signaling
Differencing
Methods
fire
Signals a Cue.
void fire (); // 1 |
void fire (const archi::UByte * data_ptr, size_t data_size); // 2 |
The first version signals the Cue with no data. It will increment the element count, but the associated data will be empty.
The second version signals the Cue with data. It will increment the element count, and associate data to it.
was_fired
Returns true if the Cue was signaled, false otherwise.
bool was_fired () const; |
Note:Outside of an observer document_changed call, this will always return false
get_elem_cnt
Returns the number of element in the Cue when signaled.
size_t get_elem_cnt () const; |
Note:Outside of an observer document_changed call, this will always return 0
get_elem
Returns the data an direction associated to an element of the Cue when signaled. elem_nbr must verify 0 <= elem_nbr < get_elem_cnt ()
void get_elem ( |
const archi::UByte * & data_ptr, size_t & data_size, |
int & direction, size_t elem_nbr |
) const; |
If no data is associated with the Cue , data_ptr will be equal to 0 and data_size will be equal to 0 .
direction will be equal to either 1 or -1 .
A 1 , forward direction occurs when the associated transaction is executed forward, for example when receiving the Cue signal just after it was fired, when received through an external document change, or when reexecuted through a redo call on the document.
A -1 , backward direction occurs when the associated transaction is executed backward, for example when the transaction was refused by the server or when reexecuted through an undo call on the document.