Class: HistoryBuffer
Defined in: | lib/HistoryBuffer.coffee |
Overview
An object that holds all applied operations.
Instance Method Summary
- # (void) getUserId() Get the user id with wich the History Buffer was initialized.
- # (void) getOperationCounter() Get the operation counter that describes the current state of the document.
- # (void) _encode()
- # (void) getNextOperationIdentifier(user_id) Get the number of operations that were created by a user.
- # (void) getOperation(uid) Retrieve an operation from a unique id.
- # (void) addOperation(o) Add an operation to the HB.
Constructor Details
#
(void)
constructor(user_id)
Creates an empty HB.
Instance Method Details
#
(void)
getUserId()
Get the user id with wich the History Buffer was initialized.
#
(void)
getOperationCounter()
Get the operation counter that describes the current state of the document.
#
(void)
_encode()
#
(void)
getNextOperationIdentifier(user_id)
Get the number of operations that were created by a user. Accordingly you will get the next operation number that is expected from that user. This will increment the operation counter.
#
(void)
getOperation(uid)
Retrieve an operation from a unique id.
#
(void)
addOperation(o)
Add an operation to the HB. Note that this will not link it against other operations (it wont executed)