Class: Engine

Defined in: lib/Engine.coffee

Overview

The Engine handles how and in which order to execute operations and add operations to the HistoryBuffer.

Instance Method Summary

Constructor Details

# (void) constructor(HB, parser)

Parameters:

  • HB ( HistoryBuffer )
  • parser ( Array ) Defines how to parse encoded messages.

Instance Method Details

# (void) parseOperation(json)

Parses an operatio from the json format. It uses the specified parser in your OperationType module.

# (void) applyOpsBundle(ops_json)

Note: You must not use this method when you already have ops in your HB!

Apply a set of operations. E.g. the operations you received from another users HB.toJson().

# (void) applyOpsCheckDouble(ops_json)

Same as applyOps but operations that are already in the HB are not applied.

See also:

# (void) applyOps(ops_json)

Apply a set of operations. (Helper for using applyOp on Arrays)

See also:

# (void) applyOp(op_json)

Apply an operation that you received from another peer.

# (void) tryUnprocessed()

Call this method when you applied a new operation. It checks if operations that were previously not executable are now executable.

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: