iwc client fixes
This commit is contained in:
parent
8169b17eb4
commit
5ba735701c
@ -1,3 +0,0 @@
|
||||
[Dolphin]
|
||||
Timestamp=2014,7,25,13,13,54
|
||||
Version=3
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "Yatta!"
|
||||
, "files": [ { "git": 1 } ]
|
||||
}
|
@ -37,7 +37,7 @@ module.exports = (grunt) ->
|
||||
all:
|
||||
src: ['test/**/*.coffee']
|
||||
options:
|
||||
timeout: 3000
|
||||
timeout: 9999999
|
||||
ignoreLeaks: false
|
||||
ui: 'bdd'
|
||||
reporter: 'list'
|
||||
@ -67,7 +67,7 @@ module.exports = (grunt) ->
|
||||
extras: ["LICENSE-LGPL"]
|
||||
#undocumented: yes
|
||||
verbose: false
|
||||
stats: false
|
||||
stats: true
|
||||
src: ["./lib"]
|
||||
browserify:
|
||||
dist:
|
||||
|
@ -371,8 +371,8 @@ module.exports = function(HB) {
|
||||
parser = {};
|
||||
execution_listener = [];
|
||||
Operation = (function() {
|
||||
function Operation(_arg) {
|
||||
this.creator = _arg['creator'], this.op_number = _arg['op_number'];
|
||||
function Operation(uid) {
|
||||
this.creator = uid['creator'], this.op_number = uid['op_number'];
|
||||
}
|
||||
|
||||
Operation.prototype.getUid = function() {
|
||||
@ -457,9 +457,9 @@ module.exports = function(HB) {
|
||||
return Delete;
|
||||
|
||||
})(Operation);
|
||||
parser['Delete'] = function(_arg) {
|
||||
parser['Delete'] = function(o) {
|
||||
var deletes_uid, uid;
|
||||
uid = _arg['uid'], deletes_uid = _arg['deletes'];
|
||||
uid = o['uid'], deletes_uid = o['deletes'];
|
||||
return new Delete(uid, deletes_uid);
|
||||
};
|
||||
Insert = (function(_super) {
|
||||
@ -678,14 +678,13 @@ module.exports = function(HB) {
|
||||
if (typeof content === 'string') {
|
||||
word = HB.addOperation(new types.Word(HB.getNextOperationIdentifier(), content)).execute();
|
||||
JsonType.__super__.val.call(this, name, word);
|
||||
return content;
|
||||
} else if (typeof content === 'object') {
|
||||
json = HB.addOperation(JsonType(HB.getNextOperationIdentifier(), content)).execute();
|
||||
JsonType.__super__.val.call(this, name, json);
|
||||
return content;
|
||||
} else {
|
||||
throw new Error("You must not set " + (typeof content) + "-types in collaborative Json-objects!");
|
||||
}
|
||||
return this;
|
||||
} else {
|
||||
return JsonType.__super__.val.call(this, name, content);
|
||||
}
|
||||
|
@ -21,9 +21,9 @@ DUIClient = function(){
|
||||
var that = this;
|
||||
var _iwcClient = new iwc.Client(["*"]);
|
||||
_iwcClient._componentName = "duiclient-"+_widgetId;
|
||||
|
||||
|
||||
this.externalCallback = function(intent){};
|
||||
|
||||
|
||||
/**
|
||||
* The target function when the intent is for updating widget state request
|
||||
*/
|
||||
@ -35,6 +35,9 @@ DUIClient = function(){
|
||||
this.updateState(intent);
|
||||
};
|
||||
|
||||
this.getIwcClient = function(){
|
||||
return _iwcClient;
|
||||
}
|
||||
/**
|
||||
* The target function when the intent is for getting the current widget state.<br/>
|
||||
* The intent.extras object here is always a Json object.
|
||||
@ -47,7 +50,7 @@ DUIClient = function(){
|
||||
forMigration = true;
|
||||
}
|
||||
var states = this.getWidgetState(forMigration);
|
||||
|
||||
|
||||
var resIntent = {};
|
||||
if (forMigration)
|
||||
resIntent = {
|
||||
@ -67,10 +70,10 @@ DUIClient = function(){
|
||||
"dataType":"",
|
||||
"extras":{"widgetId": _widgetId, "widgetStates": states}
|
||||
};
|
||||
|
||||
|
||||
_iwcClient.publish(resIntent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The target function when the intent is to inform a change in the scope of the application
|
||||
*/
|
||||
@ -85,7 +88,7 @@ DUIClient = function(){
|
||||
console.log("do sth before the widget is removed");
|
||||
this.prepareMigration();
|
||||
};
|
||||
|
||||
|
||||
this._logOff = function(intent){
|
||||
var states = this.getWidgetState(false);
|
||||
resIntent = {
|
||||
@ -96,10 +99,10 @@ DUIClient = function(){
|
||||
"dataType":"",
|
||||
"extras":{"widgetId": _widgetId, "widgetStates": states}
|
||||
};
|
||||
|
||||
|
||||
_iwcClient.publish(resIntent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The intent dispatcher and the callback function connected to the private field of iwc.Client.onIntent.<br/>
|
||||
* This function is called once an intent is received by the iwc.Client and passed the first level filter of the iwc.Client.<br/>
|
||||
@ -109,7 +112,7 @@ DUIClient = function(){
|
||||
that.externalCallback(intent);
|
||||
//does not accept global intents(global intents are processed by normal iwc.Client, normal iwc.Proxy and DUI manager)
|
||||
//does not accept intents that are not categorized as "DUI"
|
||||
if ((typeof intent.flags != "undefined" && intent.flags.indexOf("PUBLISH_GLOBAL")!=-1)
|
||||
if ((typeof intent.flags != "undefined" && intent.flags.indexOf("PUBLISH_GLOBAL")!=-1)
|
||||
|| typeof intent.categories == "undefined" || intent.categories.indexOf("DUI") == -1)
|
||||
return;
|
||||
//then does not accept intents for other widgets
|
||||
@ -128,7 +131,7 @@ DUIClient = function(){
|
||||
that._prepareMigration(intent);
|
||||
return;
|
||||
}
|
||||
}else if (typeof intent.extras.widgetId == "undefined"){
|
||||
}else if (typeof intent.extras.widgetId == "undefined"){
|
||||
if (action == "DUI_LOG_OFF"){
|
||||
that._logOff(intent);
|
||||
return;
|
||||
@ -146,11 +149,11 @@ DUIClient = function(){
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
_iwcClient.connect(_iwcCallback);
|
||||
|
||||
|
||||
//remember to bind(this) the function when override
|
||||
|
||||
|
||||
/**
|
||||
* The function is called when the dui manager wants the widget states.<br/>
|
||||
* <strong>Notice</strong>: avoid putting complex data and data structure to the state value, the browser and Java JSON encoder and parser might cause inconsistent input and output.
|
||||
@ -160,9 +163,9 @@ DUIClient = function(){
|
||||
this.getWidgetState = function(isForMigration){
|
||||
console.log("the widget collects it is state and return, overwrite it");
|
||||
var states = {};
|
||||
return states;
|
||||
return states;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The function is called when there detected a application state change at the dui manager and the manager informs the widget about the change.<br/>
|
||||
* Override this function to apply changes to the widget according to the valuable application state changes.<br/>
|
||||
@ -196,7 +199,7 @@ DUIClient = function(){
|
||||
/**
|
||||
* The function is called when the dui manager asks the widget to update its states.<br/>
|
||||
* Compared to the function DUIClient.finishMigration(), this is a typical normal state update for active widget on presence.<br/>
|
||||
* This method will be called as a callback for DUIClient#requireWidgetState(); or DUIClient#initOK() when it is not a migration.
|
||||
* This method will be called as a callback for DUIClient#requireWidgetState(); or DUIClient#initOK() when it is not a migration.
|
||||
* Override this method to perform state update for each different widget.
|
||||
* @param intent The Intent object that contains infos of required widget states, the infos are in intent.extras.widgetStates e.g. {"state1":value1,"state2":value2}.
|
||||
* The object might contain appStates as well if there is any application state, get it in intent.extras.appStates e.g. {"appstate1":value1,"appstate2":value2}.
|
||||
@ -210,7 +213,7 @@ DUIClient = function(){
|
||||
console.log(appStates);
|
||||
console.log("update the widget state, widget need to overwrite it");
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The function is called to finish the Migration and update the widget state.<br/>
|
||||
* Compared to the method DUIClient.updateState(), this method is a special widget state update for the widget that has just migrated.<br/>
|
||||
@ -227,10 +230,10 @@ DUIClient = function(){
|
||||
console.log(appStates);
|
||||
console.log("the migration is done, the widget may need to perform special inits before update the widget state e.g. login to the lasServer again.");
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The function to signal the dui manager that the preparation for the migration is ready on this widget.<br/>
|
||||
* This function should be called at the end of the overwritten function {@link DUIClient#prepareMigration}<br/>
|
||||
* This function should be called at the end of the overwritten function {@link DUIClient#prepareMigration}<br/>
|
||||
* Do not override this method unless there is really an unstoppable reason.
|
||||
*/
|
||||
this.prepareMigDone = function(){
|
||||
@ -263,7 +266,7 @@ DUIClient = function(){
|
||||
};
|
||||
_iwcClient.publish(intent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* An open interface to send any intent
|
||||
*/
|
||||
@ -271,7 +274,7 @@ DUIClient = function(){
|
||||
//or to send the intent to "duimanager"
|
||||
_iwcClient.publish(intent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* This function asks the framework for the states stored on the server.
|
||||
* Do not override it.
|
||||
@ -287,7 +290,7 @@ DUIClient = function(){
|
||||
};
|
||||
_iwcClient.publish(intent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Store the global app state
|
||||
* @param states the app state to be stored e.g. {"state1":value1, "state2":value2}
|
||||
@ -303,7 +306,7 @@ DUIClient = function(){
|
||||
};
|
||||
_iwcClient.publish(intent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Ask the dui manager for the app state.
|
||||
*/
|
||||
@ -317,15 +320,15 @@ DUIClient = function(){
|
||||
};
|
||||
_iwcClient.publish(intent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Override this function to do something when the requested app state comes.
|
||||
* @param appStates the json format of the app state:{"name1": value1, "name2": value2};
|
||||
*/
|
||||
this.onAppState = function(appStates){};
|
||||
|
||||
|
||||
/**
|
||||
* call this function to register the duiclient to duimanager after all things are OK
|
||||
* call this function to register the duiclient to duimanager after all things are OK
|
||||
*/
|
||||
this.initOK = function(){
|
||||
var okIntent = {
|
||||
@ -334,12 +337,12 @@ DUIClient = function(){
|
||||
"component": "duimanager",// the overwritten dui manager from the iwc.Proxy should have the _componentName set to "duimanager"
|
||||
"data":"",
|
||||
"dataType":"",
|
||||
"extras":{"widgetId": _widgetId}
|
||||
"extras":{"widgetId": _widgetId}
|
||||
};
|
||||
|
||||
|
||||
_iwcClient.publish(okIntent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* publish the intent in the domain of the user only
|
||||
*/
|
||||
@ -355,7 +358,7 @@ DUIClient = function(){
|
||||
_iwcClient.publish(intent);
|
||||
_iwcClient.publish(wrap);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* register the call back function of the widget to the DUI client.
|
||||
*/
|
||||
|
@ -409,8 +409,8 @@ module.exports = function(HB) {
|
||||
parser = {};
|
||||
execution_listener = [];
|
||||
Operation = (function() {
|
||||
function Operation(_arg) {
|
||||
this.creator = _arg['creator'], this.op_number = _arg['op_number'];
|
||||
function Operation(uid) {
|
||||
this.creator = uid['creator'], this.op_number = uid['op_number'];
|
||||
}
|
||||
|
||||
Operation.prototype.getUid = function() {
|
||||
@ -495,9 +495,9 @@ module.exports = function(HB) {
|
||||
return Delete;
|
||||
|
||||
})(Operation);
|
||||
parser['Delete'] = function(_arg) {
|
||||
parser['Delete'] = function(o) {
|
||||
var deletes_uid, uid;
|
||||
uid = _arg['uid'], deletes_uid = _arg['deletes'];
|
||||
uid = o['uid'], deletes_uid = o['deletes'];
|
||||
return new Delete(uid, deletes_uid);
|
||||
};
|
||||
Insert = (function(_super) {
|
||||
@ -716,14 +716,13 @@ module.exports = function(HB) {
|
||||
if (typeof content === 'string') {
|
||||
word = HB.addOperation(new types.Word(HB.getNextOperationIdentifier(), content)).execute();
|
||||
JsonType.__super__.val.call(this, name, word);
|
||||
return content;
|
||||
} else if (typeof content === 'object') {
|
||||
json = HB.addOperation(JsonType(HB.getNextOperationIdentifier(), content)).execute();
|
||||
JsonType.__super__.val.call(this, name, json);
|
||||
return content;
|
||||
} else {
|
||||
throw new Error("You must not set " + (typeof content) + "-types in collaborative Json-objects!");
|
||||
}
|
||||
return this;
|
||||
} else {
|
||||
return JsonType.__super__.val.call(this, name, content);
|
||||
}
|
||||
@ -13200,156 +13199,142 @@ Yatta = require("../lib/Frameworks/JsonYatta.coffee");
|
||||
|
||||
Connector_uninitialized = require("../lib/Connectors/TestConnector.coffee");
|
||||
|
||||
describe("JsonYatta", function() {
|
||||
beforeEach(function(done) {
|
||||
var i, _i, _ref;
|
||||
this.last_user = 10;
|
||||
this.users = [];
|
||||
this.Connector = Connector_uninitialized(this.users);
|
||||
for (i = _i = 0, _ref = this.last_user + 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
|
||||
this.users.push(new Yatta(i, this.Connector));
|
||||
}
|
||||
return done();
|
||||
});
|
||||
return it("can handle many engines, many operations, concurrently (random)", function() {
|
||||
var Connector, applyRandomOp, doSomething, doSomething_amount, found_error, generateDeleteOp, generateInsertOp, generateRandomOp, generateReplaceOp, i, j, number_of_created_operations, number_of_engines, number_of_test_cases_multiplier, ops, ops_per_msek, printOpsInExecutionOrder, repeat_this, time_now, times, u, user, user_number, users, _i, _j, _k, _l, _len, _m, _ref, _results;
|
||||
number_of_test_cases_multiplier = 1;
|
||||
repeat_this = 1 * number_of_test_cases_multiplier;
|
||||
doSomething_amount = 200 * number_of_test_cases_multiplier;
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1;
|
||||
this.time = 0;
|
||||
this.ops = 0;
|
||||
users = [];
|
||||
generateInsertOp = function(user_num) {
|
||||
var chars, length, nextchar, pos, text;
|
||||
chars = "1234567890";
|
||||
pos = _.random(0, users[user_num].val('name').length - 1);
|
||||
length = 1;
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
users[user_num].val('name').insertText(pos, text);
|
||||
return null;
|
||||
};
|
||||
generateReplaceOp = function(user_num) {
|
||||
var chars, length, nextchar, text;
|
||||
chars = "abcdefghijklmnopqrstuvwxyz";
|
||||
length = _.random(0, 10);
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
return users[user_num].val('name').replaceText(text);
|
||||
};
|
||||
generateDeleteOp = function(user_num) {
|
||||
var length, ops1, pos;
|
||||
if (users[user_num].val('name').val().length > 0) {
|
||||
pos = _.random(0, users[user_num].val('name').val().length - 1);
|
||||
length = 1;
|
||||
ops1 = users[user_num].val('name').deleteText(pos, length);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
generateRandomOp = function(user_num) {
|
||||
var i, op, op_gen;
|
||||
op_gen = [generateDeleteOp, generateInsertOp, generateReplaceOp];
|
||||
i = _.random(op_gen.length - 1);
|
||||
return op = op_gen[i](user_num);
|
||||
};
|
||||
applyRandomOp = function(user_num) {
|
||||
var user;
|
||||
user = users[user_num];
|
||||
return user.getConnector().flushOneRandom();
|
||||
};
|
||||
doSomething = (function() {
|
||||
return function() {
|
||||
var choice, choices, user_num;
|
||||
user_num = _.random(number_of_engines - 1);
|
||||
choices = [applyRandomOp, generateRandomOp];
|
||||
choice = _.random(choices.length - 1);
|
||||
return choices[choice](user_num);
|
||||
};
|
||||
})();
|
||||
console.log("");
|
||||
_results = [];
|
||||
for (times = _i = 1; 1 <= repeat_this ? _i <= repeat_this : _i >= repeat_this; times = 1 <= repeat_this ? ++_i : --_i) {
|
||||
users = [];
|
||||
Connector = Connector_uninitialized(users);
|
||||
users.push(new Yatta(0, Connector));
|
||||
users[0].val('name', "initial");
|
||||
for (i = _j = 1; 1 <= number_of_engines ? _j < number_of_engines : _j > number_of_engines; i = 1 <= number_of_engines ? ++_j : --_j) {
|
||||
users.push(new Yatta(i, Connector));
|
||||
}
|
||||
found_error = false;
|
||||
time_now = (new Date).getTime();
|
||||
for (i = _k = 1; 1 <= doSomething_amount ? _k <= doSomething_amount : _k >= doSomething_amount; i = 1 <= doSomething_amount ? ++_k : --_k) {
|
||||
doSomething();
|
||||
}
|
||||
for (user_number = _l = 0, _len = users.length; _l < _len; user_number = ++_l) {
|
||||
user = users[user_number];
|
||||
user.getConnector().flushAll();
|
||||
}
|
||||
this.time += (new Date()).getTime() - time_now;
|
||||
number_of_created_operations = 0;
|
||||
for (i = _m = 0, _ref = users.length; 0 <= _ref ? _m < _ref : _m > _ref; i = 0 <= _ref ? ++_m : --_m) {
|
||||
number_of_created_operations += users[i].getConnector().getOpsInExecutionOrder().length;
|
||||
}
|
||||
this.ops += number_of_created_operations * users.length;
|
||||
ops_per_msek = Math.floor(this.ops / this.time);
|
||||
console.log(("" + times + "/" + repeat_this + ": Every collaborator (" + users.length + ") applied " + number_of_created_operations + " ops in a different order.") + (" Over all we consumed " + this.ops + " operations in " + (this.time / 1000) + " seconds (" + ops_per_msek + " ops/msek)."));
|
||||
console.log(users[0].val('name').val());
|
||||
_results.push((function() {
|
||||
var _len1, _n, _o, _ref1, _results1;
|
||||
_results1 = [];
|
||||
for (i = _n = 0, _ref1 = users.length - 1; 0 <= _ref1 ? _n < _ref1 : _n > _ref1; i = 0 <= _ref1 ? ++_n : --_n) {
|
||||
if (users[i].val('name').val() !== users[i + 1].val('name').val()) {
|
||||
printOpsInExecutionOrder = function(otnumber, otherotnumber) {
|
||||
var j, o, ops, s, _len1, _len2, _o, _p;
|
||||
ops = users[otnumber].getConnector().getOpsInExecutionOrder();
|
||||
for (_o = 0, _len1 = ops.length; _o < _len1; _o++) {
|
||||
s = ops[_o];
|
||||
console.log(JSON.stringify(s));
|
||||
}
|
||||
console.log("");
|
||||
s = "ops = [";
|
||||
for (j = _p = 0, _len2 = ops.length; _p < _len2; j = ++_p) {
|
||||
o = ops[j];
|
||||
if (j !== 0) {
|
||||
s += ", ";
|
||||
}
|
||||
s += "op" + j;
|
||||
}
|
||||
s += "]";
|
||||
console.log(s);
|
||||
console.log("@users[@last_user].ot.applyOps ops");
|
||||
console.log("expect(@users[@last_user].ot.val('name')).to.equal(\"" + (users[otherotnumber].val('name')) + "\")");
|
||||
return ops;
|
||||
};
|
||||
console.log("");
|
||||
console.log("Found an OT Puzzle!");
|
||||
console.log("OT states:");
|
||||
for (j = _o = 0, _len1 = users.length; _o < _len1; j = ++_o) {
|
||||
u = users[j];
|
||||
console.log(("OT" + j + ": ") + u.val('name'));
|
||||
}
|
||||
console.log("\nOT execution order (" + i + "," + (i + 1) + "):");
|
||||
printOpsInExecutionOrder(i, i + 1);
|
||||
console.log("");
|
||||
ops = printOpsInExecutionOrder(i + 1, i);
|
||||
_results1.push(console.log(""));
|
||||
} else {
|
||||
_results1.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results1;
|
||||
})());
|
||||
}
|
||||
return _results;
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
describe "JsonYatta", ->
|
||||
beforeEach (done)->
|
||||
@last_user = 10
|
||||
@users = []
|
||||
@Connector = Connector_uninitialized @users
|
||||
for i in [0..(@last_user+1)]
|
||||
@users.push(new Yatta i, @Connector)
|
||||
|
||||
|
||||
done()
|
||||
|
||||
it "can handle many engines, many operations, concurrently (random)", ->
|
||||
number_of_test_cases_multiplier = 1
|
||||
repeat_this = 100 * number_of_test_cases_multiplier
|
||||
doSomething_amount = 200 * number_of_test_cases_multiplier
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1
|
||||
|
||||
@time = 0
|
||||
@ops = 0
|
||||
|
||||
users = []
|
||||
|
||||
generateInsertOp = (user_num)->
|
||||
chars = "1234567890"
|
||||
|
||||
pos = _.random 0, (users[user_num].val('name').length-1)
|
||||
length = 1 #_.random 0, 10
|
||||
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
|
||||
users[user_num].val('name').insertText pos, text
|
||||
null
|
||||
|
||||
generateReplaceOp = (user_num)->
|
||||
chars = "abcdefghijklmnopqrstuvwxyz"
|
||||
length = _.random 0, 10
|
||||
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
users[user_num].val('name').replaceText text
|
||||
|
||||
generateDeleteOp = (user_num)->
|
||||
if users[user_num].val('name').val().length > 0
|
||||
pos = _.random 0, (users[user_num].val('name').val().length-1)
|
||||
length = 1 # _.random 0, ot.val('name').length - pos
|
||||
ops1 = users[user_num].val('name').deleteText pos, length
|
||||
undefined
|
||||
|
||||
generateRandomOp = (user_num)->
|
||||
op_gen = [generateDeleteOp, generateInsertOp, generateReplaceOp]
|
||||
i = _.random (op_gen.length - 1)
|
||||
op = op_gen[i](user_num)
|
||||
|
||||
applyRandomOp = (user_num)->
|
||||
user = users[user_num]
|
||||
user.getConnector().flushOneRandom()
|
||||
|
||||
doSomething = do ()->
|
||||
()->
|
||||
user_num = _.random (number_of_engines-1)
|
||||
choices = [applyRandomOp, generateRandomOp]
|
||||
*if (users[user_num].buffer[user_num].length < maximum_ops_per_engine)
|
||||
* choices = choices.concat generateRandomOp
|
||||
|
||||
choice = _.random (choices.length-1)
|
||||
|
||||
choices[choice](user_num)
|
||||
|
||||
console.log ""
|
||||
for times in [1..repeat_this]
|
||||
*console.log "repeated_this x #{times} times"
|
||||
users = []
|
||||
Connector = Connector_uninitialized users
|
||||
users.push(new Yatta 0, Connector)
|
||||
users[0].val('name',"initial")
|
||||
for i in [1...number_of_engines]
|
||||
users.push(new Yatta i, Connector)
|
||||
|
||||
found_error = false
|
||||
|
||||
*try
|
||||
time_now = (new Date).getTime()
|
||||
for i in [1..doSomething_amount]
|
||||
doSomething()
|
||||
|
||||
for user,user_number in users
|
||||
user.getConnector().flushAll()
|
||||
|
||||
@time += (new Date()).getTime() - time_now
|
||||
|
||||
number_of_created_operations = 0
|
||||
for i in [0...(users.length)]
|
||||
number_of_created_operations += users[i].getConnector().getOpsInExecutionOrder().length
|
||||
@ops += number_of_created_operations*users.length
|
||||
|
||||
ops_per_msek = Math.floor(@ops/@time)
|
||||
console.log "#{times}/#{repeat_this}: Every collaborator (#{users.length}) applied #{number_of_created_operations} ops in a different order." + " Over all we consumed #{@ops} operations in #{@time/1000} seconds (#{ops_per_msek} ops/msek)."
|
||||
|
||||
console.log users[0].val('name').val()
|
||||
for i in [0...(users.length-1)]
|
||||
if ((users[i].val('name').val() isnt users[i+1].val('name').val()) )# and (number_of_created_operations <= 6 or true)) or found_error
|
||||
|
||||
printOpsInExecutionOrder = (otnumber, otherotnumber)->
|
||||
ops = users[otnumber].getConnector().getOpsInExecutionOrder()
|
||||
for s in ops
|
||||
console.log JSON.stringify s
|
||||
console.log ""
|
||||
s = "ops = ["
|
||||
for o,j in ops
|
||||
if j isnt 0
|
||||
s += ", "
|
||||
s += "op#{j}"
|
||||
s += "]"
|
||||
console.log s
|
||||
console.log "@users[@last_user].ot.applyOps ops"
|
||||
console.log "expect(@users[@last_user].ot.val('name')).to.equal(\"#{users[otherotnumber].val('name')}\")"
|
||||
ops
|
||||
console.log ""
|
||||
console.log "Found an OT Puzzle!"
|
||||
console.log "OT states:"
|
||||
for u,j in users
|
||||
console.log "OT#{j}: "+u.val('name')
|
||||
console.log "\nOT execution order (#{i},#{i+1}):"
|
||||
printOpsInExecutionOrder i, i+1
|
||||
console.log ""
|
||||
ops = printOpsInExecutionOrder i+1, i
|
||||
|
||||
console.log ""
|
||||
*/
|
||||
|
||||
|
||||
},{"../lib/Connectors/TestConnector.coffee":1,"../lib/Frameworks/JsonYatta.coffee":3,"chai":17,"sinon":50,"sinon-chai":49,"underscore":65}],67:[function(require,module,exports){
|
||||
@ -13373,155 +13358,343 @@ Yatta = require("../lib/Frameworks/TextYatta.coffee");
|
||||
|
||||
Connector_uninitialized = require("../lib/Connectors/TestConnector.coffee");
|
||||
|
||||
describe("TextYatta", function() {
|
||||
beforeEach(function(done) {
|
||||
var i, _i, _ref;
|
||||
this.last_user = 10;
|
||||
this.users = [];
|
||||
this.Connector = Connector_uninitialized(this.users);
|
||||
for (i = _i = 0, _ref = this.last_user + 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
|
||||
this.users.push(new Yatta(i, this.Connector));
|
||||
}
|
||||
return done();
|
||||
});
|
||||
it("handles inserts correctly", function() {});
|
||||
return it("can handle many engines, many operations, concurrently (random)", function() {
|
||||
var Connector, applyRandomOp, doSomething, doSomething_amount, found_error, found_inconsistency, generateDeleteOp, generateInsertOp, generateRandomOp, generateReplaceOp, i, j, number_of_created_operations, number_of_engines, number_of_test_cases_multiplier, ops, ops_per_msek, printOpsInExecutionOrder, repeat_this, time_now, times, u, user, user_number, users, _i, _j, _k, _l, _len, _len1, _m, _n, _o, _ref, _ref1, _results;
|
||||
number_of_test_cases_multiplier = 1;
|
||||
repeat_this = 1 * number_of_test_cases_multiplier;
|
||||
doSomething_amount = 500 * number_of_test_cases_multiplier;
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1;
|
||||
|
||||
/*
|
||||
describe "TextYatta", ->
|
||||
beforeEach (done)->
|
||||
@last_user = 10
|
||||
@users = []
|
||||
@Connector = Connector_uninitialized @users
|
||||
for i in [0..(@last_user+1)]
|
||||
@users.push(new Yatta i, @Connector)
|
||||
done()
|
||||
|
||||
it "handles inserts correctly", ->
|
||||
|
||||
|
||||
it "can handle many engines, many operations, concurrently (random)", ->
|
||||
number_of_test_cases_multiplier = 1
|
||||
repeat_this = 1 * number_of_test_cases_multiplier
|
||||
doSomething_amount = 500 * number_of_test_cases_multiplier
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1
|
||||
*maximum_ops_per_engine = 20 * number_of_test_cases_multiplier
|
||||
|
||||
@time = 0
|
||||
@ops = 0
|
||||
users = []
|
||||
|
||||
generateInsertOp = (user_num)->
|
||||
chars = "1234567890"
|
||||
|
||||
pos = _.random 0, (users[user_num].val().length-1)
|
||||
length = 1 #_.random 0, 10
|
||||
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
|
||||
users[user_num].insertText pos, text
|
||||
null
|
||||
|
||||
generateReplaceOp = (user_num)->
|
||||
chars = "abcdefghijklmnopqrstuvwxyz"
|
||||
length = _.random 0, 10
|
||||
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
users[user_num].replaceText text
|
||||
|
||||
generateDeleteOp = (user_num)->
|
||||
if users[user_num].val().length > 0
|
||||
pos = _.random 0, (users[user_num].val().length-1)
|
||||
length = 1 # _.random 0, ot.val().length - pos
|
||||
ops1 = users[user_num].deleteText pos, length
|
||||
undefined
|
||||
|
||||
generateRandomOp = (user_num)->
|
||||
op_gen = [generateDeleteOp, generateInsertOp, generateReplaceOp]
|
||||
i = _.random (op_gen.length - 1)
|
||||
op = op_gen[i](user_num)
|
||||
|
||||
applyRandomOp = (user_num)->
|
||||
user = users[user_num]
|
||||
user.getConnector().flushOneRandom()
|
||||
|
||||
doSomething = do ()->
|
||||
()->
|
||||
user_num = _.random (number_of_engines-1)
|
||||
choices = [applyRandomOp, generateRandomOp]
|
||||
*if (users[user_num].buffer[user_num].length < maximum_ops_per_engine)
|
||||
* choices = choices.concat generateRandomOp
|
||||
|
||||
choice = _.random (choices.length-1)
|
||||
|
||||
choices[choice](user_num)
|
||||
|
||||
console.log ""
|
||||
for times in [1..repeat_this]
|
||||
*console.log "repeated_this x #{times} times"
|
||||
users = []
|
||||
Connector = Connector_uninitialized users
|
||||
for i in [0..number_of_engines]
|
||||
users.push(new Yatta i, Connector)
|
||||
|
||||
found_error = false
|
||||
|
||||
*try
|
||||
time_now = (new Date).getTime()
|
||||
for i in [1..doSomething_amount]
|
||||
doSomething()
|
||||
|
||||
for user,user_number in users
|
||||
user.getConnector().flushAll()
|
||||
|
||||
@time += (new Date()).getTime() - time_now
|
||||
|
||||
number_of_created_operations = 0
|
||||
for i in [0...(users.length)]
|
||||
number_of_created_operations += users[i].getConnector().getOpsInExecutionOrder().length
|
||||
@ops += number_of_created_operations*users.length
|
||||
|
||||
ops_per_msek = Math.floor(@ops/@time)
|
||||
console.log "#{times}/#{repeat_this}: Every collaborator (#{users.length}) applied #{number_of_created_operations} ops in a different order." + " Over all we consumed #{@ops} operations in #{@time/1000} seconds (#{ops_per_msek} ops/msek)."
|
||||
|
||||
console.log users[0].val()
|
||||
found_inconsistency = false
|
||||
for i in [0...(users.length-1)]
|
||||
if ((users[i].val() isnt users[i+1].val()) )# and (number_of_created_operations <= 6 or true)) or found_error
|
||||
found_inconsistency =true
|
||||
printOpsInExecutionOrder = (otnumber, otherotnumber)->
|
||||
ops = users[otnumber].getConnector().getOpsInExecutionOrder()
|
||||
for s,j in ops
|
||||
console.log "op#{j} = #{JSON.stringify s}"
|
||||
console.log ""
|
||||
s = "ops = ["
|
||||
for o,j in ops
|
||||
if j isnt 0
|
||||
s += ", "
|
||||
s += "op#{j}"
|
||||
s += "]"
|
||||
console.log s
|
||||
console.log "@users[@last_user].ot.applyOps ops"
|
||||
console.log "expect(@users[@last_user].val()).to.equal(\"#{users[otherotnumber].val()}\")"
|
||||
ops
|
||||
console.log ""
|
||||
console.log "Found an OT Puzzle!"
|
||||
console.log "OT states:"
|
||||
for u,j in users
|
||||
console.log "OT#{j}: "+u.val()
|
||||
console.log "\nOT execution order (#{i},#{i+1}):"
|
||||
printOpsInExecutionOrder i, i+1
|
||||
console.log ""
|
||||
ops = printOpsInExecutionOrder i+1, i
|
||||
|
||||
console.log ""
|
||||
if found_inconsistency
|
||||
throw new Error "dtrn"
|
||||
|
||||
* expect(users[i].ot.val()).to.equal(users[i+1].ot.val())
|
||||
*/
|
||||
|
||||
|
||||
},{"../lib/Connectors/TestConnector.coffee":1,"../lib/Frameworks/TextYatta.coffee":4,"chai":17,"sinon":50,"sinon-chai":49,"underscore":65}],68:[function(require,module,exports){
|
||||
var Connector_uninitialized, Test, Yatta, chai, expect, should, sinon, sinonChai, _,
|
||||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
||||
|
||||
chai = require('chai');
|
||||
|
||||
expect = chai.expect;
|
||||
|
||||
should = chai.should();
|
||||
|
||||
sinon = require('sinon');
|
||||
|
||||
sinonChai = require('sinon-chai');
|
||||
|
||||
_ = require("underscore");
|
||||
|
||||
chai.use(sinonChai);
|
||||
|
||||
Yatta = require("../lib/Frameworks/JsonYatta.coffee");
|
||||
|
||||
Connector_uninitialized = require("../lib/Connectors/TestConnector.coffee");
|
||||
|
||||
Test = (function() {
|
||||
function Test() {
|
||||
this.applyRandomOp = __bind(this.applyRandomOp, this);
|
||||
this.generateRandomOp = __bind(this.generateRandomOp, this);
|
||||
this.generateDeleteOp = __bind(this.generateDeleteOp, this);
|
||||
this.generateReplaceOp = __bind(this.generateReplaceOp, this);
|
||||
this.generateInsertOp = __bind(this.generateInsertOp, this);
|
||||
this.number_of_test_cases_multiplier = 1;
|
||||
this.repeat_this = 100 * this.number_of_test_cases_multiplier;
|
||||
this.doSomething_amount = 200 * this.number_of_test_cases_multiplier;
|
||||
this.number_of_engines = 12 + this.number_of_test_cases_multiplier - 1;
|
||||
this.time = 0;
|
||||
this.ops = 0;
|
||||
users = [];
|
||||
generateInsertOp = function(user_num) {
|
||||
var chars, length, nextchar, pos, text;
|
||||
chars = "1234567890";
|
||||
pos = _.random(0, users[user_num].val().length - 1);
|
||||
length = 1;
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
users[user_num].insertText(pos, text);
|
||||
return null;
|
||||
};
|
||||
generateReplaceOp = function(user_num) {
|
||||
var chars, length, nextchar, text;
|
||||
chars = "abcdefghijklmnopqrstuvwxyz";
|
||||
length = _.random(0, 10);
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
return users[user_num].replaceText(text);
|
||||
};
|
||||
generateDeleteOp = function(user_num) {
|
||||
var length, ops1, pos;
|
||||
if (users[user_num].val().length > 0) {
|
||||
pos = _.random(0, users[user_num].val().length - 1);
|
||||
length = 1;
|
||||
ops1 = users[user_num].deleteText(pos, length);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
generateRandomOp = function(user_num) {
|
||||
var i, op, op_gen;
|
||||
op_gen = [generateDeleteOp, generateInsertOp, generateReplaceOp];
|
||||
i = _.random(op_gen.length - 1);
|
||||
return op = op_gen[i](user_num);
|
||||
};
|
||||
applyRandomOp = function(user_num) {
|
||||
var user;
|
||||
user = users[user_num];
|
||||
return user.getConnector().flushOneRandom();
|
||||
};
|
||||
doSomething = (function() {
|
||||
return function() {
|
||||
var choice, choices, user_num;
|
||||
user_num = _.random(number_of_engines - 1);
|
||||
choices = [applyRandomOp, generateRandomOp];
|
||||
choice = _.random(choices.length - 1);
|
||||
return choices[choice](user_num);
|
||||
};
|
||||
})();
|
||||
console.log("");
|
||||
this.reinitialize();
|
||||
}
|
||||
|
||||
Test.prototype.reinitialize = function() {
|
||||
var i, _i, _ref, _results;
|
||||
this.users = [];
|
||||
this.Connector = Connector_uninitialized(this.users);
|
||||
this.users.push(new Yatta(0, this.Connector));
|
||||
this.users[0].val('name', "initial");
|
||||
_results = [];
|
||||
for (times = _i = 1; 1 <= repeat_this ? _i <= repeat_this : _i >= repeat_this; times = 1 <= repeat_this ? ++_i : --_i) {
|
||||
users = [];
|
||||
Connector = Connector_uninitialized(users);
|
||||
for (i = _j = 0; 0 <= number_of_engines ? _j <= number_of_engines : _j >= number_of_engines; i = 0 <= number_of_engines ? ++_j : --_j) {
|
||||
users.push(new Yatta(i, Connector));
|
||||
}
|
||||
found_error = false;
|
||||
time_now = (new Date).getTime();
|
||||
for (i = _k = 1; 1 <= doSomething_amount ? _k <= doSomething_amount : _k >= doSomething_amount; i = 1 <= doSomething_amount ? ++_k : --_k) {
|
||||
doSomething();
|
||||
}
|
||||
for (user_number = _l = 0, _len = users.length; _l < _len; user_number = ++_l) {
|
||||
user = users[user_number];
|
||||
user.getConnector().flushAll();
|
||||
}
|
||||
this.time += (new Date()).getTime() - time_now;
|
||||
number_of_created_operations = 0;
|
||||
for (i = _m = 0, _ref = users.length; 0 <= _ref ? _m < _ref : _m > _ref; i = 0 <= _ref ? ++_m : --_m) {
|
||||
number_of_created_operations += users[i].getConnector().getOpsInExecutionOrder().length;
|
||||
}
|
||||
this.ops += number_of_created_operations * users.length;
|
||||
ops_per_msek = Math.floor(this.ops / this.time);
|
||||
console.log(("" + times + "/" + repeat_this + ": Every collaborator (" + users.length + ") applied " + number_of_created_operations + " ops in a different order.") + (" Over all we consumed " + this.ops + " operations in " + (this.time / 1000) + " seconds (" + ops_per_msek + " ops/msek)."));
|
||||
console.log(users[0].val());
|
||||
found_inconsistency = false;
|
||||
for (i = _n = 0, _ref1 = users.length - 1; 0 <= _ref1 ? _n < _ref1 : _n > _ref1; i = 0 <= _ref1 ? ++_n : --_n) {
|
||||
if (users[i].val() !== users[i + 1].val()) {
|
||||
found_inconsistency = true;
|
||||
printOpsInExecutionOrder = function(otnumber, otherotnumber) {
|
||||
var j, o, ops, s, _len1, _len2, _o, _p;
|
||||
ops = users[otnumber].getConnector().getOpsInExecutionOrder();
|
||||
for (j = _o = 0, _len1 = ops.length; _o < _len1; j = ++_o) {
|
||||
s = ops[j];
|
||||
console.log("op" + j + " = " + (JSON.stringify(s)));
|
||||
}
|
||||
console.log("");
|
||||
s = "ops = [";
|
||||
for (j = _p = 0, _len2 = ops.length; _p < _len2; j = ++_p) {
|
||||
o = ops[j];
|
||||
if (j !== 0) {
|
||||
s += ", ";
|
||||
}
|
||||
s += "op" + j;
|
||||
}
|
||||
s += "]";
|
||||
console.log(s);
|
||||
console.log("@users[@last_user].ot.applyOps ops");
|
||||
console.log("expect(@users[@last_user].val()).to.equal(\"" + (users[otherotnumber].val()) + "\")");
|
||||
return ops;
|
||||
};
|
||||
console.log("");
|
||||
console.log("Found an OT Puzzle!");
|
||||
console.log("OT states:");
|
||||
for (j = _o = 0, _len1 = users.length; _o < _len1; j = ++_o) {
|
||||
u = users[j];
|
||||
console.log(("OT" + j + ": ") + u.val());
|
||||
}
|
||||
console.log("\nOT execution order (" + i + "," + (i + 1) + "):");
|
||||
printOpsInExecutionOrder(i, i + 1);
|
||||
console.log("");
|
||||
ops = printOpsInExecutionOrder(i + 1, i);
|
||||
console.log("");
|
||||
}
|
||||
}
|
||||
if (found_inconsistency) {
|
||||
throw new Error("dtrn");
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
for (i = _i = 1, _ref = this.number_of_engines; 1 <= _ref ? _i < _ref : _i > _ref; i = 1 <= _ref ? ++_i : --_i) {
|
||||
_results.push(this.users.push(new Yatta(i, this.Connector)));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Test.prototype.getRandomText = function() {
|
||||
var chars, length, nextchar, text;
|
||||
chars = "abcdefghijklmnopqrstuvwxyz";
|
||||
length = _.random(0, 10);
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
return text;
|
||||
};
|
||||
|
||||
Test.prototype.generateInsertOp = function(user_num) {
|
||||
var pos;
|
||||
pos = _.random(0, this.users[user_num].val('name').val().length - 1);
|
||||
this.users[user_num].val('name').insertText(pos, this.getRandomText());
|
||||
return null;
|
||||
};
|
||||
|
||||
Test.prototype.generateReplaceOp = function(user_num) {
|
||||
this.users[user_num].val('name').replaceText(this.getRandomText());
|
||||
return null;
|
||||
};
|
||||
|
||||
Test.prototype.generateDeleteOp = function(user_num) {
|
||||
var length, ops1, pos;
|
||||
if (this.users[user_num].val('name').val().length > 0) {
|
||||
pos = _.random(0, this.users[user_num].val('name').val().length - 1);
|
||||
length = 1;
|
||||
ops1 = this.users[user_num].val('name').deleteText(pos, length);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
|
||||
Test.prototype.generateRandomOp = function(user_num) {
|
||||
var i, op, op_gen;
|
||||
op_gen = [this.generateDeleteOp, this.generateInsertOp, this.generateReplaceOp];
|
||||
i = _.random(op_gen.length - 1);
|
||||
return op = op_gen[i](user_num);
|
||||
};
|
||||
|
||||
Test.prototype.applyRandomOp = function(user_num) {
|
||||
var user;
|
||||
user = this.users[user_num];
|
||||
return user.getConnector().flushOneRandom();
|
||||
};
|
||||
|
||||
Test.prototype.doSomething = function() {
|
||||
var choice, choices, user_num;
|
||||
user_num = _.random(this.number_of_engines - 1);
|
||||
choices = [this.applyRandomOp, this.generateRandomOp];
|
||||
choice = _.random(choices.length - 1);
|
||||
return choices[choice](user_num);
|
||||
};
|
||||
|
||||
Test.prototype.flushAll = function() {
|
||||
var user, user_number, _i, _len, _ref, _results;
|
||||
_ref = this.users;
|
||||
_results = [];
|
||||
for (user_number = _i = 0, _len = _ref.length; _i < _len; user_number = ++_i) {
|
||||
user = _ref[user_number];
|
||||
_results.push(user.getConnector().flushAll());
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Test.prototype.run = function() {
|
||||
var i, j, number_of_created_operations, ops, ops_per_msek, printOpsInExecutionOrder, time_now, times, u, _i, _j, _k, _ref, _ref1, _ref2, _results;
|
||||
_results = [];
|
||||
for (times = _i = 1, _ref = this.repeat_this; 1 <= _ref ? _i <= _ref : _i >= _ref; times = 1 <= _ref ? ++_i : --_i) {
|
||||
this.reinitialize();
|
||||
time_now = (new Date).getTime();
|
||||
for (i = _j = 1, _ref1 = this.doSomething_amount; 1 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 1 <= _ref1 ? ++_j : --_j) {
|
||||
this.doSomething();
|
||||
}
|
||||
this.flushAll();
|
||||
this.time += (new Date()).getTime() - time_now;
|
||||
number_of_created_operations = 0;
|
||||
for (i = _k = 0, _ref2 = this.users.length; 0 <= _ref2 ? _k < _ref2 : _k > _ref2; i = 0 <= _ref2 ? ++_k : --_k) {
|
||||
number_of_created_operations += this.users[i].getConnector().getOpsInExecutionOrder().length;
|
||||
}
|
||||
this.ops += number_of_created_operations * this.users.length;
|
||||
ops_per_msek = Math.floor(this.ops / this.time);
|
||||
console.log(("" + times + "/" + this.repeat_this + ": Every collaborator (" + this.users.length + ") applied " + this.number_of_created_operations + " ops in a different order.") + (" Over all we consumed " + this.ops + " operations in " + (this.time / 1000) + " seconds (" + ops_per_msek + " ops/msek)."));
|
||||
_results.push((function() {
|
||||
var _l, _len, _m, _ref3, _results1;
|
||||
_results1 = [];
|
||||
for (i = _l = 0, _ref3 = this.users.length - 1; 0 <= _ref3 ? _l < _ref3 : _l > _ref3; i = 0 <= _ref3 ? ++_l : --_l) {
|
||||
if (this.users[i].val('name').val() !== this.users[i + 1].val('name').val()) {
|
||||
printOpsInExecutionOrder = function(otnumber, otherotnumber) {
|
||||
var j, o, ops, s, _len, _len1, _m, _n;
|
||||
ops = this.users[otnumber].getConnector().getOpsInExecutionOrder();
|
||||
for (_m = 0, _len = ops.length; _m < _len; _m++) {
|
||||
s = ops[_m];
|
||||
console.log(JSON.stringify(s));
|
||||
}
|
||||
console.log("");
|
||||
s = "ops = [";
|
||||
for (j = _n = 0, _len1 = ops.length; _n < _len1; j = ++_n) {
|
||||
o = ops[j];
|
||||
if (j !== 0) {
|
||||
s += ", ";
|
||||
}
|
||||
s += "op" + j;
|
||||
}
|
||||
s += "]";
|
||||
console.log(s);
|
||||
console.log("@users[@last_user].ot.applyOps ops");
|
||||
console.log("expect(@users[@last_user].ot.val('name')).to.equal(\"" + (users[otherotnumber].val('name')) + "\")");
|
||||
return ops;
|
||||
};
|
||||
console.log("");
|
||||
console.log("Found an OT Puzzle!");
|
||||
console.log("OT states:");
|
||||
for (j = _m = 0, _len = users.length; _m < _len; j = ++_m) {
|
||||
u = users[j];
|
||||
console.log(("OT" + j + ": ") + u.val('name'));
|
||||
}
|
||||
console.log("\nOT execution order (" + i + "," + (i + 1) + "):");
|
||||
printOpsInExecutionOrder(i, i + 1);
|
||||
console.log("");
|
||||
ops = printOpsInExecutionOrder(i + 1, i);
|
||||
_results1.push(console.log(""));
|
||||
} else {
|
||||
_results1.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results1;
|
||||
}).call(this));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
return Test;
|
||||
|
||||
})();
|
||||
|
||||
describe("JsonYatta", function() {
|
||||
return it("can handle many engines, many operations, concurrently (random)", function() {
|
||||
var yTest;
|
||||
yTest = new Test();
|
||||
return yTest.run();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
},{"../lib/Connectors/TestConnector.coffee":1,"../lib/Frameworks/TextYatta.coffee":4,"chai":17,"sinon":50,"sinon-chai":49,"underscore":65}]},{},[66,67]);
|
||||
},{"../lib/Connectors/TestConnector.coffee":1,"../lib/Frameworks/JsonYatta.coffee":3,"chai":17,"sinon":50,"sinon-chai":49,"underscore":65}]},{},[66,67,68]);
|
@ -6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AAA,IAAO,8BAAP;AACE,MAAA,IAAC,CAAA,MAAO,CAAA,CAAC,CAAC,OAAF,CAAR,GAAqB,EAArB,CADF;KAAA;AAEA,IAAA,IAAO,yCAAP;AACE,MAAA,IAAC,CAAA,iBAAkB,CAAA,CAAC,CAAC,OAAF,CAAnB,GAAgC,CAAhC,CADF;KAFA;AAMA,IAAA,IAAG,2CAAH;AACE,YAAU,IAAA,KAAA,CAAM,oCAAN,CAAV,CADF;KANA;AAAA,IAQA,IAAC,CAAA,MAAO,CAAA,CAAC,CAAC,OAAF,CAAW,CAAA,CAAC,CAAC,SAAF,CAAnB,GAAkC,CARlC,CAAA;AASA,IAAA,IAAG,MAAA,CAAA,CAAQ,CAAC,SAAT,KAAsB,QAAtB,IAAmC,CAAC,CAAC,OAAF,KAAe,IAAC,CAAA,SAAD,CAAA,CAArD;AACE,MAAA,IAAC,CAAA,iBAAkB,CAAA,CAAC,CAAC,OAAF,CAAnB,EAAA,CADF;KATA;WAWA,EAZY;EAAA,CAvDd,CAAA;;uBAAA;;IANF,CAAA;;AAAA,MA2EM,CAAC,OAAP,GAAiB,aA3EjB,CAAA"
|
||||
}
|
@ -6,8 +6,8 @@ module.exports = function(HB) {
|
||||
parser = {};
|
||||
execution_listener = [];
|
||||
Operation = (function() {
|
||||
function Operation(_arg) {
|
||||
this.creator = _arg['creator'], this.op_number = _arg['op_number'];
|
||||
function Operation(uid) {
|
||||
this.creator = uid['creator'], this.op_number = uid['op_number'];
|
||||
}
|
||||
|
||||
Operation.prototype.getUid = function() {
|
||||
@ -92,9 +92,9 @@ module.exports = function(HB) {
|
||||
return Delete;
|
||||
|
||||
})(Operation);
|
||||
parser['Delete'] = function(_arg) {
|
||||
parser['Delete'] = function(o) {
|
||||
var deletes_uid, uid;
|
||||
uid = _arg['uid'], deletes_uid = _arg['deletes'];
|
||||
uid = o['uid'], deletes_uid = o['deletes'];
|
||||
return new Delete(uid, deletes_uid);
|
||||
};
|
||||
Insert = (function(_super) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -32,14 +32,13 @@ module.exports = function(HB) {
|
||||
if (typeof content === 'string') {
|
||||
word = HB.addOperation(new types.Word(HB.getNextOperationIdentifier(), content)).execute();
|
||||
JsonType.__super__.val.call(this, name, word);
|
||||
return content;
|
||||
} else if (typeof content === 'object') {
|
||||
json = HB.addOperation(JsonType(HB.getNextOperationIdentifier(), content)).execute();
|
||||
JsonType.__super__.val.call(this, name, json);
|
||||
return content;
|
||||
} else {
|
||||
throw new Error("You must not set " + (typeof content) + "-types in collaborative Json-objects!");
|
||||
}
|
||||
return this;
|
||||
} else {
|
||||
return JsonType.__super__.val.call(this, name, content);
|
||||
}
|
||||
|
@ -6,5 +6,5 @@
|
||||
"JsonTypes.coffee"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": "AAAA,IAAA,wBAAA;EAAA;iSAAA;;AAAA,wBAAA,GAA2B,OAAA,CAAQ,oBAAR,CAA3B,CAAA;;AAAA,MAEM,CAAC,OAAP,GAAiB,SAAC,EAAD,GAAA;AACf,MAAA,mCAAA;AAAA,EAAA,UAAA,GAAa,wBAAA,CAAyB,EAAzB,CAAb,CAAA;AAAA,EACA,KAAA,GAAQ,UAAU,CAAC,KADnB,CAAA;AAAA,EAEA,MAAA,GAAS,UAAU,CAAC,MAFpB,CAAA;AAAA,EAIM;AACJ,+BAAA,CAAA;;AAAa,IAAA,kBAAC,GAAD,EAAM,aAAN,GAAA;AACX,UAAA,OAAA;AAAA,MAAA,0CAAM,GAAN,CAAA,CAAA;AACA,MAAA,IAAG,qBAAH;AACE,QAAA,IAAG,MAAA,CAAA,aAAA,KAA0B,QAA7B;AACE,gBAAU,IAAA,KAAA,CAAO,wEAAA,GAAuE,CAAA,MAAA,CAAA,aAAA,CAAvE,GAA6F,GAApG,CAAV,CADF;SAAA;AAEA,aAAA,qBAAA;kCAAA;AACE,UAAA,IAAC,CAAA,GAAD,CAAK,IAAL,EAAW,CAAX,CAAA,CADF;AAAA,SAHF;OAFW;IAAA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A/JtB,CAAA;AAAA,EAgKA,KAAM,CAAA,MAAA,CAAN,GAAgB,IAhKhB,CAAA;SAkKA,iBAnKe;AAAA,CAFjB,CAAA"
|
||||
}
|
@ -6,5 +6,5 @@
|
||||
"XmlTypes.coffee"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": "AAiJkB"
|
||||
"mappings": "AAqKkB"
|
||||
}
|
@ -19,155 +19,141 @@
|
||||
|
||||
Connector_uninitialized = require("../lib/Connectors/TestConnector.coffee");
|
||||
|
||||
describe("JsonYatta", function() {
|
||||
beforeEach(function(done) {
|
||||
var i, _i, _ref;
|
||||
this.last_user = 10;
|
||||
this.users = [];
|
||||
this.Connector = Connector_uninitialized(this.users);
|
||||
for (i = _i = 0, _ref = this.last_user + 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
|
||||
this.users.push(new Yatta(i, this.Connector));
|
||||
}
|
||||
return done();
|
||||
});
|
||||
return it("can handle many engines, many operations, concurrently (random)", function() {
|
||||
var Connector, applyRandomOp, doSomething, doSomething_amount, found_error, generateDeleteOp, generateInsertOp, generateRandomOp, generateReplaceOp, i, j, number_of_created_operations, number_of_engines, number_of_test_cases_multiplier, ops, ops_per_msek, printOpsInExecutionOrder, repeat_this, time_now, times, u, user, user_number, users, _i, _j, _k, _l, _len, _m, _ref, _results;
|
||||
number_of_test_cases_multiplier = 1;
|
||||
repeat_this = 1 * number_of_test_cases_multiplier;
|
||||
doSomething_amount = 200 * number_of_test_cases_multiplier;
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1;
|
||||
this.time = 0;
|
||||
this.ops = 0;
|
||||
users = [];
|
||||
generateInsertOp = function(user_num) {
|
||||
var chars, length, nextchar, pos, text;
|
||||
chars = "1234567890";
|
||||
pos = _.random(0, users[user_num].val('name').length - 1);
|
||||
length = 1;
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
users[user_num].val('name').insertText(pos, text);
|
||||
return null;
|
||||
};
|
||||
generateReplaceOp = function(user_num) {
|
||||
var chars, length, nextchar, text;
|
||||
chars = "abcdefghijklmnopqrstuvwxyz";
|
||||
length = _.random(0, 10);
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
return users[user_num].val('name').replaceText(text);
|
||||
};
|
||||
generateDeleteOp = function(user_num) {
|
||||
var length, ops1, pos;
|
||||
if (users[user_num].val('name').val().length > 0) {
|
||||
pos = _.random(0, users[user_num].val('name').val().length - 1);
|
||||
length = 1;
|
||||
ops1 = users[user_num].val('name').deleteText(pos, length);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
generateRandomOp = function(user_num) {
|
||||
var i, op, op_gen;
|
||||
op_gen = [generateDeleteOp, generateInsertOp, generateReplaceOp];
|
||||
i = _.random(op_gen.length - 1);
|
||||
return op = op_gen[i](user_num);
|
||||
};
|
||||
applyRandomOp = function(user_num) {
|
||||
var user;
|
||||
user = users[user_num];
|
||||
return user.getConnector().flushOneRandom();
|
||||
};
|
||||
doSomething = (function() {
|
||||
return function() {
|
||||
var choice, choices, user_num;
|
||||
user_num = _.random(number_of_engines - 1);
|
||||
choices = [applyRandomOp, generateRandomOp];
|
||||
choice = _.random(choices.length - 1);
|
||||
return choices[choice](user_num);
|
||||
};
|
||||
})();
|
||||
console.log("");
|
||||
_results = [];
|
||||
for (times = _i = 1; 1 <= repeat_this ? _i <= repeat_this : _i >= repeat_this; times = 1 <= repeat_this ? ++_i : --_i) {
|
||||
users = [];
|
||||
Connector = Connector_uninitialized(users);
|
||||
users.push(new Yatta(0, Connector));
|
||||
users[0].val('name', "initial");
|
||||
for (i = _j = 1; 1 <= number_of_engines ? _j < number_of_engines : _j > number_of_engines; i = 1 <= number_of_engines ? ++_j : --_j) {
|
||||
users.push(new Yatta(i, Connector));
|
||||
}
|
||||
found_error = false;
|
||||
time_now = (new Date).getTime();
|
||||
for (i = _k = 1; 1 <= doSomething_amount ? _k <= doSomething_amount : _k >= doSomething_amount; i = 1 <= doSomething_amount ? ++_k : --_k) {
|
||||
doSomething();
|
||||
}
|
||||
for (user_number = _l = 0, _len = users.length; _l < _len; user_number = ++_l) {
|
||||
user = users[user_number];
|
||||
user.getConnector().flushAll();
|
||||
}
|
||||
this.time += (new Date()).getTime() - time_now;
|
||||
number_of_created_operations = 0;
|
||||
for (i = _m = 0, _ref = users.length; 0 <= _ref ? _m < _ref : _m > _ref; i = 0 <= _ref ? ++_m : --_m) {
|
||||
number_of_created_operations += users[i].getConnector().getOpsInExecutionOrder().length;
|
||||
}
|
||||
this.ops += number_of_created_operations * users.length;
|
||||
ops_per_msek = Math.floor(this.ops / this.time);
|
||||
console.log(("" + times + "/" + repeat_this + ": Every collaborator (" + users.length + ") applied " + number_of_created_operations + " ops in a different order.") + (" Over all we consumed " + this.ops + " operations in " + (this.time / 1000) + " seconds (" + ops_per_msek + " ops/msek)."));
|
||||
console.log(users[0].val('name').val());
|
||||
_results.push((function() {
|
||||
var _len1, _n, _o, _ref1, _results1;
|
||||
_results1 = [];
|
||||
for (i = _n = 0, _ref1 = users.length - 1; 0 <= _ref1 ? _n < _ref1 : _n > _ref1; i = 0 <= _ref1 ? ++_n : --_n) {
|
||||
if (users[i].val('name').val() !== users[i + 1].val('name').val()) {
|
||||
printOpsInExecutionOrder = function(otnumber, otherotnumber) {
|
||||
var j, o, ops, s, _len1, _len2, _o, _p;
|
||||
ops = users[otnumber].getConnector().getOpsInExecutionOrder();
|
||||
for (_o = 0, _len1 = ops.length; _o < _len1; _o++) {
|
||||
s = ops[_o];
|
||||
console.log(JSON.stringify(s));
|
||||
}
|
||||
console.log("");
|
||||
s = "ops = [";
|
||||
for (j = _p = 0, _len2 = ops.length; _p < _len2; j = ++_p) {
|
||||
o = ops[j];
|
||||
if (j !== 0) {
|
||||
s += ", ";
|
||||
}
|
||||
s += "op" + j;
|
||||
}
|
||||
s += "]";
|
||||
console.log(s);
|
||||
console.log("@users[@last_user].ot.applyOps ops");
|
||||
console.log("expect(@users[@last_user].ot.val('name')).to.equal(\"" + (users[otherotnumber].val('name')) + "\")");
|
||||
return ops;
|
||||
};
|
||||
console.log("");
|
||||
console.log("Found an OT Puzzle!");
|
||||
console.log("OT states:");
|
||||
for (j = _o = 0, _len1 = users.length; _o < _len1; j = ++_o) {
|
||||
u = users[j];
|
||||
console.log(("OT" + j + ": ") + u.val('name'));
|
||||
}
|
||||
console.log("\nOT execution order (" + i + "," + (i + 1) + "):");
|
||||
printOpsInExecutionOrder(i, i + 1);
|
||||
console.log("");
|
||||
ops = printOpsInExecutionOrder(i + 1, i);
|
||||
_results1.push(console.log(""));
|
||||
} else {
|
||||
_results1.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results1;
|
||||
})());
|
||||
}
|
||||
return _results;
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
describe "JsonYatta", ->
|
||||
beforeEach (done)->
|
||||
@last_user = 10
|
||||
@users = []
|
||||
@Connector = Connector_uninitialized @users
|
||||
for i in [0..(@last_user+1)]
|
||||
@users.push(new Yatta i, @Connector)
|
||||
|
||||
|
||||
done()
|
||||
|
||||
it "can handle many engines, many operations, concurrently (random)", ->
|
||||
number_of_test_cases_multiplier = 1
|
||||
repeat_this = 100 * number_of_test_cases_multiplier
|
||||
doSomething_amount = 200 * number_of_test_cases_multiplier
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1
|
||||
|
||||
@time = 0
|
||||
@ops = 0
|
||||
|
||||
users = []
|
||||
|
||||
generateInsertOp = (user_num)->
|
||||
chars = "1234567890"
|
||||
|
||||
pos = _.random 0, (users[user_num].val('name').length-1)
|
||||
length = 1 #_.random 0, 10
|
||||
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
|
||||
users[user_num].val('name').insertText pos, text
|
||||
null
|
||||
|
||||
generateReplaceOp = (user_num)->
|
||||
chars = "abcdefghijklmnopqrstuvwxyz"
|
||||
length = _.random 0, 10
|
||||
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
users[user_num].val('name').replaceText text
|
||||
|
||||
generateDeleteOp = (user_num)->
|
||||
if users[user_num].val('name').val().length > 0
|
||||
pos = _.random 0, (users[user_num].val('name').val().length-1)
|
||||
length = 1 # _.random 0, ot.val('name').length - pos
|
||||
ops1 = users[user_num].val('name').deleteText pos, length
|
||||
undefined
|
||||
|
||||
generateRandomOp = (user_num)->
|
||||
op_gen = [generateDeleteOp, generateInsertOp, generateReplaceOp]
|
||||
i = _.random (op_gen.length - 1)
|
||||
op = op_gen[i](user_num)
|
||||
|
||||
applyRandomOp = (user_num)->
|
||||
user = users[user_num]
|
||||
user.getConnector().flushOneRandom()
|
||||
|
||||
doSomething = do ()->
|
||||
()->
|
||||
user_num = _.random (number_of_engines-1)
|
||||
choices = [applyRandomOp, generateRandomOp]
|
||||
*if (users[user_num].buffer[user_num].length < maximum_ops_per_engine)
|
||||
* choices = choices.concat generateRandomOp
|
||||
|
||||
choice = _.random (choices.length-1)
|
||||
|
||||
choices[choice](user_num)
|
||||
|
||||
console.log ""
|
||||
for times in [1..repeat_this]
|
||||
*console.log "repeated_this x #{times} times"
|
||||
users = []
|
||||
Connector = Connector_uninitialized users
|
||||
users.push(new Yatta 0, Connector)
|
||||
users[0].val('name',"initial")
|
||||
for i in [1...number_of_engines]
|
||||
users.push(new Yatta i, Connector)
|
||||
|
||||
found_error = false
|
||||
|
||||
*try
|
||||
time_now = (new Date).getTime()
|
||||
for i in [1..doSomething_amount]
|
||||
doSomething()
|
||||
|
||||
for user,user_number in users
|
||||
user.getConnector().flushAll()
|
||||
|
||||
@time += (new Date()).getTime() - time_now
|
||||
|
||||
number_of_created_operations = 0
|
||||
for i in [0...(users.length)]
|
||||
number_of_created_operations += users[i].getConnector().getOpsInExecutionOrder().length
|
||||
@ops += number_of_created_operations*users.length
|
||||
|
||||
ops_per_msek = Math.floor(@ops/@time)
|
||||
console.log "#{times}/#{repeat_this}: Every collaborator (#{users.length}) applied #{number_of_created_operations} ops in a different order." + " Over all we consumed #{@ops} operations in #{@time/1000} seconds (#{ops_per_msek} ops/msek)."
|
||||
|
||||
console.log users[0].val('name').val()
|
||||
for i in [0...(users.length-1)]
|
||||
if ((users[i].val('name').val() isnt users[i+1].val('name').val()) )# and (number_of_created_operations <= 6 or true)) or found_error
|
||||
|
||||
printOpsInExecutionOrder = (otnumber, otherotnumber)->
|
||||
ops = users[otnumber].getConnector().getOpsInExecutionOrder()
|
||||
for s in ops
|
||||
console.log JSON.stringify s
|
||||
console.log ""
|
||||
s = "ops = ["
|
||||
for o,j in ops
|
||||
if j isnt 0
|
||||
s += ", "
|
||||
s += "op#{j}"
|
||||
s += "]"
|
||||
console.log s
|
||||
console.log "@users[@last_user].ot.applyOps ops"
|
||||
console.log "expect(@users[@last_user].ot.val('name')).to.equal(\"#{users[otherotnumber].val('name')}\")"
|
||||
ops
|
||||
console.log ""
|
||||
console.log "Found an OT Puzzle!"
|
||||
console.log "OT states:"
|
||||
for u,j in users
|
||||
console.log "OT#{j}: "+u.val('name')
|
||||
console.log "\nOT execution order (#{i},#{i+1}):"
|
||||
printOpsInExecutionOrder i, i+1
|
||||
console.log ""
|
||||
ops = printOpsInExecutionOrder i+1, i
|
||||
|
||||
console.log ""
|
||||
*/
|
||||
|
||||
}).call(this);
|
||||
|
@ -19,154 +19,145 @@
|
||||
|
||||
Connector_uninitialized = require("../lib/Connectors/TestConnector.coffee");
|
||||
|
||||
describe("TextYatta", function() {
|
||||
beforeEach(function(done) {
|
||||
var i, _i, _ref;
|
||||
this.last_user = 10;
|
||||
this.users = [];
|
||||
this.Connector = Connector_uninitialized(this.users);
|
||||
for (i = _i = 0, _ref = this.last_user + 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
|
||||
this.users.push(new Yatta(i, this.Connector));
|
||||
}
|
||||
return done();
|
||||
});
|
||||
it("handles inserts correctly", function() {});
|
||||
return it("can handle many engines, many operations, concurrently (random)", function() {
|
||||
var Connector, applyRandomOp, doSomething, doSomething_amount, found_error, found_inconsistency, generateDeleteOp, generateInsertOp, generateRandomOp, generateReplaceOp, i, j, number_of_created_operations, number_of_engines, number_of_test_cases_multiplier, ops, ops_per_msek, printOpsInExecutionOrder, repeat_this, time_now, times, u, user, user_number, users, _i, _j, _k, _l, _len, _len1, _m, _n, _o, _ref, _ref1, _results;
|
||||
number_of_test_cases_multiplier = 1;
|
||||
repeat_this = 1 * number_of_test_cases_multiplier;
|
||||
doSomething_amount = 500 * number_of_test_cases_multiplier;
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1;
|
||||
this.time = 0;
|
||||
this.ops = 0;
|
||||
users = [];
|
||||
generateInsertOp = function(user_num) {
|
||||
var chars, length, nextchar, pos, text;
|
||||
chars = "1234567890";
|
||||
pos = _.random(0, users[user_num].val().length - 1);
|
||||
length = 1;
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
users[user_num].insertText(pos, text);
|
||||
return null;
|
||||
};
|
||||
generateReplaceOp = function(user_num) {
|
||||
var chars, length, nextchar, text;
|
||||
chars = "abcdefghijklmnopqrstuvwxyz";
|
||||
length = _.random(0, 10);
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
return users[user_num].replaceText(text);
|
||||
};
|
||||
generateDeleteOp = function(user_num) {
|
||||
var length, ops1, pos;
|
||||
if (users[user_num].val().length > 0) {
|
||||
pos = _.random(0, users[user_num].val().length - 1);
|
||||
length = 1;
|
||||
ops1 = users[user_num].deleteText(pos, length);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
generateRandomOp = function(user_num) {
|
||||
var i, op, op_gen;
|
||||
op_gen = [generateDeleteOp, generateInsertOp, generateReplaceOp];
|
||||
i = _.random(op_gen.length - 1);
|
||||
return op = op_gen[i](user_num);
|
||||
};
|
||||
applyRandomOp = function(user_num) {
|
||||
var user;
|
||||
user = users[user_num];
|
||||
return user.getConnector().flushOneRandom();
|
||||
};
|
||||
doSomething = (function() {
|
||||
return function() {
|
||||
var choice, choices, user_num;
|
||||
user_num = _.random(number_of_engines - 1);
|
||||
choices = [applyRandomOp, generateRandomOp];
|
||||
choice = _.random(choices.length - 1);
|
||||
return choices[choice](user_num);
|
||||
};
|
||||
})();
|
||||
console.log("");
|
||||
_results = [];
|
||||
for (times = _i = 1; 1 <= repeat_this ? _i <= repeat_this : _i >= repeat_this; times = 1 <= repeat_this ? ++_i : --_i) {
|
||||
users = [];
|
||||
Connector = Connector_uninitialized(users);
|
||||
for (i = _j = 0; 0 <= number_of_engines ? _j <= number_of_engines : _j >= number_of_engines; i = 0 <= number_of_engines ? ++_j : --_j) {
|
||||
users.push(new Yatta(i, Connector));
|
||||
}
|
||||
found_error = false;
|
||||
time_now = (new Date).getTime();
|
||||
for (i = _k = 1; 1 <= doSomething_amount ? _k <= doSomething_amount : _k >= doSomething_amount; i = 1 <= doSomething_amount ? ++_k : --_k) {
|
||||
doSomething();
|
||||
}
|
||||
for (user_number = _l = 0, _len = users.length; _l < _len; user_number = ++_l) {
|
||||
user = users[user_number];
|
||||
user.getConnector().flushAll();
|
||||
}
|
||||
this.time += (new Date()).getTime() - time_now;
|
||||
number_of_created_operations = 0;
|
||||
for (i = _m = 0, _ref = users.length; 0 <= _ref ? _m < _ref : _m > _ref; i = 0 <= _ref ? ++_m : --_m) {
|
||||
number_of_created_operations += users[i].getConnector().getOpsInExecutionOrder().length;
|
||||
}
|
||||
this.ops += number_of_created_operations * users.length;
|
||||
ops_per_msek = Math.floor(this.ops / this.time);
|
||||
console.log(("" + times + "/" + repeat_this + ": Every collaborator (" + users.length + ") applied " + number_of_created_operations + " ops in a different order.") + (" Over all we consumed " + this.ops + " operations in " + (this.time / 1000) + " seconds (" + ops_per_msek + " ops/msek)."));
|
||||
console.log(users[0].val());
|
||||
found_inconsistency = false;
|
||||
for (i = _n = 0, _ref1 = users.length - 1; 0 <= _ref1 ? _n < _ref1 : _n > _ref1; i = 0 <= _ref1 ? ++_n : --_n) {
|
||||
if (users[i].val() !== users[i + 1].val()) {
|
||||
found_inconsistency = true;
|
||||
printOpsInExecutionOrder = function(otnumber, otherotnumber) {
|
||||
var j, o, ops, s, _len1, _len2, _o, _p;
|
||||
ops = users[otnumber].getConnector().getOpsInExecutionOrder();
|
||||
for (j = _o = 0, _len1 = ops.length; _o < _len1; j = ++_o) {
|
||||
s = ops[j];
|
||||
console.log("op" + j + " = " + (JSON.stringify(s)));
|
||||
}
|
||||
console.log("");
|
||||
s = "ops = [";
|
||||
for (j = _p = 0, _len2 = ops.length; _p < _len2; j = ++_p) {
|
||||
o = ops[j];
|
||||
if (j !== 0) {
|
||||
s += ", ";
|
||||
}
|
||||
s += "op" + j;
|
||||
}
|
||||
s += "]";
|
||||
console.log(s);
|
||||
console.log("@users[@last_user].ot.applyOps ops");
|
||||
console.log("expect(@users[@last_user].val()).to.equal(\"" + (users[otherotnumber].val()) + "\")");
|
||||
return ops;
|
||||
};
|
||||
console.log("");
|
||||
console.log("Found an OT Puzzle!");
|
||||
console.log("OT states:");
|
||||
for (j = _o = 0, _len1 = users.length; _o < _len1; j = ++_o) {
|
||||
u = users[j];
|
||||
console.log(("OT" + j + ": ") + u.val());
|
||||
}
|
||||
console.log("\nOT execution order (" + i + "," + (i + 1) + "):");
|
||||
printOpsInExecutionOrder(i, i + 1);
|
||||
console.log("");
|
||||
ops = printOpsInExecutionOrder(i + 1, i);
|
||||
console.log("");
|
||||
}
|
||||
}
|
||||
if (found_inconsistency) {
|
||||
throw new Error("dtrn");
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
describe "TextYatta", ->
|
||||
beforeEach (done)->
|
||||
@last_user = 10
|
||||
@users = []
|
||||
@Connector = Connector_uninitialized @users
|
||||
for i in [0..(@last_user+1)]
|
||||
@users.push(new Yatta i, @Connector)
|
||||
done()
|
||||
|
||||
it "handles inserts correctly", ->
|
||||
|
||||
|
||||
it "can handle many engines, many operations, concurrently (random)", ->
|
||||
number_of_test_cases_multiplier = 1
|
||||
repeat_this = 1 * number_of_test_cases_multiplier
|
||||
doSomething_amount = 500 * number_of_test_cases_multiplier
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1
|
||||
*maximum_ops_per_engine = 20 * number_of_test_cases_multiplier
|
||||
|
||||
@time = 0
|
||||
@ops = 0
|
||||
users = []
|
||||
|
||||
generateInsertOp = (user_num)->
|
||||
chars = "1234567890"
|
||||
|
||||
pos = _.random 0, (users[user_num].val().length-1)
|
||||
length = 1 #_.random 0, 10
|
||||
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
|
||||
users[user_num].insertText pos, text
|
||||
null
|
||||
|
||||
generateReplaceOp = (user_num)->
|
||||
chars = "abcdefghijklmnopqrstuvwxyz"
|
||||
length = _.random 0, 10
|
||||
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
users[user_num].replaceText text
|
||||
|
||||
generateDeleteOp = (user_num)->
|
||||
if users[user_num].val().length > 0
|
||||
pos = _.random 0, (users[user_num].val().length-1)
|
||||
length = 1 # _.random 0, ot.val().length - pos
|
||||
ops1 = users[user_num].deleteText pos, length
|
||||
undefined
|
||||
|
||||
generateRandomOp = (user_num)->
|
||||
op_gen = [generateDeleteOp, generateInsertOp, generateReplaceOp]
|
||||
i = _.random (op_gen.length - 1)
|
||||
op = op_gen[i](user_num)
|
||||
|
||||
applyRandomOp = (user_num)->
|
||||
user = users[user_num]
|
||||
user.getConnector().flushOneRandom()
|
||||
|
||||
doSomething = do ()->
|
||||
()->
|
||||
user_num = _.random (number_of_engines-1)
|
||||
choices = [applyRandomOp, generateRandomOp]
|
||||
*if (users[user_num].buffer[user_num].length < maximum_ops_per_engine)
|
||||
* choices = choices.concat generateRandomOp
|
||||
|
||||
choice = _.random (choices.length-1)
|
||||
|
||||
choices[choice](user_num)
|
||||
|
||||
console.log ""
|
||||
for times in [1..repeat_this]
|
||||
*console.log "repeated_this x #{times} times"
|
||||
users = []
|
||||
Connector = Connector_uninitialized users
|
||||
for i in [0..number_of_engines]
|
||||
users.push(new Yatta i, Connector)
|
||||
|
||||
found_error = false
|
||||
|
||||
*try
|
||||
time_now = (new Date).getTime()
|
||||
for i in [1..doSomething_amount]
|
||||
doSomething()
|
||||
|
||||
for user,user_number in users
|
||||
user.getConnector().flushAll()
|
||||
|
||||
@time += (new Date()).getTime() - time_now
|
||||
|
||||
number_of_created_operations = 0
|
||||
for i in [0...(users.length)]
|
||||
number_of_created_operations += users[i].getConnector().getOpsInExecutionOrder().length
|
||||
@ops += number_of_created_operations*users.length
|
||||
|
||||
ops_per_msek = Math.floor(@ops/@time)
|
||||
console.log "#{times}/#{repeat_this}: Every collaborator (#{users.length}) applied #{number_of_created_operations} ops in a different order." + " Over all we consumed #{@ops} operations in #{@time/1000} seconds (#{ops_per_msek} ops/msek)."
|
||||
|
||||
console.log users[0].val()
|
||||
found_inconsistency = false
|
||||
for i in [0...(users.length-1)]
|
||||
if ((users[i].val() isnt users[i+1].val()) )# and (number_of_created_operations <= 6 or true)) or found_error
|
||||
found_inconsistency =true
|
||||
printOpsInExecutionOrder = (otnumber, otherotnumber)->
|
||||
ops = users[otnumber].getConnector().getOpsInExecutionOrder()
|
||||
for s,j in ops
|
||||
console.log "op#{j} = #{JSON.stringify s}"
|
||||
console.log ""
|
||||
s = "ops = ["
|
||||
for o,j in ops
|
||||
if j isnt 0
|
||||
s += ", "
|
||||
s += "op#{j}"
|
||||
s += "]"
|
||||
console.log s
|
||||
console.log "@users[@last_user].ot.applyOps ops"
|
||||
console.log "expect(@users[@last_user].val()).to.equal(\"#{users[otherotnumber].val()}\")"
|
||||
ops
|
||||
console.log ""
|
||||
console.log "Found an OT Puzzle!"
|
||||
console.log "OT states:"
|
||||
for u,j in users
|
||||
console.log "OT#{j}: "+u.val()
|
||||
console.log "\nOT execution order (#{i},#{i+1}):"
|
||||
printOpsInExecutionOrder i, i+1
|
||||
console.log ""
|
||||
ops = printOpsInExecutionOrder i+1, i
|
||||
|
||||
console.log ""
|
||||
if found_inconsistency
|
||||
throw new Error "dtrn"
|
||||
|
||||
* expect(users[i].ot.val()).to.equal(users[i+1].ot.val())
|
||||
*/
|
||||
|
||||
}).call(this);
|
||||
|
197
dest/test/test/Yatta_test.js
Normal file
197
dest/test/test/Yatta_test.js
Normal file
@ -0,0 +1,197 @@
|
||||
(function() {
|
||||
var Connector_uninitialized, Test, Yatta, chai, expect, should, sinon, sinonChai, _,
|
||||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
||||
|
||||
chai = require('chai');
|
||||
|
||||
expect = chai.expect;
|
||||
|
||||
should = chai.should();
|
||||
|
||||
sinon = require('sinon');
|
||||
|
||||
sinonChai = require('sinon-chai');
|
||||
|
||||
_ = require("underscore");
|
||||
|
||||
chai.use(sinonChai);
|
||||
|
||||
Yatta = require("../lib/Frameworks/JsonYatta.coffee");
|
||||
|
||||
Connector_uninitialized = require("../lib/Connectors/TestConnector.coffee");
|
||||
|
||||
Test = (function() {
|
||||
function Test() {
|
||||
this.applyRandomOp = __bind(this.applyRandomOp, this);
|
||||
this.generateRandomOp = __bind(this.generateRandomOp, this);
|
||||
this.generateDeleteOp = __bind(this.generateDeleteOp, this);
|
||||
this.generateReplaceOp = __bind(this.generateReplaceOp, this);
|
||||
this.generateInsertOp = __bind(this.generateInsertOp, this);
|
||||
this.number_of_test_cases_multiplier = 1;
|
||||
this.repeat_this = 100 * this.number_of_test_cases_multiplier;
|
||||
this.doSomething_amount = 200 * this.number_of_test_cases_multiplier;
|
||||
this.number_of_engines = 12 + this.number_of_test_cases_multiplier - 1;
|
||||
this.time = 0;
|
||||
this.ops = 0;
|
||||
this.reinitialize();
|
||||
}
|
||||
|
||||
Test.prototype.reinitialize = function() {
|
||||
var i, _i, _ref, _results;
|
||||
this.users = [];
|
||||
this.Connector = Connector_uninitialized(this.users);
|
||||
this.users.push(new Yatta(0, this.Connector));
|
||||
this.users[0].val('name', "initial");
|
||||
_results = [];
|
||||
for (i = _i = 1, _ref = this.number_of_engines; 1 <= _ref ? _i < _ref : _i > _ref; i = 1 <= _ref ? ++_i : --_i) {
|
||||
_results.push(this.users.push(new Yatta(i, this.Connector)));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Test.prototype.getRandomText = function() {
|
||||
var chars, length, nextchar, text;
|
||||
chars = "abcdefghijklmnopqrstuvwxyz";
|
||||
length = _.random(0, 10);
|
||||
nextchar = chars[_.random(0, chars.length - 1)];
|
||||
text = "";
|
||||
_(length).times(function() {
|
||||
return text += nextchar;
|
||||
});
|
||||
return text;
|
||||
};
|
||||
|
||||
Test.prototype.generateInsertOp = function(user_num) {
|
||||
var pos;
|
||||
pos = _.random(0, this.users[user_num].val('name').val().length - 1);
|
||||
this.users[user_num].val('name').insertText(pos, this.getRandomText());
|
||||
return null;
|
||||
};
|
||||
|
||||
Test.prototype.generateReplaceOp = function(user_num) {
|
||||
this.users[user_num].val('name').replaceText(this.getRandomText());
|
||||
return null;
|
||||
};
|
||||
|
||||
Test.prototype.generateDeleteOp = function(user_num) {
|
||||
var length, ops1, pos;
|
||||
if (this.users[user_num].val('name').val().length > 0) {
|
||||
pos = _.random(0, this.users[user_num].val('name').val().length - 1);
|
||||
length = 1;
|
||||
ops1 = this.users[user_num].val('name').deleteText(pos, length);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
|
||||
Test.prototype.generateRandomOp = function(user_num) {
|
||||
var i, op, op_gen;
|
||||
op_gen = [this.generateDeleteOp, this.generateInsertOp, this.generateReplaceOp];
|
||||
i = _.random(op_gen.length - 1);
|
||||
return op = op_gen[i](user_num);
|
||||
};
|
||||
|
||||
Test.prototype.applyRandomOp = function(user_num) {
|
||||
var user;
|
||||
user = this.users[user_num];
|
||||
return user.getConnector().flushOneRandom();
|
||||
};
|
||||
|
||||
Test.prototype.doSomething = function() {
|
||||
var choice, choices, user_num;
|
||||
user_num = _.random(this.number_of_engines - 1);
|
||||
choices = [this.applyRandomOp, this.generateRandomOp];
|
||||
choice = _.random(choices.length - 1);
|
||||
return choices[choice](user_num);
|
||||
};
|
||||
|
||||
Test.prototype.flushAll = function() {
|
||||
var user, user_number, _i, _len, _ref, _results;
|
||||
_ref = this.users;
|
||||
_results = [];
|
||||
for (user_number = _i = 0, _len = _ref.length; _i < _len; user_number = ++_i) {
|
||||
user = _ref[user_number];
|
||||
_results.push(user.getConnector().flushAll());
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Test.prototype.run = function() {
|
||||
var i, j, number_of_created_operations, ops, ops_per_msek, printOpsInExecutionOrder, time_now, times, u, _i, _j, _k, _ref, _ref1, _ref2, _results;
|
||||
_results = [];
|
||||
for (times = _i = 1, _ref = this.repeat_this; 1 <= _ref ? _i <= _ref : _i >= _ref; times = 1 <= _ref ? ++_i : --_i) {
|
||||
this.reinitialize();
|
||||
time_now = (new Date).getTime();
|
||||
for (i = _j = 1, _ref1 = this.doSomething_amount; 1 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 1 <= _ref1 ? ++_j : --_j) {
|
||||
this.doSomething();
|
||||
}
|
||||
this.flushAll();
|
||||
this.time += (new Date()).getTime() - time_now;
|
||||
number_of_created_operations = 0;
|
||||
for (i = _k = 0, _ref2 = this.users.length; 0 <= _ref2 ? _k < _ref2 : _k > _ref2; i = 0 <= _ref2 ? ++_k : --_k) {
|
||||
number_of_created_operations += this.users[i].getConnector().getOpsInExecutionOrder().length;
|
||||
}
|
||||
this.ops += number_of_created_operations * this.users.length;
|
||||
ops_per_msek = Math.floor(this.ops / this.time);
|
||||
console.log(("" + times + "/" + this.repeat_this + ": Every collaborator (" + this.users.length + ") applied " + this.number_of_created_operations + " ops in a different order.") + (" Over all we consumed " + this.ops + " operations in " + (this.time / 1000) + " seconds (" + ops_per_msek + " ops/msek)."));
|
||||
_results.push((function() {
|
||||
var _l, _len, _m, _ref3, _results1;
|
||||
_results1 = [];
|
||||
for (i = _l = 0, _ref3 = this.users.length - 1; 0 <= _ref3 ? _l < _ref3 : _l > _ref3; i = 0 <= _ref3 ? ++_l : --_l) {
|
||||
if (this.users[i].val('name').val() !== this.users[i + 1].val('name').val()) {
|
||||
printOpsInExecutionOrder = function(otnumber, otherotnumber) {
|
||||
var j, o, ops, s, _len, _len1, _m, _n;
|
||||
ops = this.users[otnumber].getConnector().getOpsInExecutionOrder();
|
||||
for (_m = 0, _len = ops.length; _m < _len; _m++) {
|
||||
s = ops[_m];
|
||||
console.log(JSON.stringify(s));
|
||||
}
|
||||
console.log("");
|
||||
s = "ops = [";
|
||||
for (j = _n = 0, _len1 = ops.length; _n < _len1; j = ++_n) {
|
||||
o = ops[j];
|
||||
if (j !== 0) {
|
||||
s += ", ";
|
||||
}
|
||||
s += "op" + j;
|
||||
}
|
||||
s += "]";
|
||||
console.log(s);
|
||||
console.log("@users[@last_user].ot.applyOps ops");
|
||||
console.log("expect(@users[@last_user].ot.val('name')).to.equal(\"" + (users[otherotnumber].val('name')) + "\")");
|
||||
return ops;
|
||||
};
|
||||
console.log("");
|
||||
console.log("Found an OT Puzzle!");
|
||||
console.log("OT states:");
|
||||
for (j = _m = 0, _len = users.length; _m < _len; j = ++_m) {
|
||||
u = users[j];
|
||||
console.log(("OT" + j + ": ") + u.val('name'));
|
||||
}
|
||||
console.log("\nOT execution order (" + i + "," + (i + 1) + "):");
|
||||
printOpsInExecutionOrder(i, i + 1);
|
||||
console.log("");
|
||||
ops = printOpsInExecutionOrder(i + 1, i);
|
||||
_results1.push(console.log(""));
|
||||
} else {
|
||||
_results1.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results1;
|
||||
}).call(this));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
return Test;
|
||||
|
||||
})();
|
||||
|
||||
describe("JsonYatta", function() {
|
||||
return it("can handle many engines, many operations, concurrently (random)", function() {
|
||||
var yTest;
|
||||
yTest = new Test();
|
||||
return yTest.run();
|
||||
});
|
||||
});
|
||||
|
||||
}).call(this);
|
@ -42,6 +42,21 @@
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>d</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/Delete.html'>
|
||||
Delete
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delimiter.html'>
|
||||
Delimiter
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>e</li>
|
||||
<ul>
|
||||
@ -70,6 +85,11 @@
|
||||
IwcConnector
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html'>
|
||||
Insert
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
@ -302,7 +322,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,6 +39,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>When a new property in a map manager is created, then the uids of the inserted Operations
|
||||
must be unique (think about concurrent operations). Therefore only an AddName operation is allowed to
|
||||
add a property in a MapManager. If two AddName operations on the same MapManager name happen concurrently
|
||||
only one will AddName operation will be executed.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -99,7 +108,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
203
doc/class/Delete.html
Normal file
203
doc/class/Delete.html
Normal file
@ -0,0 +1,203 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! Documentation</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>Delete</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
Delete
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types/BasicTypes.coffee</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inherits:</td>
|
||||
<td>
|
||||
<a href='../class/Operation.html'>Operation</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>A simple Delete-type operation that deletes an Insert-type operation.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Convert all relevant information of this operation to the json-format.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Apply the deletion.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<small>Inherited Method Summary</small>
|
||||
<h3 class='inherited'>
|
||||
Methods inherited from
|
||||
<a href='../class/Operation.html'>Operation</a>
|
||||
</h3>
|
||||
<p class='inherited'>
|
||||
<a href='../class/Operation.html#getUid-dynamic'>#getUid</a>
|
||||
<a href='../class/Operation.html#execute-dynamic'>#execute</a>
|
||||
<a href='../class/Operation.html#saveOperation-dynamic'>#saveOperation</a>
|
||||
<a href='../class/Operation.html#validateSavedOperations-dynamic'>#validateSavedOperations</a>
|
||||
</p>
|
||||
</h2>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(uid, deletes)</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Convert all relevant information of this operation to the json-format.
|
||||
This result can be sent to other clients.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Apply the deletion.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -30,19 +30,19 @@
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Engine.coffee</td>
|
||||
<td>lib/Types/BasicTypes.coffee</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inherits:</td>
|
||||
<td>
|
||||
<a href='../class/I.html'>I</a>
|
||||
<a href='../class/Insert.html'>Insert</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>A delimiter is placed at the end and at the beginning of the associative lists.
|
||||
This is necessary in order to have a beginning and an end even if the content
|
||||
This is necessary in order to have a beginning and an end even if the content
|
||||
of the Engine is empty.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
@ -51,10 +51,10 @@ of the Engine is empty.</p>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getLength-dynamic'>
|
||||
<a href='#isDeleted-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getLength</b><span>()</span>
|
||||
<b>isDeleted</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
@ -71,31 +71,54 @@ of the Engine is empty.</p>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<small>Inherited Method Summary</small>
|
||||
<h3 class='inherited'>
|
||||
Methods inherited from
|
||||
<a href='../class/I.html'>I</a>
|
||||
<a href='../class/Insert.html'>Insert</a>
|
||||
</h3>
|
||||
<p class='inherited'>
|
||||
<a href='../class/I.html#getLength-dynamic'>#getLength</a>
|
||||
<a href='../class/I.html#isDeleted-dynamic'>#isDeleted</a>
|
||||
<a href='../class/I.html#getDistanceToOrigin-dynamic'>#getDistanceToOrigin</a>
|
||||
<a href='../class/I.html#update_sl-dynamic'>#update_sl</a>
|
||||
<a href='../class/I.html#toJson-dynamic'>#toJson</a>
|
||||
<a href='../class/I.html#execute-dynamic'>#execute</a>
|
||||
<a href='../class/I.html#IT-dynamic'>#IT</a>
|
||||
<a href='../class/Insert.html#applyDelete-dynamic'>#applyDelete</a>
|
||||
<a href='../class/Insert.html#isDeleted-dynamic'>#isDeleted</a>
|
||||
<a href='../class/Insert.html#getDistanceToOrigin-dynamic'>#getDistanceToOrigin</a>
|
||||
<a href='../class/Insert.html#update_sl-dynamic'>#update_sl</a>
|
||||
<a href='../class/Insert.html#execute-dynamic'>#execute</a>
|
||||
<a href='../class/Insert.html#val-dynamic'>#val</a>
|
||||
<a href='../class/Operation.html#getUid-dynamic'>#getUid</a>
|
||||
<a href='../class/Operation.html#saveOperation-dynamic'>#saveOperation</a>
|
||||
<a href='../class/Operation.html#validateSavedOperations-dynamic'>#validateSavedOperations</a>
|
||||
</p>
|
||||
</h2>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getLength-dynamic'>
|
||||
<p class='signature' id='isDeleted-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getLength</b><span>()</span>
|
||||
<b>isDeleted</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
@ -109,10 +132,28 @@ of the Engine is empty.</p>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
July 18, 14 02:21:01 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -33,6 +33,12 @@
|
||||
<td>lib/Engine.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>The Engine handles how and in which order to execute operations and add operations to the HistoryBuffer.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -55,7 +61,6 @@
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
TODO:
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -111,11 +116,7 @@
|
||||
<b>applyOps</b><span>(ops_json)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>TODO:</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='cleanUp-dynamic'>
|
||||
@ -138,7 +139,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -54,6 +54,7 @@
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the user id with wich the History Buffer was initialized.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -65,6 +66,7 @@
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the operation counter that describes the current state of the document.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -119,25 +121,12 @@
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
~
|
||||
#
|
||||
(void)
|
||||
<b>new HistoryBuffer</b><span>()</span>
|
||||
<br>
|
||||
~
|
||||
(void)
|
||||
<b>new HistoryBuffer</b><span>(initial_content)</span>
|
||||
<b>constructor</b><span>(user_id)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<div class='overloads'>
|
||||
<h3>Overloads:</h3>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>new HistoryBuffer</b><span>()</span>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<div class='docstring'>
|
||||
<p>Creates an empty HB.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
@ -154,40 +143,6 @@
|
||||
<span class='desc'>Creator of the HB. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>new HistoryBuffer</b><span>(initial_content)</span>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Creates an HB with initial operations that represent the initial_value.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>initial_content</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Array<Object></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Initial content of the DUC </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='DUC'>DUC - Document Under Collaboration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -200,7 +155,11 @@
|
||||
<b>getUserId</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
<div class='docstring'>
|
||||
<p>Get the user id with wich the History Buffer was initialized.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getOperationCounter-dynamic'>
|
||||
@ -209,7 +168,11 @@
|
||||
<b>getOperationCounter</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
<div class='docstring'>
|
||||
<p>Get the operation counter that describes the current state of the document.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
@ -230,7 +193,7 @@
|
||||
<div class='docstring'>
|
||||
<p>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.
|
||||
You'll get new results only if you added the operation with $addOperation.</p>
|
||||
This will increment the operation counter.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
@ -257,7 +220,7 @@ You'll get new results only if you added the operation with $addOperation.</
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Add an operation to the HB. Note that this will not link it against
|
||||
other operations (it wont be executable)</p>
|
||||
other operations (it wont executed)</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
@ -265,7 +228,7 @@ other operations (it wont be executable)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
350
doc/class/Insert.html
Normal file
350
doc/class/Insert.html
Normal file
@ -0,0 +1,350 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! Documentation</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>Insert</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
Insert
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types/BasicTypes.coffee</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inherits:</td>
|
||||
<td>
|
||||
<a href='../class/Operation.html'>Operation</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>A simple insert-type operation.</p><p>An insert operation is always positioned between two other insert operations.
|
||||
Internally this is realized as associative lists, whereby each insert operation has a predecessor and a successor.
|
||||
For the sake of efficiency we maintain two lists: - The short-list (abbrev. sl) maintains only the operations that are not deleted - The complete-list (abbrev. cl) maintains all operations</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Direct Known Subclasses</h2>
|
||||
<p class='children'>
|
||||
<a href='../class/Delimiter.html'>Delimiter</a>
|
||||
</p>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#applyDelete-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>applyDelete</b><span>(o)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#isDeleted-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>isDeleted</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
If isDeleted() is true this operation won't be maintained in the sl
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getDistanceToOrigin-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getDistanceToOrigin</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
The amount of positions that $this operation was moved to the right.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#update_sl-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>update_sl</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Update the short list TODO (Unused)
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Include this operation in the associative lists.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
<small>Inherited Method Summary</small>
|
||||
<h3 class='inherited'>
|
||||
Methods inherited from
|
||||
<a href='../class/Operation.html'>Operation</a>
|
||||
</h3>
|
||||
<p class='inherited'>
|
||||
<a href='../class/Operation.html#getUid-dynamic'>#getUid</a>
|
||||
<a href='../class/Operation.html#execute-dynamic'>#execute</a>
|
||||
<a href='../class/Operation.html#saveOperation-dynamic'>#saveOperation</a>
|
||||
<a href='../class/Operation.html#validateSavedOperations-dynamic'>#validateSavedOperations</a>
|
||||
</p>
|
||||
</h2>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(uid, prev_cl, next_cl, origin)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>creator</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>A unique user identifier </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>op_number</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Integer</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>This Number was assigned via getNextOperationIdentifier(). </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>prev_cl</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt><a href='../class/Operation.html'>Operation</a></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The predecessor of this operation in the complete-list (cl) </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>next_cl</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt><a href='../class/Operation.html'>Operation</a></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The successor of this operation in the complete-list (cl) </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='HistoryBuffer.getNextOperationIdentifier'>HistoryBuffer.getNextOperationIdentifier</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='applyDelete-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>applyDelete</b><span>(o)</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='isDeleted-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>isDeleted</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>If isDeleted() is true this operation won't be maintained in the sl</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getDistanceToOrigin-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getDistanceToOrigin</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>The amount of positions that $this operation was moved to the right.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='update_sl-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>update_sl</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Update the short list
|
||||
TODO (Unused)</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Include this operation in the associative lists.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -33,6 +33,21 @@
|
||||
<td>lib/Connectors/IwcConnector.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>The Iwc Connector adds support for the Inter-Widget-Communication protocol that is used in the Role-SDK.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication'>http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='http://dbis.rwth-aachen.de/cms/projects/ROLE'>http://dbis.rwth-aachen.de/cms/projects/ROLE</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -153,7 +168,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,17 +39,24 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Manages Object-like values.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
~
|
||||
(void)
|
||||
<b>val</b><span>(name, content)</span>
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get this as a Json object.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -80,12 +87,98 @@
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
~
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
~
|
||||
(void)
|
||||
<b>val</b><span>(name)</span>
|
||||
<br>
|
||||
~
|
||||
(void)
|
||||
<b>val</b><span>(name, content)</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
<div class='docstring'>
|
||||
<p>Get this as a Json object. Note that none of the values of the result is of type Operation.
|
||||
Get value of a property.
|
||||
Set a new property.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<div class='overloads'>
|
||||
<h3>Overloads:</h3>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>@results [Json]</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>val</b><span>(name)</span>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>@results [JsonType|WordType]</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Name of the object property. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>val</b><span>(name, content)</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Name of the object property. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>content</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object|String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Content of the object property. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
@ -99,7 +192,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -33,6 +33,12 @@
|
||||
<td>lib/Frameworks/JsonYatta.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Framework for arbitrary Json data-structures.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -173,7 +179,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,6 +39,12 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Manages a list of Insert-type operations.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Direct Known Subclasses</h2>
|
||||
<p class='children'>
|
||||
<a href='../class/ReplaceManager.html'>ReplaceManager</a>
|
||||
@ -165,7 +171,7 @@ Doesn't return left-right delimiter.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,6 +39,12 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Manages map like objects. E.g. Json-Type and XML attributes.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -79,7 +85,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -35,13 +35,251 @@
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>A generic interface to operations.</p>
|
||||
<p>A generic interface to operations.</p><p>An operation has the following methods:
|
||||
toJson: encodes an operation (needed only if instance of this operation is sent).
|
||||
execute: execute the effects of this operations. Good examples are Insert-type and AddName-type
|
||||
val: in the case that the operation holds a value</p><p>Furthermore an encodable operation has a parser.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Direct Known Subclasses</h2>
|
||||
<p class='children'>
|
||||
<a href='../class/Delete.html'>Delete</a>
|
||||
<a href='../class/Insert.html'>Insert</a>
|
||||
</p>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getUid-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUid</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Computes a unique identifier (uid).
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Notify the all the listeners.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#saveOperation-dynamic'>
|
||||
~
|
||||
(void)
|
||||
<b>saveOperation</b><span>(name, op_uid)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Operations may depend on other operations (linked lists, etc.).
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#validateSavedOperations-dynamic'>
|
||||
#
|
||||
(Boolean)
|
||||
<b>validateSavedOperations</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
After calling this function all not instantiated operations will be accessible.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(uid)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>uid</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>A unique identifier </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='HistoryBuffer.getNextOperationIdentifier'>HistoryBuffer.getNextOperationIdentifier</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getUid-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUid</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Computes a unique identifier (uid).</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Notify the all the listeners.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='saveOperation-dynamic'>
|
||||
~
|
||||
(void)
|
||||
<b>saveOperation</b><span>(name, op_uid)</span>
|
||||
<br>
|
||||
~
|
||||
(void)
|
||||
<b>saveOperation</b><span>(name, op)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Operations may depend on other operations (linked lists, etc.).
|
||||
The saveOperation and validateSavedOperations methods provide
|
||||
an easy way to refer to these operations via an uid or object reference.</p><p>For example: We can create a new Delete operation that deletes the operation $o like this</p><pre><code>- var d = new Delete(uid, $o); or
|
||||
- var d = new Delete(uid, $o.getUid());
|
||||
</code></pre><p>Either way we want to access $o via d.deletes. In the second case validateSavedOperations must be called first.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<div class='overloads'>
|
||||
<h3>Overloads:</h3>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>saveOperation</b><span>(name, op_uid)</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The name of the operation. After validating (with validateSavedOperations) the instantiated operation will be accessible via this[name]. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>op_uid</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>A uid that refers to an operation </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>saveOperation</b><span>(name, op)</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The name of the operation. After calling this function op is accessible via this[name]. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>op</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt><a href='../class/Operation.html'>Operation</a></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>An Operation object </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='validateSavedOperations-dynamic'>
|
||||
#
|
||||
(Boolean)
|
||||
<b>validateSavedOperations</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>After calling this function all not instantiated operations will be accessible.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Boolean</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Whether it was possible to instantiate all operations. </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Operation.saveOperation'>Operation.saveOperation</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,6 +39,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Adds support for replace. The ReplaceManager manages Replaceable operations.
|
||||
Each Replaceable holds a value that is now replaceable.</p><p>The Word-type has implemented support for replace</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='../class/Word.html'>Word</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -132,7 +145,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -41,10 +41,64 @@
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Extends the basic Insert type.</p>
|
||||
<p>The ReplaceManager manages Replaceables.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='../class/ReplaceManager.html'>ReplaceManager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#replace-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>replace</b><span>(content)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Convert all relevant information of this operation to the json-format.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
@ -55,11 +109,55 @@
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='replace-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>replace</b><span>(content)</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Convert all relevant information of this operation to the json-format.
|
||||
This result can be send to other clients.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -33,6 +33,12 @@
|
||||
<td>lib/Connectors/TestConnector.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>A trivial Connector that simulates network delay.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -213,7 +219,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -41,7 +41,7 @@
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Extends the basic Insert type.</p>
|
||||
<p>Extends the basic Insert type to an operation that holds a text value</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
@ -149,7 +149,7 @@ This result can be send to other clients.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -33,6 +33,12 @@
|
||||
<td>lib/Frameworks/TextYatta.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Framework for Text Datastructures.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -233,7 +239,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,6 +39,12 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Handles a Text-like data structures with support for insertText/deleteText at a word-position.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
@ -50,7 +56,7 @@
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
inserts a
|
||||
Inserts a string into the word
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -62,7 +68,7 @@
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Creates a set of delete operations
|
||||
Deletes a part of the word.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -74,6 +80,7 @@
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Replace the content of this word with another one.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -85,6 +92,7 @@
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
@returns [Json] A Json object.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -96,6 +104,8 @@
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
In most cases you would embed a Word in a Replaceable, wich is handled by the ReplaceManager in order to provide replace functionality.
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
@ -132,7 +142,7 @@
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>inserts a</p>
|
||||
<p>Inserts a string into the word</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
@ -145,7 +155,7 @@
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Creates a set of delete operations</p>
|
||||
<p>Deletes a part of the word.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
@ -157,7 +167,18 @@
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
<div class='docstring'>
|
||||
<p>Replace the content of this word with another one. Concurrent replacements are not merged!
|
||||
Only one of the replacements will be used.</p><p>Can only be used if the ReplaceManager was set!</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Word.setReplaceManager'>Word.setReplaceManager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
@ -166,7 +187,11 @@
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
<div class='docstring'>
|
||||
<p>@returns [Json] A Json object.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='setReplaceManager-dynamic'>
|
||||
@ -175,7 +200,12 @@
|
||||
<b>setReplaceManager</b><span>(op)</span>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
<div class='docstring'>
|
||||
<p>In most cases you would embed a Word in a Replaceable, wich is handled by the ReplaceManager in order
|
||||
to provide replace functionality.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
@ -189,7 +219,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -85,6 +85,42 @@
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delete.html' target='main'>
|
||||
Delete
|
||||
</a>
|
||||
<small class='parent'>
|
||||
<
|
||||
Operation
|
||||
</small>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html' target='main'>
|
||||
Insert
|
||||
</a>
|
||||
<small class='parent'>
|
||||
<
|
||||
Operation
|
||||
</small>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delimiter.html' target='main'>
|
||||
Delimiter
|
||||
</a>
|
||||
<small class='parent'>
|
||||
<
|
||||
Insert
|
||||
</small>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html' target='main'>
|
||||
JsonType
|
||||
|
@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -84,7 +84,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,7 +39,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -58,7 +58,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -68,7 +68,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -60,7 +60,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -58,7 +58,7 @@
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,7 +39,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,7 +39,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,7 +39,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,7 +39,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
@ -39,7 +39,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 02, 14 01:38:26 by
|
||||
August 03, 14 03:14:41 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
|
File diff suppressed because one or more lines are too long
@ -37,6 +37,14 @@
|
||||
(HistoryBuffer)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html#applyDelete-dynamic' target='main' title='applyDelete'>
|
||||
#applyDelete
|
||||
</a>
|
||||
<small>
|
||||
(Insert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Engine.html#applyOp-dynamic' target='main' title='applyOp'>
|
||||
#applyOp
|
||||
@ -61,54 +69,6 @@
|
||||
(Engine)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextYatta.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(TextYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TestConnector.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(TestConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/ListManager.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(ListManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Word)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/HistoryBuffer.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(HistoryBuffer)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
@ -117,38 +77,6 @@
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Replaceable.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Replaceable)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextInsert.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(TextInsert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonYatta.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(JsonYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Engine.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Engine)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/AddName.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
@ -157,6 +85,38 @@
|
||||
(AddName)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Insert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Word)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delete.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Delete)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Replaceable.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Replaceable)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/MapManager.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
@ -165,6 +125,46 @@
|
||||
(MapManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Operation.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Operation)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/ListManager.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(ListManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Engine.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(Engine)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/HistoryBuffer.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(HistoryBuffer)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/ReplaceManager.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
@ -173,6 +173,38 @@
|
||||
(ReplaceManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TestConnector.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(TestConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonYatta.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(JsonYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextYatta.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(TextYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextInsert.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(TextInsert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/IwcConnector.coffee.html#createIwcConnector-' target='main' title='createIwcConnector'>
|
||||
~createIwcConnector
|
||||
@ -181,14 +213,6 @@
|
||||
(lib/Connectors/IwcConnector.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#deleteText-dynamic' target='main' title='deleteText'>
|
||||
#deleteText
|
||||
</a>
|
||||
<small>
|
||||
(Word)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextYatta.html#deleteText-dynamic' target='main' title='deleteText'>
|
||||
#deleteText
|
||||
@ -197,6 +221,38 @@
|
||||
(TextYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#deleteText-dynamic' target='main' title='deleteText'>
|
||||
#deleteText
|
||||
</a>
|
||||
<small>
|
||||
(Word)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Operation.html#execute-dynamic' target='main' title='execute'>
|
||||
#execute
|
||||
</a>
|
||||
<small>
|
||||
(Operation)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delimiter.html#execute-dynamic' target='main' title='execute'>
|
||||
#execute
|
||||
</a>
|
||||
<small>
|
||||
(Delimiter)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html#execute-dynamic' target='main' title='execute'>
|
||||
#execute
|
||||
</a>
|
||||
<small>
|
||||
(Insert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/AddName.html#execute-dynamic' target='main' title='execute'>
|
||||
#execute
|
||||
@ -205,6 +261,22 @@
|
||||
(AddName)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Replaceable.html#execute-dynamic' target='main' title='execute'>
|
||||
#execute
|
||||
</a>
|
||||
<small>
|
||||
(Replaceable)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delete.html#execute-dynamic' target='main' title='execute'>
|
||||
#execute
|
||||
</a>
|
||||
<small>
|
||||
(Delete)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TestConnector.html#flushAll-dynamic' target='main' title='flushAll'>
|
||||
#flushAll
|
||||
@ -245,6 +317,22 @@
|
||||
(JsonYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delimiter.html#getDistanceToOrigin-dynamic' target='main' title='getDistanceToOrigin'>
|
||||
#getDistanceToOrigin
|
||||
</a>
|
||||
<small>
|
||||
(Delimiter)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html#getDistanceToOrigin-dynamic' target='main' title='getDistanceToOrigin'>
|
||||
#getDistanceToOrigin
|
||||
</a>
|
||||
<small>
|
||||
(Insert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextYatta.html#getEngine-dynamic' target='main' title='getEngine'>
|
||||
#getEngine
|
||||
@ -341,6 +429,14 @@
|
||||
(TestConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#getRootElement-dynamic' target='main' title='getRootElement'>
|
||||
#getRootElement
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonYatta.html#getRootElement-dynamic' target='main' title='getRootElement'>
|
||||
#getRootElement
|
||||
@ -350,11 +446,11 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#getRootElement-dynamic' target='main' title='getRootElement'>
|
||||
<a href='class/TextYatta.html#getRootElement-dynamic' target='main' title='getRootElement'>
|
||||
#getRootElement
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
(TextYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -366,11 +462,19 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextYatta.html#getRootElement-dynamic' target='main' title='getRootElement'>
|
||||
#getRootElement
|
||||
<a href='class/Operation.html#getUid-dynamic' target='main' title='getUid'>
|
||||
#getUid
|
||||
</a>
|
||||
<small>
|
||||
(TextYatta)
|
||||
(Operation)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonYatta.html#getUserId-dynamic' target='main' title='getUserId'>
|
||||
#getUserId
|
||||
</a>
|
||||
<small>
|
||||
(JsonYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -389,14 +493,6 @@
|
||||
(TextYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonYatta.html#getUserId-dynamic' target='main' title='getUserId'>
|
||||
#getUserId
|
||||
</a>
|
||||
<small>
|
||||
(JsonYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#insertText-dynamic' target='main' title='insertText'>
|
||||
#insertText
|
||||
@ -413,6 +509,22 @@
|
||||
(TextYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delimiter.html#isDeleted-dynamic' target='main' title='isDeleted'>
|
||||
#isDeleted
|
||||
</a>
|
||||
<small>
|
||||
(Delimiter)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html#isDeleted-dynamic' target='main' title='isDeleted'>
|
||||
#isDeleted
|
||||
</a>
|
||||
<small>
|
||||
(Insert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Engine.html#parseOperation-dynamic' target='main' title='parseOperation'>
|
||||
#parseOperation
|
||||
@ -421,14 +533,6 @@
|
||||
(Engine)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#receive-dynamic' target='main' title='receive'>
|
||||
#receive
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TestConnector.html#receive-dynamic' target='main' title='receive'>
|
||||
#receive
|
||||
@ -437,6 +541,14 @@
|
||||
(TestConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#receive-dynamic' target='main' title='receive'>
|
||||
#receive
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/ReplaceManager.html#replace-dynamic' target='main' title='replace'>
|
||||
#replace
|
||||
@ -445,6 +557,22 @@
|
||||
(ReplaceManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Replaceable.html#replace-dynamic' target='main' title='replace'>
|
||||
#replace
|
||||
</a>
|
||||
<small>
|
||||
(Replaceable)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#replaceText-dynamic' target='main' title='replaceText'>
|
||||
#replaceText
|
||||
</a>
|
||||
<small>
|
||||
(Word)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextYatta.html#replaceText-dynamic' target='main' title='replaceText'>
|
||||
#replaceText
|
||||
@ -454,11 +582,11 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#replaceText-dynamic' target='main' title='replaceText'>
|
||||
#replaceText
|
||||
<a href='class/Operation.html#saveOperation-dynamic' target='main' title='saveOperation'>
|
||||
#saveOperation
|
||||
</a>
|
||||
<small>
|
||||
(Word)
|
||||
(Operation)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -493,14 +621,6 @@
|
||||
(Word)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TestConnector.html#sync-dynamic' target='main' title='sync'>
|
||||
#sync
|
||||
</a>
|
||||
<small>
|
||||
(TestConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#sync-dynamic' target='main' title='sync'>
|
||||
#sync
|
||||
@ -509,6 +629,14 @@
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TestConnector.html#sync-dynamic' target='main' title='sync'>
|
||||
#sync
|
||||
</a>
|
||||
<small>
|
||||
(TestConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/ListManager.html#toArray-dynamic' target='main' title='toArray'>
|
||||
#toArray
|
||||
@ -517,22 +645,6 @@
|
||||
(ListManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/ReplaceManager.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(ReplaceManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/AddName.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(AddName)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/HistoryBuffer.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
@ -541,6 +653,14 @@
|
||||
(HistoryBuffer)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Delete.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(Delete)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
@ -550,11 +670,11 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextInsert.html#toJson-dynamic' target='main' title='toJson'>
|
||||
<a href='class/ReplaceManager.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(TextInsert)
|
||||
(ReplaceManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -566,35 +686,43 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextInsert.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
<a href='class/TextInsert.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(TextInsert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/MapManager.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
<a href='class/AddName.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(MapManager)
|
||||
(AddName)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonYatta.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
<a href='class/Delimiter.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(JsonYatta)
|
||||
(Delimiter)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextYatta.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
<a href='class/Replaceable.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(TextYatta)
|
||||
(Replaceable)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html#update_sl-dynamic' target='main' title='update_sl'>
|
||||
#update_sl
|
||||
</a>
|
||||
<small>
|
||||
(Insert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -606,11 +734,19 @@
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#val-dynamic' target='main' title='val'>
|
||||
<a href='class/TextInsert.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(Word)
|
||||
(TextInsert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Replaceable.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(Replaceable)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
@ -621,6 +757,54 @@
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextYatta.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(TextYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonYatta.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(JsonYatta)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Insert.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(Insert)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Word.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(Word)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/MapManager.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(MapManager)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/Operation.html#validateSavedOperations-dynamic' target='main' title='validateSavedOperations'>
|
||||
#validateSavedOperations
|
||||
</a>
|
||||
<small>
|
||||
(Operation)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
@ -16,7 +16,11 @@ createIwcConnector = (callback)->
|
||||
root_element = null
|
||||
received_HB = null
|
||||
|
||||
|
||||
#
|
||||
# The Iwc Connector adds support for the Inter-Widget-Communication protocol that is used in the Role-SDK.
|
||||
# @see http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication
|
||||
# @see http://dbis.rwth-aachen.de/cms/projects/ROLE
|
||||
#
|
||||
class IwcConnector
|
||||
constructor: (@engine, @HB, @execution_listener, @yatta)->
|
||||
@duiClient = duiClient
|
||||
|
@ -2,6 +2,10 @@
|
||||
_ = require "underscore"
|
||||
|
||||
module.exports = (user_list)->
|
||||
|
||||
#
|
||||
# A trivial Connector that simulates network delay.
|
||||
#
|
||||
class TestConnector
|
||||
constructor: (@engine, @HB, @execution_listener)->
|
||||
send_ = (o)=>
|
||||
|
@ -1,4 +1,7 @@
|
||||
|
||||
#
|
||||
# The Engine handles how and in which order to execute operations and add operations to the HistoryBuffer.
|
||||
#
|
||||
class Engine
|
||||
constructor: (@HB, @parser)->
|
||||
@unprocessed_ops = []
|
||||
@ -10,7 +13,6 @@ class Engine
|
||||
else
|
||||
throw new Error "You forgot to specify a parser for type #{json.type}. The message is #{JSON.stringify json}."
|
||||
|
||||
# TODO:
|
||||
applyOps: (ops_json)->
|
||||
ops = []
|
||||
for o in ops_json
|
||||
|
@ -3,6 +3,9 @@ json_types_uninitialized = require "../Types/JsonTypes.coffee"
|
||||
HistoryBuffer = require "../HistoryBuffer.coffee"
|
||||
Engine = require "../Engine.coffee"
|
||||
|
||||
#
|
||||
# Framework for arbitrary Json data-structures.
|
||||
#
|
||||
class JsonYatta
|
||||
constructor: (user_id, Connector)->
|
||||
@HB = new HistoryBuffer user_id
|
||||
|
@ -3,6 +3,9 @@ text_types_uninitialized = require "../Types/TextTypes.coffee"
|
||||
HistoryBuffer = require "../HistoryBuffer.coffee"
|
||||
Engine = require "../Engine.coffee"
|
||||
|
||||
#
|
||||
# Framework for Text Datastructures.
|
||||
#
|
||||
class TextYatta
|
||||
constructor: (user_id, Connector)->
|
||||
@HB = new HistoryBuffer user_id
|
||||
|
@ -5,21 +5,25 @@
|
||||
# @note The HistoryBuffer is commonly abbreviated to HB.
|
||||
#
|
||||
class HistoryBuffer
|
||||
# @overload new HistoryBuffer()
|
||||
# Creates an empty HB.
|
||||
# @param {Object} user_id Creator of the HB.
|
||||
# @overload new HistoryBuffer(initial_content)
|
||||
# Creates an HB with initial operations that represent the initial_value.
|
||||
# @param {Array<Object>} initial_content Initial content of the DUC
|
||||
# @see DUC DUC - Document Under Collaboration
|
||||
|
||||
#
|
||||
# Creates an empty HB.
|
||||
# @param {Object} user_id Creator of the HB.
|
||||
#
|
||||
constructor: (@user_id)->
|
||||
@operation_counter = {}
|
||||
@buffer = {}
|
||||
@change_listeners = []
|
||||
|
||||
#
|
||||
# Get the user id with wich the History Buffer was initialized.
|
||||
#
|
||||
getUserId: ()->
|
||||
@user_id
|
||||
|
||||
#
|
||||
# Get the operation counter that describes the current state of the document.
|
||||
#
|
||||
getOperationCounter: ()->
|
||||
res = {}
|
||||
for user,ctn of @operation_counter
|
||||
@ -34,9 +38,10 @@ class HistoryBuffer
|
||||
json.push o.toJson()
|
||||
json
|
||||
|
||||
#
|
||||
# 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.
|
||||
# You'll get new results only if you added the operation with $addOperation.
|
||||
# This will increment the operation counter.
|
||||
#
|
||||
getNextOperationIdentifier: (user_id)->
|
||||
if not user_id?
|
||||
@ -59,7 +64,7 @@ class HistoryBuffer
|
||||
throw new Error "This type of uid is not defined!"
|
||||
|
||||
# Add an operation to the HB. Note that this will not link it against
|
||||
# other operations (it wont be executable)
|
||||
# other operations (it wont executed)
|
||||
addOperation: (o)->
|
||||
if not @buffer[o.creator]?
|
||||
@buffer[o.creator] = {}
|
||||
|
@ -6,15 +6,29 @@ module.exports = (HB)->
|
||||
#
|
||||
# A generic interface to operations.
|
||||
#
|
||||
# An operation has the following methods:
|
||||
# toJson: encodes an operation (needed only if instance of this operation is sent).
|
||||
# execute: execute the effects of this operations. Good examples are Insert-type and AddName-type
|
||||
# val: in the case that the operation holds a value
|
||||
#
|
||||
# Furthermore an encodable operation has a parser.
|
||||
#
|
||||
class Operation
|
||||
# @param {Object} uid A unique identifier
|
||||
# @see HistoryBuffer.getNextOperationIdentifier
|
||||
constructor: ({'creator': @creator, 'op_number' : @op_number})->
|
||||
constructor: (uid)->
|
||||
{
|
||||
'creator': @creator
|
||||
'op_number' : @op_number
|
||||
} = uid
|
||||
|
||||
# Computes a unique identifier (uid).
|
||||
getUid: ()->
|
||||
{ 'creator': @creator, 'op_number': @op_number }
|
||||
|
||||
#
|
||||
# Notify the all the listeners.
|
||||
#
|
||||
execute: ()->
|
||||
@is_executed = true
|
||||
for l in execution_listener
|
||||
@ -22,13 +36,14 @@ module.exports = (HB)->
|
||||
@
|
||||
|
||||
#
|
||||
# Operations may depend on other operations (linked lists, etc.). The saveOperation and validateSavedOperations methods provide
|
||||
# Operations may depend on other operations (linked lists, etc.).
|
||||
# The saveOperation and validateSavedOperations methods provide
|
||||
# an easy way to refer to these operations via an uid or object reference.
|
||||
#
|
||||
# For example: We can create a new Delete operation that deletes the operation $o like this
|
||||
# - var d = new Delete(uid, $o); or
|
||||
# - var d = new Delete(uid, $o.getUid());
|
||||
# Either way we want to access $o via d.deletes. This is possible after calling validateSavedOperations.
|
||||
# Either way we want to access $o via d.deletes. In the second case validateSavedOperations must be called first.
|
||||
#
|
||||
# @overload saveOperation(name, op_uid)
|
||||
# @param {String} name The name of the operation. After validating (with validateSavedOperations) the instantiated operation will be accessible via this[name].
|
||||
@ -38,9 +53,12 @@ module.exports = (HB)->
|
||||
# @param {Operation} op An Operation object
|
||||
#
|
||||
saveOperation: (name, op)->
|
||||
|
||||
#
|
||||
# Every instance of $Operation must have an $execute function.
|
||||
# We use duck-typing to check if op is instantiated since there
|
||||
# could exist multiple classes of $Operation
|
||||
#
|
||||
if op?.execute?
|
||||
# is instantiated
|
||||
@[name] = op
|
||||
@ -73,7 +91,7 @@ module.exports = (HB)->
|
||||
|
||||
|
||||
#
|
||||
# A simple delete-type operation.
|
||||
# A simple Delete-type operation that deletes an Insert-type operation.
|
||||
#
|
||||
class Delete extends Operation
|
||||
constructor: (uid, deletes)->
|
||||
@ -91,6 +109,9 @@ module.exports = (HB)->
|
||||
'deletes': @deletes.getUid()
|
||||
}
|
||||
|
||||
#
|
||||
# Apply the deletion.
|
||||
#
|
||||
execute: ()->
|
||||
if @validateSavedOperations()
|
||||
@deletes.applyDelete @
|
||||
@ -100,9 +121,13 @@ module.exports = (HB)->
|
||||
false
|
||||
|
||||
#
|
||||
# Define how to parse $Delete operations.
|
||||
# Define how to parse Delete operations.
|
||||
#
|
||||
parser['Delete'] = ({'uid' : uid, 'deletes': deletes_uid})->
|
||||
parser['Delete'] = (o)->
|
||||
{
|
||||
'uid' : uid
|
||||
'deletes': deletes_uid
|
||||
} = o
|
||||
new Delete uid, deletes_uid
|
||||
|
||||
#
|
||||
@ -115,12 +140,15 @@ module.exports = (HB)->
|
||||
# - The complete-list (abbrev. cl) maintains all operations
|
||||
#
|
||||
class Insert extends Operation
|
||||
|
||||
#
|
||||
# @param {Object} creator A unique user identifier
|
||||
# @param {Integer} op_number This Number was assigned via getNextOperationIdentifier().
|
||||
# @param {Operation} prev_cl The predecessor of this operation in the complete-list (cl)
|
||||
# @param {Operation} next_cl The successor of this operation in the complete-list (cl)
|
||||
#
|
||||
# @see HistoryBuffer.getNextOperationIdentifier
|
||||
#
|
||||
constructor: (uid, prev_cl, next_cl, origin)->
|
||||
@saveOperation 'prev_cl', prev_cl
|
||||
@saveOperation 'next_cl', next_cl
|
||||
|
@ -5,6 +5,9 @@ module.exports = (HB)->
|
||||
types = text_types.types
|
||||
parser = text_types.parser
|
||||
|
||||
#
|
||||
# Manages Object-like values.
|
||||
#
|
||||
class JsonType extends types.MapManager
|
||||
constructor: (uid, initial_value)->
|
||||
super uid
|
||||
@ -14,18 +17,32 @@ module.exports = (HB)->
|
||||
for name,o of initial_value
|
||||
@val name, o
|
||||
|
||||
#
|
||||
# Get this as a Json object. Note that none of the values of the result is of type Operation.
|
||||
# @overload val()
|
||||
# @results [Json]
|
||||
#
|
||||
# Get value of a property.
|
||||
# @overload val(name)
|
||||
# @param {String} name Name of the object property.
|
||||
# @results [JsonType|WordType]
|
||||
#
|
||||
# Set a new property.
|
||||
# @overload val(name, content)
|
||||
# @param {String} name Name of the object property.
|
||||
# @param {Object|String} content Content of the object property.
|
||||
#
|
||||
val: (name, content)->
|
||||
if name? and content?
|
||||
if typeof content is 'string'
|
||||
word = HB.addOperation(new types.Word HB.getNextOperationIdentifier(), content).execute()
|
||||
super name, word
|
||||
content
|
||||
else if typeof content is 'object'
|
||||
json = HB.addOperation(JsonType HB.getNextOperationIdentifier(), content).execute()
|
||||
super name, json
|
||||
content
|
||||
else
|
||||
throw new Error "You must not set #{typeof content}-types in collaborative Json-objects!"
|
||||
@
|
||||
else
|
||||
super name, content
|
||||
|
||||
|
@ -5,6 +5,9 @@ module.exports = (HB)->
|
||||
types = basic_types.types
|
||||
parser = basic_types.parser
|
||||
|
||||
#
|
||||
# Manages map like objects. E.g. Json-Type and XML attributes.
|
||||
#
|
||||
class MapManager extends types.Operation
|
||||
constructor: (uid)->
|
||||
@map = {}
|
||||
@ -23,6 +26,12 @@ module.exports = (HB)->
|
||||
result[name] = o.val()
|
||||
result
|
||||
|
||||
#
|
||||
# When a new property in a map manager is created, then the uids of the inserted Operations
|
||||
# must be unique (think about concurrent operations). Therefore only an AddName operation is allowed to
|
||||
# add a property in a MapManager. If two AddName operations on the same MapManager name happen concurrently
|
||||
# only one will AddName operation will be executed.
|
||||
#
|
||||
class AddName extends types.Operation
|
||||
constructor: (uid, map_manager, @name)->
|
||||
@saveOperation 'map_manager', map_manager
|
||||
@ -61,7 +70,9 @@ module.exports = (HB)->
|
||||
} = json
|
||||
new AddName uid, map_manager, name
|
||||
|
||||
|
||||
#
|
||||
# Manages a list of Insert-type operations.
|
||||
#
|
||||
class ListManager extends types.Insert
|
||||
constructor: (uid, beginning, end, prev, next, origin)->
|
||||
if beginning? and end?
|
||||
@ -110,7 +121,13 @@ module.exports = (HB)->
|
||||
throw new Error "position parameter exceeded the length of the document!"
|
||||
o
|
||||
|
||||
|
||||
#
|
||||
# Adds support for replace. The ReplaceManager manages Replaceable operations.
|
||||
# Each Replaceable holds a value that is now replaceable.
|
||||
#
|
||||
# The Word-type has implemented support for replace
|
||||
# @see Word
|
||||
#
|
||||
class ReplaceManager extends ListManager
|
||||
constructor: (initial_content, uid, beginning, end, prev, next, origin)->
|
||||
super uid, beginning, end, prev, next, origin
|
||||
@ -157,7 +174,8 @@ module.exports = (HB)->
|
||||
|
||||
|
||||
#
|
||||
# Extends the basic Insert type.
|
||||
# The ReplaceManager manages Replaceables.
|
||||
# @see ReplaceManager
|
||||
#
|
||||
class Replaceable extends types.Insert
|
||||
constructor: (content, parent, uid, prev, next, origin)->
|
||||
@ -167,8 +185,6 @@ module.exports = (HB)->
|
||||
throw new Error "You must define content, prev, and next for Replaceable-types!"
|
||||
super uid, prev, next, origin
|
||||
|
||||
#
|
||||
#
|
||||
val: ()->
|
||||
@content
|
||||
|
||||
|
@ -13,7 +13,7 @@ module.exports = (HB)->
|
||||
parser["TextDelete"] = parser["Delete"]
|
||||
|
||||
#
|
||||
# Extends the basic Insert type.
|
||||
# Extends the basic Insert type to an operation that holds a text value
|
||||
#
|
||||
class TextInsert extends types.Insert
|
||||
constructor: (@content, uid, prev, next, origin)->
|
||||
@ -67,20 +67,26 @@ module.exports = (HB)->
|
||||
} = json
|
||||
new TextInsert content, uid, prev, next, origin
|
||||
|
||||
#
|
||||
# Handles a Text-like data structures with support for insertText/deleteText at a word-position.
|
||||
#
|
||||
class Word extends types.ListManager
|
||||
constructor: (uid, initial_content, beginning, end, prev, next, origin)->
|
||||
super uid, beginning, end, prev, next, origin
|
||||
if initial_content?
|
||||
@insertText 0, initial_content
|
||||
|
||||
# inserts a
|
||||
#
|
||||
# Inserts a string into the word
|
||||
#
|
||||
insertText: (position, content)->
|
||||
o = @getOperationByPosition position
|
||||
for c in content
|
||||
op = new TextInsert c, HB.getNextOperationIdentifier(), o.prev_cl, o
|
||||
HB.addOperation(op).execute()
|
||||
|
||||
# Creates a set of delete operations
|
||||
#
|
||||
# Deletes a part of the word.
|
||||
#
|
||||
deleteText: (position, length)->
|
||||
o = @getOperationByPosition position
|
||||
|
||||
@ -93,6 +99,13 @@ module.exports = (HB)->
|
||||
o = o.next_cl
|
||||
d.toJson()
|
||||
|
||||
#
|
||||
# Replace the content of this word with another one. Concurrent replacements are not merged!
|
||||
# Only one of the replacements will be used.
|
||||
#
|
||||
# Can only be used if the ReplaceManager was set!
|
||||
# @see Word.setReplaceManager
|
||||
#
|
||||
replaceText: (text)->
|
||||
if @replace_manager?
|
||||
word = HB.addOperation(new Word HB.getNextOperationIdentifier()).execute()
|
||||
@ -101,6 +114,9 @@ module.exports = (HB)->
|
||||
else
|
||||
throw new Error "This type is currently not maintained by a ReplaceManager!"
|
||||
|
||||
#
|
||||
# @returns [Json] A Json object.
|
||||
#
|
||||
val: ()->
|
||||
c = for o in @toArray()
|
||||
if o.val?
|
||||
@ -109,6 +125,10 @@ module.exports = (HB)->
|
||||
""
|
||||
c.join('')
|
||||
|
||||
#
|
||||
# In most cases you would embed a Word in a Replaceable, wich is handled by the ReplaceManager in order
|
||||
# to provide replace functionality.
|
||||
#
|
||||
setReplaceManager: (op)->
|
||||
@saveOperation 'replace_manager', op
|
||||
@validateSavedOperations
|
||||
|
11
package.json
11
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Yatta",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"description": "A Collaboration Framework for arbitrary data structures that is NOT based on the Operational Transformation.",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"test": "grunt test"
|
||||
@ -14,7 +14,8 @@
|
||||
"OT",
|
||||
"Complex Data Structures",
|
||||
"XML",
|
||||
"collaboration"
|
||||
"collaboration",
|
||||
"Yata"
|
||||
],
|
||||
"author": "Kevin Jahns",
|
||||
"license": "LGPL",
|
||||
@ -23,8 +24,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/DadaMonad/Yatta",
|
||||
"dependencies": {
|
||||
"underscore": "^1.6.0",
|
||||
"grunt-contrib-connect": "~0.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt-contrib-coffee": "^0.10.1",
|
||||
@ -39,6 +38,8 @@
|
||||
"grunt-coffeelint": "0.0.10",
|
||||
"mocha": "^1.20.1",
|
||||
"browserify": "^4.2.0",
|
||||
"grunt-codo": "^0.2.0"
|
||||
"grunt-codo": "^0.2.0",
|
||||
"underscore": "^1.6.0",
|
||||
"grunt-contrib-connect": "~0.8.0"
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ chai.use(sinonChai)
|
||||
|
||||
Yatta = require "../lib/Frameworks/JsonYatta.coffee"
|
||||
Connector_uninitialized = require "../lib/Connectors/TestConnector.coffee"
|
||||
|
||||
###
|
||||
describe "JsonYatta", ->
|
||||
beforeEach (done)->
|
||||
@last_user = 10
|
||||
@ -17,14 +17,15 @@ describe "JsonYatta", ->
|
||||
@Connector = Connector_uninitialized @users
|
||||
for i in [0..(@last_user+1)]
|
||||
@users.push(new Yatta i, @Connector)
|
||||
|
||||
|
||||
done()
|
||||
|
||||
it "can handle many engines, many operations, concurrently (random)", ->
|
||||
number_of_test_cases_multiplier = 1
|
||||
repeat_this = 1 * number_of_test_cases_multiplier
|
||||
repeat_this = 100 * number_of_test_cases_multiplier
|
||||
doSomething_amount = 200 * number_of_test_cases_multiplier
|
||||
number_of_engines = 12 + number_of_test_cases_multiplier - 1
|
||||
#maximum_ops_per_engine = 20 * number_of_test_cases_multiplier
|
||||
|
||||
@time = 0
|
||||
@ops = 0
|
||||
@ -142,3 +143,4 @@ describe "JsonYatta", ->
|
||||
ops = printOpsInExecutionOrder i+1, i
|
||||
|
||||
console.log ""
|
||||
###
|
||||
|
@ -9,7 +9,7 @@ chai.use(sinonChai)
|
||||
|
||||
Yatta = require "../lib/Frameworks/TextYatta.coffee"
|
||||
Connector_uninitialized = require "../lib/Connectors/TestConnector.coffee"
|
||||
|
||||
###
|
||||
describe "TextYatta", ->
|
||||
beforeEach (done)->
|
||||
@last_user = 10
|
||||
@ -149,3 +149,4 @@ describe "TextYatta", ->
|
||||
# expect(users[i].ot.val()).to.equal(users[i+1].ot.val())
|
||||
|
||||
|
||||
###
|
||||
|
132
test/Yatta_test.coffee
Normal file
132
test/Yatta_test.coffee
Normal file
@ -0,0 +1,132 @@
|
||||
chai = require('chai')
|
||||
expect = chai.expect
|
||||
should = chai.should()
|
||||
sinon = require('sinon')
|
||||
sinonChai = require('sinon-chai')
|
||||
_ = require "underscore"
|
||||
|
||||
chai.use(sinonChai)
|
||||
|
||||
Yatta = require "../lib/Frameworks/JsonYatta.coffee"
|
||||
Connector_uninitialized = require "../lib/Connectors/TestConnector.coffee"
|
||||
|
||||
class Test
|
||||
constructor: ()->
|
||||
@number_of_test_cases_multiplier = 1
|
||||
@repeat_this = 100 * @number_of_test_cases_multiplier
|
||||
@doSomething_amount = 200 * @number_of_test_cases_multiplier
|
||||
@number_of_engines = 12 + @number_of_test_cases_multiplier - 1
|
||||
|
||||
@time = 0
|
||||
@ops = 0
|
||||
|
||||
@reinitialize()
|
||||
|
||||
reinitialize: ()->
|
||||
|
||||
@users = []
|
||||
@Connector = Connector_uninitialized @users
|
||||
@users.push(new Yatta 0, @Connector)
|
||||
@users[0].val('name',"initial")
|
||||
for i in [1...@number_of_engines]
|
||||
@users.push(new Yatta i, @Connector)
|
||||
|
||||
getRandomText: ()->
|
||||
chars = "abcdefghijklmnopqrstuvwxyz"
|
||||
length = _.random 0, 10
|
||||
nextchar = chars[(_.random 0, (chars.length-1))]
|
||||
text = ""
|
||||
_(length).times ()-> text += nextchar
|
||||
text
|
||||
|
||||
generateInsertOp: (user_num)=>
|
||||
pos = _.random 0, (@users[user_num].val('name').val().length-1)
|
||||
@users[user_num].val('name').insertText pos, @getRandomText()
|
||||
null
|
||||
|
||||
generateReplaceOp: (user_num)=>
|
||||
@users[user_num].val('name').replaceText @getRandomText()
|
||||
null
|
||||
|
||||
generateDeleteOp: (user_num)=>
|
||||
if @users[user_num].val('name').val().length > 0
|
||||
pos = _.random 0, (@users[user_num].val('name').val().length-1) # TODO!!!!
|
||||
length = 1 # _.random 0, ot.val('name').length - pos TODO:!!!
|
||||
ops1 = @users[user_num].val('name').deleteText pos, length
|
||||
undefined
|
||||
|
||||
generateRandomOp: (user_num)=>
|
||||
op_gen = [@generateDeleteOp, @generateInsertOp, @generateReplaceOp]
|
||||
i = _.random (op_gen.length - 1)
|
||||
op = op_gen[i](user_num)
|
||||
|
||||
applyRandomOp: (user_num)=>
|
||||
user = @users[user_num]
|
||||
user.getConnector().flushOneRandom()
|
||||
|
||||
doSomething: ()->
|
||||
user_num = _.random (@number_of_engines-1)
|
||||
choices = [@applyRandomOp, @generateRandomOp]
|
||||
choice = _.random (choices.length-1)
|
||||
choices[choice](user_num)
|
||||
|
||||
flushAll: ()->
|
||||
for user,user_number in @users
|
||||
user.getConnector().flushAll()
|
||||
|
||||
run: ()->
|
||||
for times in [1..@repeat_this]
|
||||
@reinitialize()
|
||||
time_now = (new Date).getTime()
|
||||
for i in [1..@doSomething_amount]
|
||||
@doSomething()
|
||||
|
||||
@flushAll()
|
||||
|
||||
@time += (new Date()).getTime() - time_now
|
||||
|
||||
number_of_created_operations = 0
|
||||
for i in [0...(@users.length)]
|
||||
number_of_created_operations += @users[i].getConnector().getOpsInExecutionOrder().length
|
||||
@ops += number_of_created_operations*@users.length
|
||||
|
||||
ops_per_msek = Math.floor(@ops/@time)
|
||||
console.log "#{times}/#{@repeat_this}: Every collaborator (#{@users.length}) applied #{@number_of_created_operations} ops in a different order." + " Over all we consumed #{@ops} operations in #{@time/1000} seconds (#{ops_per_msek} ops/msek)."
|
||||
|
||||
#console.log users[0].val('name').val()
|
||||
for i in [0...(@users.length-1)]
|
||||
if ((@users[i].val('name').val() isnt @users[i+1].val('name').val()) )# and (number_of_created_operations <= 6 or true)) or found_error
|
||||
|
||||
printOpsInExecutionOrder = (otnumber, otherotnumber)->
|
||||
ops = @users[otnumber].getConnector().getOpsInExecutionOrder()
|
||||
for s in ops
|
||||
console.log JSON.stringify s
|
||||
console.log ""
|
||||
s = "ops = ["
|
||||
for o,j in ops
|
||||
if j isnt 0
|
||||
s += ", "
|
||||
s += "op#{j}"
|
||||
s += "]"
|
||||
console.log s
|
||||
console.log "@users[@last_user].ot.applyOps ops"
|
||||
console.log "expect(@users[@last_user].ot.val('name')).to.equal(\"#{users[otherotnumber].val('name')}\")"
|
||||
ops
|
||||
console.log ""
|
||||
console.log "Found an OT Puzzle!"
|
||||
console.log "OT states:"
|
||||
for u,j in users
|
||||
console.log "OT#{j}: "+u.val('name')
|
||||
console.log "\nOT execution order (#{i},#{i+1}):"
|
||||
printOpsInExecutionOrder i, i+1
|
||||
console.log ""
|
||||
ops = printOpsInExecutionOrder i+1, i
|
||||
|
||||
console.log ""
|
||||
|
||||
|
||||
describe "JsonYatta", ->
|
||||
|
||||
it "can handle many engines, many operations, concurrently (random)", ->
|
||||
yTest = new Test()
|
||||
yTest.run()
|
Loading…
x
Reference in New Issue
Block a user