100% documentation

This commit is contained in:
Kevin Jahns 2014-08-09 00:31:30 +02:00
parent baf4660733
commit b340bbe806
73 changed files with 1030 additions and 438 deletions

View File

@ -66,7 +66,7 @@ module.exports = (grunt) ->
name: "Yatta!" name: "Yatta!"
title: "Yatta! Documentation" title: "Yatta! Documentation"
extras: ["LICENSE.txt", "examples/README.md", "examples/IwcJson.md"] extras: ["LICENSE.txt", "examples/README.md", "examples/IwcJson.md"]
#undocumented: yes undocumented: yes
verbose: false verbose: false
stats: true stats: true
src: ["./lib"] src: ["./lib"]

View File

@ -13,8 +13,7 @@ Predefined data structures:
Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol. Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol.
Currently supported communication protocols: Currently supported communication protocols:
* [IWC](http://dbis.rwth-aachen.de/gadgets/iwc/resources/iwc.manual.pdf) - Inter-widget Communication * [IWC](http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication) - Inter-widget Communication
# Use it! # Use it!
Either clone this git repository or install this package with [bower](http://bower.io/). Either clone this git repository or install this package with [bower](http://bower.io/).
@ -43,7 +42,7 @@ This means that my approach beats all OT time complexities. Furthermore, it is p
show that it is never violated. show that it is never violated.
Another advantage of my approach is that propagated messages are very small. Another advantage of my approach is that propagated messages are very small.
Background: In real-time P2P OT algorithms you have to send a state-vector with every message that defines the state of the History Buffer Background: In real-time P2P OT algorithms you have to send a state-vector with each message that defines the state of the History Buffer
on which the operation was created. This is not necessary in Yata. on which the operation was created. This is not necessary in Yata.
One downside is that the History Buffer holds at least as many operations as there are characters in the document. One downside is that the History Buffer holds at least as many operations as there are characters in the document.

View File

@ -5,7 +5,7 @@
"authors": [ "authors": [
"Kevin Jahns <kevin.jahns@rwth-aachen.de>" "Kevin Jahns <kevin.jahns@rwth-aachen.de>"
], ],
"description": "A Framework for Real-Time collaboration on arbitrary data structures.", "description": "A Framework that enables Real-Time Collaboration on arbitrary data structures.",
"main": "./dest/browser/**", "main": "./dest/browser/**",
"keywords": [ "keywords": [
"OT", "OT",

View File

@ -77,10 +77,6 @@ createIwcConnector = function(callback) {
return this.duiClient.sendIntent(intent); return this.duiClient.sendIntent(intent);
}; };
IwcConnector.prototype.sync = function() {
throw new Error("Can't use this a.t.m.");
};
return IwcConnector; return IwcConnector;
})(); })();
@ -185,6 +181,7 @@ Engine = (function() {
Engine.prototype.applyOp = function(op_json) { Engine.prototype.applyOp = function(op_json) {
var o; var o;
o = this.parseOperation(op_json); o = this.parseOperation(op_json);
this.HB.addToCounter(o);
if (!o.execute()) { if (!o.execute()) {
this.unprocessed_ops.push(o); this.unprocessed_ops.push(o);
} else { } else {
@ -407,19 +404,22 @@ HistoryBuffer = (function() {
if (this.buffer[o.creator] == null) { if (this.buffer[o.creator] == null) {
this.buffer[o.creator] = {}; this.buffer[o.creator] = {};
} }
if (this.operation_counter[o.creator] == null) {
this.operation_counter[o.creator] = 0;
}
if (this.buffer[o.creator][o.op_number] != null) { if (this.buffer[o.creator][o.op_number] != null) {
throw new Error("You must not overwrite operations!"); throw new Error("You must not overwrite operations!");
} }
this.buffer[o.creator][o.op_number] = o; this.buffer[o.creator][o.op_number] = o;
if (typeof o.op_number === 'number' && o.creator !== this.getUserId()) {
this.operation_counter[o.creator]++;
}
return o; return o;
}; };
HistoryBuffer.prototype.addToCounter = function(o) {
if (this.operation_counter[o.creator] == null) {
this.operation_counter[o.creator] = 0;
}
if (typeof o.op_number === 'number' && o.creator !== this.getUserId()) {
return this.operation_counter[o.creator]++;
}
};
return HistoryBuffer; return HistoryBuffer;
})(); })();

File diff suppressed because one or more lines are too long

View File

@ -76,10 +76,6 @@ createIwcConnector = function(callback) {
return this.duiClient.sendIntent(intent); return this.duiClient.sendIntent(intent);
}; };
IwcConnector.prototype.sync = function() {
throw new Error("Can't use this a.t.m.");
};
return IwcConnector; return IwcConnector;
})(); })();

View File

@ -6,5 +6,5 @@
"IwcConnector.coffee" "IwcConnector.coffee"
], ],
"names": [], "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AA,cAAH;AACE,QAAA,cAAA,GAAiB,IAAjB,CAAA;eACA,QAAA,CAAS,YAAT,EAAuB,gBAAvB,EAFF;OAHU;IAAA,CAHZ,CAAA;AAAA,IASA,UAAW,CAAA,uBAAA,CAAX,GAAsC,CAAC,SAAD,CATtC,CAAA;WAUA,UAAA,CAAW,SAAX,EAAsB,CAAtB,EAXK;EAAA,CAzFP,CAAA;AAAA,EAsGA,UAAA,CAAW,IAAX,EAAkB,IAAI,CAAC,MAAL,CAAA,CAAA,GAAc,CAAhC,CAtGA,CAAA;SAwGA,OAzGmB;AAAA,CAArB,CAAA;;AAAA,MA0GM,CAAC,OAAP,GAAiB,kBA1GjB,CAAA;;;EA2GA,MAAM,CAAE,eAAR,GAA0B;CA3G1B"
} }

View File

@ -78,10 +78,6 @@ module.exports = function(user_list) {
return this.unexecuted = {}; return this.unexecuted = {};
}; };
TestConnector.prototype.sync = function() {
throw new Error("Can't use this a.t.m.");
};
return TestConnector; return TestConnector;
})(); })();

View File

@ -6,5 +6,5 @@
"TestConnector.coffee" "TestConnector.coffee"
], ],
"names": [], "names": [],
"mappings": "AACA,IAAA,CAAA;;AAAA,CAAA,GAAI,OAAA,CAAQ,YAAR,CAAJ,CAAA;;AAAA,MAEM,CAAC,OAAP,GAAiB,SAAC,SAAD,GAAA;AAKf,MAAA,aAAA;SAAM;AACS,IAAA,uBAAE,MAAF,EAAW,EAAX,EAAgB,kBAAhB,GAAA;AACX,UAAA,gCAAA;AAAA,MADY,IAAC,CAAA,SAAA,MACb,CAAA;AAAA,MADqB,IAAC,CAAA,KAAA,EACtB,CAAA;AAAA,MAD0B,IAAC,CAAA,qBAAA,kBAC3B,CAAA;AAAA,MAAA,KAAA,GAAQ,CAAA,SAAA,KAAA,GAAA;eAAA,SAAC,CAAD,GAAA;iBACN,KAAC,CAAA,IAAD,CAAM,CAAN,EADM;QAAA,EAAA;MAAA,CAAA,CAAA,CAAA,IAAA,CAAR,CAAA;AAAA,MAEA,IAAC,CAAA,k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op_json) {
var o; var o;
o = this.parseOperation(op_json); o = this.parseOperation(op_json);
this.HB.addToCounter(o);
if (!o.execute()) { if (!o.execute()) {
this.unprocessed_ops.push(o); this.unprocessed_ops.push(o);
} else { } else {

View File

@ -6,5 +6,5 @@
"Engine.coffee" "Engine.coffee"
], ],
"names": [], "names": [],
"mappings": "AAIA,IAAA,MAAA;;AAAA;AACe,EAAA,gBAAE,EAAF,EAAO,MAAP,GAAA;AACX,IADY,IAAC,CAAA,KAAA,EACb,CAAA;AAAA,IADiB,IAAC,CAAA,SAAA,MAClB,CAAA;AAAA,IAAA,IAAC,CAAA,eAAD,GAAmB,EAAnB,CADW;EAAA,CAAb;;AAAA,mBAMA,cAAA,GAAgB,SAAC,IAAD,GAAA;AACd,QAAA,UAAA;AAAA,IAAA,UAAA,GAAa,IAAC,CAAA,MAAO,CAAA,IAAI,CAAC,IAAL,CAArB,CAAA;AACA,IAAA,IAAG,kBAAH;aACE,UAAA,CAAW,IAAX,EADF;KAAA,MAAA;AAGE,YAAU,IAAA,KAAA,CAAO,0CAAA,GAAyC,IAAI,CAAC,IAA9C,GAAoD,mBAApD,GAAsE,CAAA,IAAI,CAAC,SAAL,CAAe,IAAf,CAAA,CAAtE,GAA2F,GAAlG,CAAV,CAHF;KAFc;EAAA,CANhB,CAAA;;AAAA,mBAiBA,cAAA,GAAgB,SAAC,QAAD,GAAA;AACd,QAAA,sCAAA;AAAA,IAAA,GAAA,GAAM,EAAN,CAAA;AACA,SAAA,+CAAA;uBAAA;AACE,MAAA,GAAG,CAAC,IAAJ,CAAS,IAAC,CAAA,cAAD,CAAgB,CAAhB,CAAT,CAAA,CADF;AAAA,KADA;AAGA,SAAA,4CAAA;kBAAA;AACE,MAAA,IAAC,CAAA,EAAE,CAAC,YAAJ,CAAiB,CAAjB,CAAA,CADF;AAAA,KAHA;AAKA,SAAA,4CAAA;kBAAA;AACE,MAAA,IAAG,CAAA,CAAK,CAAC,OAAF,CAAA,CAAP;AACE,QAAA,IAAC,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,CAAA,GAAD,CAAK,MAAL,EAAa,KAAb,EAAoB,WAApB,EAAA,CADF;AAAA;wBADF;OAAA,MAAA;AAIE,cAAU,IAAA,KAAA,CAAM,kCAAN,CAAV,CAJF;OADI;IAAA,CADN;GADF,CAzDA,CAAA;;mBAAA;;IAjBF,CAAA;;;EAkFA,MAAM,CAAE,SAAR,GAAoB;CAlFpB;;AAAA,MAmFM,CAAC,OAAP,GAAiB,SAnFjB,CAAA"
} }

View File

@ -8,20 +8,14 @@ Engine = require("../Engine.coffee");
TextYatta = (function() { TextYatta = (function() {
function TextYatta(user_id, Connector) { function TextYatta(user_id, Connector) {
var first_word, root_elem, text_types; var first_word, text_types;
this.HB = new HistoryBuffer(user_id); this.HB = new HistoryBuffer(user_id);
text_types = text_types_uninitialized(this.HB); text_types = text_types_uninitialized(this.HB);
this.engine = new Engine(this.HB, text_types.parser); this.engine = new Engine(this.HB, text_types.parser);
this.connector = new Connector(this.engine, this.HB, text_types.execution_listener); this.connector = new Connector(this.engine, this.HB, text_types.execution_listener);
root_elem = this.connector.getRootElement(); first_word = new text_types.types.Word(void 0);
if (root_elem == null) { this.HB.addOperation(first_word).execute();
first_word = new text_types.types.Word(this.HB.getNextOperationIdentifier()); this.root_element = first_word;
this.HB.addOperation(first_word);
first_word.execute();
this.root_element = this.HB.addOperation(new text_types.types.ReplaceManager(first_word, this.HB.getNextOperationIdentifier())).execute();
} else {
this.root_element = this.HB.getOperation(root_elem);
}
} }
TextYatta.prototype.getRootElement = function() { TextYatta.prototype.getRootElement = function() {
@ -45,19 +39,19 @@ TextYatta = (function() {
}; };
TextYatta.prototype.val = function() { TextYatta.prototype.val = function() {
return this.root_element.val().val(); return this.root_element.val();
}; };
TextYatta.prototype.insertText = function(pos, content) { TextYatta.prototype.insertText = function(pos, content) {
return this.root_element.val().insertText(pos, content); return this.root_element.insertText(pos, content);
}; };
TextYatta.prototype.deleteText = function(pos, length) { TextYatta.prototype.deleteText = function(pos, length) {
return this.root_element.val().deleteText(pos, length); return this.root_element.deleteText(pos, length);
}; };
TextYatta.prototype.replaceText = function(text) { TextYatta.prototype.replaceText = function(text) {
return this.root_element.val().replaceText(text); return this.root_element.replaceText(text);
}; };
return TextYatta; return TextYatta;

View File

@ -6,5 +6,5 @@
"TextYatta.coffee" "TextYatta.coffee"
], ],
"names": [], "names": [],
"mappings": "AACA,IAAA,0DAAA;;AAAA,wBAAA,GAA2B,OAAA,CAAQ,2BAAR,CAA3B,CAAA;;AAAA,aACA,GAAgB,OAAA,CAAQ,yBAAR,CADhB,CAAA;;AAAA,MAEA,GAAS,OAAA,CAAQ,kBAAR,CAFT,CAAA;;AAAA;AAQe,EAAA,mBAAC,OAAD,EAAU,SAAV,GAAA;AACX,QAAA,iCAAA;AAAA,IAAA,IAAC,CAAA,EAAD,GAAU,IAAA,aAAA,CAAc,OAAd,CAAV,CAAA;AAAA,IACA,UAAA,GAAa,wBAAA,CAAyB,IAAC,CAAA,EAA1B,CADb,CAAA;AAAA,IAEA,IAAC,CAAA,MAAD,GAAc,IAAA,MAAA,CAAO,IAAC,CAAA,EAAR,EAAY,UAAU,CAAC,MAAvB,CAFd,CAAA;AAAA,IAGA,IAAC,CAAA,SAAD,GAAiB,IAAA,SAAA,CAAU,IAAC,CAAA,MAAX,EAAmB,IAAC,CAAA,EAApB,EAAwB,UAAU,CAAC,kBAAnC,CAHjB,CAAA;AAAA,IAIA,SAAA,GAAY,IAAC,CAAA,SAAS,CAAC,cAAX,CAAA,CAJZ,CAAA;AAKA,IAAA,IAAO,iBAAP;AACE,MAAA,UAAA,GAAiB,IAAA,UAAU,CAAC,KAAK,CAAC,IAAjB,CAAsB,IAAC,CAAA,EAAE,CAAC,0BAAJ,CAAA,CAAtB,CAAjB,CAAA;AAAA,MACA,IAAC,CAAA,EAAE,CAAC,YAAJ,CAAiB,UAAjB,CADA,CAAA;AAAA,MAEA,UAAU,CAAC,OAAX,CAAA,CAFA,CAAA;AAAA,MAGA,IAAC,CAAA,YAAD,GAAgB,IA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nBX,CAAA;;AAAA,sBAyBA,YAAA,GAAc,SAAA,GAAA;WACZ,IAAC,CAAA,UADW;EAAA,CAzBd,CAAA;;AAAA,sBA+BA,gBAAA,GAAkB,SAAA,GAAA;WAChB,IAAC,CAAA,GADe;EAAA,CA/BlB,CAAA;;AAAA,sBAuCA,SAAA,GAAW,SAAA,GAAA;WACT,IAAC,CAAA,EAAE,CAAC,SAAJ,CAAA,EADS;EAAA,CAvCX,CAAA;;AAAA,sBA6CA,GAAA,GAAK,SAAA,GAAA;WACH,IAAC,CAAA,YAAY,CAAC,GAAd,CAAA,EADG;EAAA,CA7CL,CAAA;;AAAA,sBAmDA,UAAA,GAAY,SAAC,GAAD,EAAM,OAAN,GAAA;WACV,IAAC,CAAA,YAAY,CAAC,UAAd,CAAyB,GAAzB,EAA8B,OAA9B,EADU;EAAA,CAnDZ,CAAA;;AAAA,sBAyDA,UAAA,GAAY,SAAC,GAAD,EAAM,MAAN,GAAA;WACV,IAAC,CAAA,YAAY,CAAC,UAAd,CAAyB,GAAzB,EAA8B,MAA9B,EADU;EAAA,CAzDZ,CAAA;;AAAA,sBA+DA,WAAA,GAAa,SAAC,IAAD,GAAA;WACX,IAAC,CAAA,YAAY,CAAC,WAAd,CAA0B,IAA1B,EADW;EAAA,CA/Db,CAAA;;mBAAA;;IAbF,CAAA;;AAAA,MAgFM,CAAC,OAAP,GAAiB,SAhFjB,CAAA"
} }

View File

@ -100,19 +100,22 @@ HistoryBuffer = (function() {
if (this.buffer[o.creator] == null) { if (this.buffer[o.creator] == null) {
this.buffer[o.creator] = {}; this.buffer[o.creator] = {};
} }
if (this.operation_counter[o.creator] == null) {
this.operation_counter[o.creator] = 0;
}
if (this.buffer[o.creator][o.op_number] != null) { if (this.buffer[o.creator][o.op_number] != null) {
throw new Error("You must not overwrite operations!"); throw new Error("You must not overwrite operations!");
} }
this.buffer[o.creator][o.op_number] = o; this.buffer[o.creator][o.op_number] = o;
if (typeof o.op_number === 'number' && o.creator !== this.getUserId()) {
this.operation_counter[o.creator]++;
}
return o; return o;
}; };
HistoryBuffer.prototype.addToCounter = function(o) {
if (this.operation_counter[o.creator] == null) {
this.operation_counter[o.creator] = 0;
}
if (typeof o.op_number === 'number' && o.creator !== this.getUserId()) {
return this.operation_counter[o.creator]++;
}
};
return HistoryBuffer; return HistoryBuffer;
})(); })();

View File

@ -6,5 +6,5 @@
"HistoryBuffer.coffee" "HistoryBuffer.coffee"
], ],
"names": [], "names": [],
"mappings": "AAMA,IAAA,aAAA;;AAAA;AAMe,EAAA,uBAAE,OAAF,GAAA;AACX,IADY,IAAC,CAAA,UAAA,OACb,CAAA;AAAA,IAAA,IAAC,CAAA,iBAAD,GAAqB,EAArB,CAAA;AAAA,IACA,IAAC,CAAA,MAAD,GAAU,EADV,CAAA;AAAA,IAEA,IAAC,CAAA,gBAAD,GAAoB,EAFpB,CADW;EAAA,CAAb;;AAAA,0BAQA,SAAA,GAAW,SAAA,GAAA;WACT,IAAC,CAAA,QADQ;EAAA,CARX,CAAA;;AAAA,0BAiBA,2BAAA,GAA6B,SAAA,GAAA;WAC3B;AAAA,MACE,OAAA,EAAU,GADZ;AAAA,MAEE,SAAA,EAAY,GAFd;MAD2B;EAAA,CAjB7B,CAAA;;AAAA,0BA0BA,mBAAA,GAAqB,SAAA,GAAA;AACnB,QAAA,oBAAA;AAAA,IAAA,GAAA,GAAM,EAAN,CAAA;AACA;AAAA,SAAA,YAAA;uBAAA;AACE,MAAA,GAAI,CAAA,IAAA,CAAJ,GAAY,GAAZ,CADF;AAAA,KADA;WAGA,IAJmB;EAAA,CA1BrB,CAAA;;AAAA,0BAgCA,OAAA,GAAS,SAAC,YAAD,GAAA;AACP,QAAA,sEAAA;;MADQ,eAAa;KACrB;AAAA,IAAA,IAAA,GAAO,EAAP,CAAA;AAAA,IACA,OAAA,GAAU,SAAC,IAAD,EAAO,QAAP,GAAA;AACR,MAAA,IAAG,CAAK,YAAL,CAAA,IAAe,CAAK,gBAAL,CAAlB;AACE,cAAU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nB,QAAA,GAAA;AAAA,IACU,MACN,KADF,MADF,CAAA;WAGI,IAAA,QAAA,CAAS,GAAT,EAJe;EAAA,CAjMrB,CAAA;AAAA,EA0MA,KAAM,CAAA,UAAA,CAAN,GAAoB,QA1MpB,CAAA;SA4MA,WA7Me;AAAA,CAFjB,CAAA"
} }

File diff suppressed because one or more lines are too long

View File

@ -6,5 +6,5 @@
"TextTypes.coffee" "TextTypes.coffee"
], ],
"names": [], "names": [],
"mappings": "AAAA,IAAA,8BAAA;EAAA;iSAAA;;AAAA,8BAAA,GAAiC,OAAA,CAAQ,0BAAR,CAAjC,CAAA;;AAAA,MAEM,CAAC,OAAP,GAAiB,SAAC,EAAD,GAAA;AACf,MAAA,6DAAA;AAAA,EAAA,gBAAA,GAAmB,8BAAA,CAA+B,EAA/B,CAAnB,CAAA;AAAA,EACA,KAAA,GAAQ,gBAAgB,CAAC,KADzB,CAAA;AAAA,EAEA,MAAA,GAAS,gBAAgB,CAAC,MAF1B,CAAA;AAAA,EAQM;AAAN,iCAAA,CAAA;;;;KAAA;;sBAAA;;KAAyB,KAAK,CAAC,OAR/B,CAAA;AAAA,EASA,MAAO,CAAA,YAAA,CAAP,GAAuB,MAAO,CAAA,QAAA,CAT9B,CAAA;AAAA,EAcM;AAKJ,iCAAA,CAAA;;AAAa,IAAA,oBAAE,OAAF,EAAW,GAAX,EAAgB,IAAhB,EAAsB,IAAtB,EAA4B,MAA5B,GAAA;AACX,MADY,IAAC,CAAA,UAAA,OACb,CAAA;AAAA,MAAA,IAAG,CAAA,CAAK,cAAA,IAAU,cAAX,CAAP;AACE,cAAU,IAAA,KAAA,CAAM,sDAAN,CAAV,CADF;OAAA;AAAA,MAEA,4CAAM,GAAN,EAAW,IAAX,EAAiB,IAAjB,EAAuB,MAAvB,CAFA,CADW;IAAA,CAAb;;AAAA,yBAOA,SAAA,GAAW,SAAA,GAAA;AACT,MAAA,IAAG,IAAC,CAAA,SAAD,CAAA,CAAH;eACE,EADF;OAAA,MAA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A,CA7JjB,CAAA;AAAA,EAwKA,KAAM,CAAA,YAAA,CAAN,GAAsB,UAxKtB,CAAA;AAAA,EAyKA,KAAM,CAAA,YAAA,CAAN,GAAsB,UAzKtB,CAAA;AAAA,EA0KA,KAAM,CAAA,MAAA,CAAN,GAAgB,IA1KhB,CAAA;SA2KA,iBA5Ke;AAAA,CAFjB,CAAA"
} }

View File

@ -6,5 +6,5 @@
"XmlTypes.coffee" "XmlTypes.coffee"
], ],
"names": [], "names": [],
"mappings": "AA2KkB" "mappings": "AA8KkB"
} }

View File

@ -342,7 +342,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -59,6 +59,7 @@ only one will AddName operation will be executed.</p>
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
If map_manager doesn&#39;t have the property name, then add it.
</span> </span>
</li> </li>
<li> <li>
@ -70,6 +71,7 @@ only one will AddName operation will be executed.</p>
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Encode this operation in such a way that it can be parsed by remote peers.
</span> </span>
</li> </li>
</ul> </ul>
@ -128,7 +130,14 @@ only one will AddName operation will be executed.</p>
<b>execute</b><span>()</span> <b>execute</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>If map_manager doesn&#39;t have the property name, then add it.
The ReplaceManager that is being written on the property is unique
in such a way that if AddName is executed (from another peer) it will
always have the same result (ReplaceManager, and its beginning and end are the same)</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='_encode-dynamic'> <p class='signature' id='_encode-dynamic'>
@ -137,12 +146,16 @@ only one will AddName operation will be executed.</p>
<b>_encode</b><span>()</span> <b>_encode</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Encode this operation in such a way that it can be parsed by remote peers.</p>
</div>
<div class='tags'>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -157,7 +157,7 @@ This result can be sent to other clients.</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -191,7 +191,7 @@ of the Engine is empty.</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -74,6 +74,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Same as applyOps but operations that are already in the HB are not applied.
</span> </span>
</li> </li>
<li> <li>
@ -122,7 +123,29 @@
<b>constructor</b><span>(HB, parser)</span> <b>constructor</b><span>(HB, parser)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>HB</span>
<span class='type'>
(
<tt><a href='../class/HistoryBuffer.html'>HistoryBuffer</a></tt>
)
</span>
</li>
<li>
<span class='name'>parser</span>
<span class='type'>
(
<tt>Array</tt>
)
</span>
&mdash;
<span class='desc'>Defines how to parse encoded messages. </span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
<h2>Instance Method Details</h2> <h2>Instance Method Details</h2>
@ -164,7 +187,17 @@
<b>applyOpsCheckDouble</b><span>(ops_json)</span> <b>applyOpsCheckDouble</b><span>(ops_json)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Same as applyOps but operations that are already in the HB are not applied.</p>
</div>
<div class='tags'>
<h3>See also:</h3>
<ul class='see'>
<li>
<a href='Engine.applyOps'>Engine.applyOps</a>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='applyOps-dynamic'> <p class='signature' id='applyOps-dynamic'>
@ -215,7 +248,7 @@ It checks if operations that were previously not executable are now executable.<
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -90,6 +90,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Encode this operation in such a way that it can be parsed by remote peers.
</span> </span>
</li> </li>
<li> <li>
@ -128,6 +129,18 @@
Add an operation to the HB. Add an operation to the HB.
</span> </span>
</li> </li>
<li>
<span class='signature'>
<a href='#addToCounter-dynamic'>
#
(void)
<b>addToCounter</b><span>(o)</span>
</a>
</span>
<span class='desc'>
Increment the operation_counter that defines the current state of the Engine.
</span>
</li>
</ul> </ul>
<h2>Constructor Details</h2> <h2>Constructor Details</h2>
<div class='methods'> <div class='methods'>
@ -209,7 +222,11 @@ This is why everybode must create the same operation with this uid.</p>
<b>_encode</b><span>(state_vector = {})</span> <b>_encode</b><span>(state_vector = {})</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Encode this operation in such a way that it can be parsed by remote peers.</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='getNextOperationIdentifier-dynamic'> <p class='signature' id='getNextOperationIdentifier-dynamic'>
@ -251,12 +268,25 @@ This will increment the operation counter.</p>
other operations (it wont executed)</p> other operations (it wont executed)</p>
</div> </div>
<div class='tags'> <div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='addToCounter-dynamic'>
#
(void)
<b>addToCounter</b><span>(o)</span>
<br>
</p>
<div class='docstring'>
<p>Increment the operation_counter that defines the current state of the Engine.</p>
</div>
<div class='tags'>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -67,6 +67,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Encode this operation in such a way that it can be parsed by remote peers.
</span> </span>
</li> </li>
</ul> </ul>
@ -151,12 +152,16 @@
<b>_encode</b><span>()</span> <b>_encode</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Encode this operation in such a way that it can be parsed by remote peers.</p>
</div>
<div class='tags'>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -255,7 +255,7 @@ TODO (Unused)</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -59,6 +59,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
This function is called whenever an operation was executed.
</span> </span>
</li> </li>
<li> <li>
@ -70,6 +71,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
This function is called whenever an operation was received from another peer.
</span> </span>
</li> </li>
<li> <li>
@ -81,17 +83,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
</span> Helper for sending iwc intents.
</li>
<li>
<span class='signature'>
<a href='#sync-dynamic'>
#
(void)
<b>sync</b><span>()</span>
</a>
</span>
<span class='desc'>
</span> </span>
</li> </li>
</ul> </ul>
@ -104,7 +96,49 @@
<b>constructor</b><span>(engine, HB, execution_listener, yatta)</span> <b>constructor</b><span>(engine, HB, execution_listener, yatta)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>engine</span>
<span class='type'>
(
<tt><a href='../class/Engine.html'>Engine</a></tt>
)
</span>
&mdash;
<span class='desc'>The transformation engine </span>
</li>
<li>
<span class='name'>HB</span>
<span class='type'>
(
<tt><a href='../class/HistoryBuffer.html'>HistoryBuffer</a></tt>
)
</span>
</li>
<li>
<span class='name'>execution_listener</span>
<span class='type'>
(
<tt>Array&lt;Function&gt;</tt>
)
</span>
&mdash;
<span class='desc'>You must ensure that whenever an operation is executed, every function in this Array is called. </span>
</li>
<li>
<span class='name'>yatta</span>
<span class='type'>
(
<tt>Yatta</tt>
)
</span>
&mdash;
<span class='desc'>The Yatta framework. </span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
<h2>Instance Method Details</h2> <h2>Instance Method Details</h2>
@ -116,7 +150,24 @@
<b>send</b><span>(o)</span> <b>send</b><span>(o)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>This function is called whenever an operation was executed.</p>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>o</span>
<span class='type'>
(
<tt><a href='../class/Operation.html'>Operation</a></tt>
)
</span>
&mdash;
<span class='desc'>The operation that was executed. </span>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='receive-dynamic'> <p class='signature' id='receive-dynamic'>
@ -125,7 +176,24 @@
<b>receive</b><span>(o)</span> <b>receive</b><span>(o)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>This function is called whenever an operation was received from another peer.</p>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>o</span>
<span class='type'>
(
<tt><a href='../class/Operation.html'>Operation</a></tt>
)
</span>
&mdash;
<span class='desc'>The operation that was received. </span>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='sendIwcIntent-dynamic'> <p class='signature' id='sendIwcIntent-dynamic'>
@ -134,21 +202,39 @@
<b>sendIwcIntent</b><span>(action_name, content)</span> <b>sendIwcIntent</b><span>(action_name, content)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Helper for sending iwc intents.</p>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>action_name</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>The name of the action that is going to be send. </span>
</li>
<li>
<span class='name'>content</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>The content that is atteched to the intent. </span>
</li>
</ul>
</div> </div>
<div class='method_details'>
<p class='signature' id='sync-dynamic'>
#
(void)
<b>sync</b><span>()</span>
<br>
</p>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -53,7 +53,11 @@
</dt> </dt>
<dd> <dd>
<pre><code class='coffeescript'>true</code></pre> <pre><code class='coffeescript'>true</code></pre>
<div class='docstring'>
<p>Whether the default is &#39;mutable&#39; (true) or &#39;immutable&#39; (false)</p>
</div>
<div class='tags'>
</div>
</dd> </dd>
</dl> </dl>
<h2>Instance Method Summary</h2> <h2>Instance Method Summary</h2>
@ -67,6 +71,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Set if the default is &#39;mutable&#39; or &#39;immutable&#39;
</span> </span>
</li> </li>
<li> <li>
@ -148,7 +153,24 @@
<b>setMutableDefault</b><span>(mutable)</span> <b>setMutableDefault</b><span>(mutable)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Set if the default is &#39;mutable&#39; or &#39;immutable&#39;</p>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>mutable</span>
<span class='type'>
(
<tt>String|Boolean</tt>
)
</span>
&mdash;
<span class='desc'>Set either &#39;mutable&#39; / true or &#39;immutable&#39; / false </span>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='val-dynamic'> <p class='signature' id='val-dynamic'>
@ -286,7 +308,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -116,12 +116,26 @@ console.log(w.newProperty == &quot;Awesome&quot;) # true!</code></pre>
<b>constructor</b><span>(jsonType)</span> <b>constructor</b><span>(jsonType)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>jsonType</span>
<span class='type'>
(
<tt><a href='../class/JsonType.html'>JsonType</a></tt>
)
</span>
&mdash;
<span class='desc'>Instance of the JsonType that this class wrappes. </span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -137,7 +137,31 @@ Known values that are supported:</p><ul>
<b>constructor</b><span>(user_id, Connector)</span> <b>constructor</b><span>(user_id, Connector)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>user_id</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>Unique id of the peer. </span>
</li>
<li>
<span class='name'>Connector</span>
<span class='type'>
(
<tt>Connector</tt>
)
</span>
&mdash;
<span class='desc'>the connector class. </span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
<h2>Instance Method Details</h2> <h2>Instance Method Details</h2>
@ -250,7 +274,7 @@ JsonYatta was initialized (Depending on the HistoryBuffer implementation).</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -208,7 +208,7 @@ Doesn&#39;t return left-right delimiter.</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -94,12 +94,19 @@
<b>val</b><span>(name, content)</span> <b>val</b><span>(name, content)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>See also:</h3>
<ul class='see'>
<li>
<a href='JsonTypes.val'>JsonTypes.val</a>
</li>
</ul>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -285,7 +285,7 @@ an easy way to refer to these operations via an uid or object reference.</p><p>F
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -63,17 +63,19 @@ Each Replaceable holds a value that is now replaceable.</p><p>The Word-type has
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Replace the existing word with a new word.
</span> </span>
</li> </li>
<li> <li>
<span class='signature'> <span class='signature'>
<a href='#val-dynamic'> <a href='#val-dynamic'>
# #
(void) (String)
<b>val</b><span>()</span> <b>val</b><span>()</span>
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Get the value of this Word
</span> </span>
</li> </li>
<li> <li>
@ -85,6 +87,7 @@ Each Replaceable holds a value that is now replaceable.</p><p>The Word-type has
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Encode this operation in such a way that it can be parsed by remote peers.
</span> </span>
</li> </li>
</ul> </ul>
@ -166,16 +169,31 @@ Each Replaceable holds a value that is now replaceable.</p><p>The Word-type has
<b>replace</b><span>(content)</span> <b>replace</b><span>(content)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Replace the existing word with a new word.</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='val-dynamic'> <p class='signature' id='val-dynamic'>
# #
(void) (String)
<b>val</b><span>()</span> <b>val</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Get the value of this Word</p>
</div>
<div class='tags'>
<h3>Returns:</h3>
<ul class='return'>
<li>
<span class='type'></span>
<tt>String</tt>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='_encode-dynamic'> <p class='signature' id='_encode-dynamic'>
@ -184,12 +202,16 @@ Each Replaceable holds a value that is now replaceable.</p><p>The Word-type has
<b>_encode</b><span>()</span> <b>_encode</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Encode this operation in such a way that it can be parsed by remote peers.</p>
</div>
<div class='tags'>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -62,6 +62,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Return the content that this operation holds.
</span> </span>
</li> </li>
<li> <li>
@ -73,6 +74,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Replace the content of this replaceable with new content.
</span> </span>
</li> </li>
<li> <li>
@ -84,6 +86,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
If possible set the replace manager in the content.
</span> </span>
</li> </li>
<li> <li>
@ -95,7 +98,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Convert all relevant information of this operation to the json-format. Encode this operation in such a way that it can be parsed by remote peers.
</span> </span>
</li> </li>
</ul> </ul>
@ -154,7 +157,11 @@
<b>val</b><span>()</span> <b>val</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Return the content that this operation holds.</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='replace-dynamic'> <p class='signature' id='replace-dynamic'>
@ -163,7 +170,11 @@
<b>replace</b><span>(content)</span> <b>replace</b><span>(content)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Replace the content of this replaceable with new content.</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='execute-dynamic'> <p class='signature' id='execute-dynamic'>
@ -172,7 +183,17 @@
<b>execute</b><span>()</span> <b>execute</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>If possible set the replace manager in the content.</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>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='_encode-dynamic'> <p class='signature' id='_encode-dynamic'>
@ -182,8 +203,7 @@
<br> <br>
</p> </p>
<div class='docstring'> <div class='docstring'>
<p>Convert all relevant information of this operation to the json-format. <p>Encode this operation in such a way that it can be parsed by remote peers.</p>
This result can be send to other clients.</p>
</div> </div>
<div class='tags'> <div class='tags'>
</div> </div>
@ -191,7 +211,7 @@ This result can be send to other clients.</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -50,6 +50,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
This engine applied operations in a specific order.
</span> </span>
</li> </li>
<li> <li>
@ -61,6 +62,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
This function is called whenever an operation was executed.
</span> </span>
</li> </li>
<li> <li>
@ -72,6 +74,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
This function is called whenever an operation was received from another peer.
</span> </span>
</li> </li>
<li> <li>
@ -83,6 +86,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Flush one operation from the line of a specific user.
</span> </span>
</li> </li>
<li> <li>
@ -94,6 +98,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Flush one operation on a random line.
</span> </span>
</li> </li>
<li> <li>
@ -105,17 +110,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
</span> Flush all operations on every line.
</li>
<li>
<span class='signature'>
<a href='#sync-dynamic'>
#
(void)
<b>sync</b><span>()</span>
</a>
</span>
<span class='desc'>
</span> </span>
</li> </li>
</ul> </ul>
@ -128,7 +123,49 @@
<b>constructor</b><span>(engine, HB, execution_listener)</span> <b>constructor</b><span>(engine, HB, execution_listener)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>engine</span>
<span class='type'>
(
<tt><a href='../class/Engine.html'>Engine</a></tt>
)
</span>
&mdash;
<span class='desc'>The transformation engine </span>
</li>
<li>
<span class='name'>HB</span>
<span class='type'>
(
<tt><a href='../class/HistoryBuffer.html'>HistoryBuffer</a></tt>
)
</span>
</li>
<li>
<span class='name'>execution_listener</span>
<span class='type'>
(
<tt>Array&lt;Function&gt;</tt>
)
</span>
&mdash;
<span class='desc'>You must ensure that whenever an operation is executed, every function in this Array is called. </span>
</li>
<li>
<span class='name'>yatta</span>
<span class='type'>
(
<tt>Yatta</tt>
)
</span>
&mdash;
<span class='desc'>The Yatta framework. </span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
<h2>Instance Method Details</h2> <h2>Instance Method Details</h2>
@ -140,7 +177,12 @@
<b>getOpsInExecutionOrder</b><span>()</span> <b>getOpsInExecutionOrder</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>This engine applied operations in a specific order.
Get the ops in the right order.</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='send-dynamic'> <p class='signature' id='send-dynamic'>
@ -149,7 +191,24 @@
<b>send</b><span>(o)</span> <b>send</b><span>(o)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>This function is called whenever an operation was executed.</p>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>o</span>
<span class='type'>
(
<tt><a href='../class/Operation.html'>Operation</a></tt>
)
</span>
&mdash;
<span class='desc'>The operation that was executed. </span>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='receive-dynamic'> <p class='signature' id='receive-dynamic'>
@ -158,7 +217,24 @@
<b>receive</b><span>(o)</span> <b>receive</b><span>(o)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>This function is called whenever an operation was received from another peer.</p>
</div>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>o</span>
<span class='type'>
(
<tt><a href='../class/Operation.html'>Operation</a></tt>
)
</span>
&mdash;
<span class='desc'>The operation that was received. </span>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='flushOne-dynamic'> <p class='signature' id='flushOne-dynamic'>
@ -167,7 +243,11 @@
<b>flushOne</b><span>(user)</span> <b>flushOne</b><span>(user)</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Flush one operation from the line of a specific user.</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='flushOneRandom-dynamic'> <p class='signature' id='flushOneRandom-dynamic'>
@ -176,7 +256,11 @@
<b>flushOneRandom</b><span>()</span> <b>flushOneRandom</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Flush one operation on a random line.</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='flushAll-dynamic'> <p class='signature' id='flushAll-dynamic'>
@ -185,21 +269,16 @@
<b>flushAll</b><span>()</span> <b>flushAll</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Flush all operations on every line.</p>
</div>
<div class='tags'>
</div> </div>
<div class='method_details'>
<p class='signature' id='sync-dynamic'>
#
(void)
<b>sync</b><span>()</span>
<br>
</p>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -53,7 +53,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -173,7 +173,7 @@ This result can be send to other clients.</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -50,6 +50,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
@result Word
</span> </span>
</li> </li>
<li> <li>
@ -72,6 +73,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Get the initialized connector.
</span> </span>
</li> </li>
<li> <li>
@ -94,6 +96,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Get the UserId from the HistoryBuffer object.
</span> </span>
</li> </li>
<li> <li>
@ -150,7 +153,31 @@
<b>constructor</b><span>(user_id, Connector)</span> <b>constructor</b><span>(user_id, Connector)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>user_id</span>
<span class='type'>
(
<tt>String</tt>
)
</span>
&mdash;
<span class='desc'>Uniqe user id that defines this peer. </span>
</li>
<li>
<span class='name'>Connector</span>
<span class='type'>
(
<tt>Connector</tt>
)
</span>
&mdash;
<span class='desc'>The connector defines how you connect to the other peers. </span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
<h2>Instance Method Details</h2> <h2>Instance Method Details</h2>
@ -162,7 +189,11 @@
<b>getRootElement</b><span>()</span> <b>getRootElement</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>@result Word</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='getEngine-dynamic'> <p class='signature' id='getEngine-dynamic'>
@ -171,7 +202,14 @@
<b>getEngine</b><span>()</span> <b>getEngine</b><span>()</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>See also:</h3>
<ul class='see'>
<li>
<a href='../class/Engine.html'>Engine</a>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='getConnector-dynamic'> <p class='signature' id='getConnector-dynamic'>
@ -180,7 +218,11 @@
<b>getConnector</b><span>()</span> <b>getConnector</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Get the initialized connector.</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='getHistoryBuffer-dynamic'> <p class='signature' id='getHistoryBuffer-dynamic'>
@ -189,7 +231,14 @@
<b>getHistoryBuffer</b><span>()</span> <b>getHistoryBuffer</b><span>()</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>See also:</h3>
<ul class='see'>
<li>
<a href='../class/HistoryBuffer.html'>HistoryBuffer</a>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='getUserId-dynamic'> <p class='signature' id='getUserId-dynamic'>
@ -198,7 +247,13 @@
<b>getUserId</b><span>()</span> <b>getUserId</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Get the UserId from the HistoryBuffer object.
In most cases this will be the same as the user_id value with which
JsonYatta was initialized (Depending on the HistoryBuffer implementation).</p>
</div>
<div class='tags'>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='val-dynamic'> <p class='signature' id='val-dynamic'>
@ -207,7 +262,14 @@
<b>val</b><span>()</span> <b>val</b><span>()</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>See also:</h3>
<ul class='see'>
<li>
<a href='JsonType.val'>JsonType.val</a>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='insertText-dynamic'> <p class='signature' id='insertText-dynamic'>
@ -216,7 +278,14 @@
<b>insertText</b><span>(pos, content)</span> <b>insertText</b><span>(pos, content)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>See also:</h3>
<ul class='see'>
<li>
<a href='Word.insertText'>Word.insertText</a>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='deleteText-dynamic'> <p class='signature' id='deleteText-dynamic'>
@ -225,7 +294,14 @@
<b>deleteText</b><span>(pos, length)</span> <b>deleteText</b><span>(pos, length)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>See also:</h3>
<ul class='see'>
<li>
<a href='Word.deleteText'>Word.deleteText</a>
</li>
</ul>
</div>
</div> </div>
<div class='method_details'> <div class='method_details'>
<p class='signature' id='replaceText-dynamic'> <p class='signature' id='replaceText-dynamic'>
@ -234,12 +310,19 @@
<b>replaceText</b><span>(text)</span> <b>replaceText</b><span>(text)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>See also:</h3>
<ul class='see'>
<li>
<a href='Word.replaceText'>Word.replaceText</a>
</li>
</ul>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -117,6 +117,7 @@
</a> </a>
</span> </span>
<span class='desc'> <span class='desc'>
Encode this operation in such a way that it can be parsed by remote peers.
</span> </span>
</li> </li>
</ul> </ul>
@ -228,12 +229,16 @@ to provide replace functionality.</p>
<b>_encode</b><span>()</span> <b>_encode</b><span>()</span>
<br> <br>
</p> </p>
<div class='docstring'>
<p>Encode this operation in such a way that it can be parsed by remote peers.</p>
</div>
<div class='tags'>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -38,7 +38,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -41,9 +41,10 @@ but does not require you to understand how the internals work. The predefined da
<li>Json - <a href="./examples/IwcJson.md">example</a></li> <li>Json - <a href="./examples/IwcJson.md">example</a></li>
<li>XML (coming soon)</li> <li>XML (coming soon)</li>
</ul><p>Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol.</p><p>Currently supported communication protocols:</p><ul> </ul><p>Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol.</p><p>Currently supported communication protocols:</p><ul>
<li><a href="http://dbis.rwth-aachen.de/gadgets/iwc/resources/iwc.manual.pdf">IWC</a> - Inter-widget Communication</li> <li><a href="http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication">IWC</a> - Inter-widget Communication</li>
</ul> </ul>
<h1 id="about">About</h1><p>Find out more about the concurrent editing problem here <h1 id="use-it-">Use it!</h1><p>Either clone this git repository or install this package with <a href="http://bower.io/">bower</a>.</p><pre><code>bower install Yatta
</code></pre><p>Use the <a href="./examples/README.md">examples</a> to struggle your way through this mess..</p><h1 id="about">About</h1><p>Find out more about the concurrent editing problem here
<a href="http://opencoweb.org/ocwdocs/intro/openg.html">Cooperation, Concurrency, Conflicts, and Convergence</a> and here <a href="http://opencoweb.org/ocwdocs/intro/openg.html">Cooperation, Concurrency, Conflicts, and Convergence</a> and here
<a href="http://en.wikipedia.org/wiki/Operational_transformation">Operational Transformation (OT)</a></p><p>My Bachelor Thesis project aim was to develop a P2P OT Framework that enables collaboration on XML documents and supports <a href="http://en.wikipedia.org/wiki/Operational_transformation">Operational Transformation (OT)</a></p><p>My Bachelor Thesis project aim was to develop a P2P OT Framework that enables collaboration on XML documents and supports
<a href="http://www3.ntu.edu.sg/home/czsun/projects/otfaq/#intentionPreservation">Intention Preservation</a>. <a href="http://www3.ntu.edu.sg/home/czsun/projects/otfaq/#intentionPreservation">Intention Preservation</a>.
@ -53,16 +54,15 @@ It enables concurrent editing with the following space and time properties:</p><
<li>Space complexity = O(|Document|), whereby |Document| is the size of the shared document. Depending on the used data structure, Yata may needs 4*|Document| of space.</li> <li>Space complexity = O(|Document|), whereby |Document| is the size of the shared document. Depending on the used data structure, Yata may needs 4*|Document| of space.</li>
</ul><p>This means that my approach beats all OT time complexities. Furthermore, it is possible to make a very strict definition of Intention Preservation, and I was able to </ul><p>This means that my approach beats all OT time complexities. Furthermore, it is possible to make a very strict definition of Intention Preservation, and I was able to
show that it is never violated.</p><p>Another advantage of my approach is that propagated messages are very small. show that it is never violated.</p><p>Another advantage of my approach is that propagated messages are very small.
Background: In real-time P2P OT algorithms you have to send a state-vector with every message that defines the state of the History Buffer Background: In real-time P2P OT algorithms you have to send a state-vector with each message that defines the state of the History Buffer
on which the operation was created. This is not necessary in Yata.</p><p>One downside is that the History Buffer holds at least as many operations as there are characters in the document. on which the operation was created. This is not necessary in Yata.</p><p>One downside is that the History Buffer holds at least as many operations as there are characters in the document.
In contrast, an OT algorithm can have an empty History Buffer while the document size is very big.</p><p>So, how did I come up with the name for the implementation (Yatta! is not Yata)? In contrast, an OT algorithm can have an empty History Buffer while the document size is very big.</p><p>So, how did I come up with the name for the implementation (Yatta! is not Yata)?
<img src="./extras/imgs/YATTA.png" alt="YATTA!">
Yatta! means &quot;I did it!&quot; in Japanese. You scream it when you accomplish something (for proper application I refer to the Yatta-man in <a href="http://heroeswiki.com/Yatta!">Heroes</a>). Yatta! means &quot;I did it!&quot; in Japanese. You scream it when you accomplish something (for proper application I refer to the Yatta-man in <a href="http://heroeswiki.com/Yatta!">Heroes</a>).
There is also this awesome video on the Internet that will change your life <a href="https://www.youtube.com/watch?v=kL5DDSglM_s">Yatta</a>.</p><h1 id="status">Status</h1><p>Yatta! is still in an early development phase.</p><h1 id="support">Support</h1><p>Please report any issues to the <a href="https://github.com/DadaMonad/Yatta/issues">Github issue page</a>!</p><h1 id="license">License</h1><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p> There is also this awesome video on the Internet that will change your life <a href="https://www.youtube.com/watch?v=kL5DDSglM_s">Yatta</a>.</p><h1 id="status">Status</h1><p>Yatta! is still in an early development phase.</p><h1 id="support">Support</h1><p>Please report any issues to the <a href="https://github.com/DadaMonad/Yatta/issues">Github issue page</a>!</p><h1 id="license">License</h1><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -103,7 +103,7 @@ window.onload = init
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -43,7 +43,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

Binary file not shown.

View File

@ -79,12 +79,26 @@
<b>createIwcConnector</b><span>(callback)</span> <b>createIwcConnector</b><span>(callback)</span>
<br> <br>
</p> </p>
<div class='tags'>
<h3>Parameters:</h3>
<ul class='param'>
<li>
<span class='name'>callback</span>
<span class='type'>
(
<tt>Function</tt>
)
</span>
&mdash;
<span class='desc'>The callback is called when the connector is initialized. </span>
</li>
</ul>
</div>
</div> </div>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,7 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -58,7 +58,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -68,7 +68,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -60,7 +60,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -58,7 +58,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,7 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,7 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,7 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,7 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,7 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
August 08, 14 04:37:31 by August 09, 14 00:30:33 by
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

File diff suppressed because one or more lines are too long

View File

@ -29,14 +29,6 @@
<input type='text'> <input type='text'>
</div> </div>
<ul> <ul>
<li>
<a href='class/ReplaceManager.html#_encode-dynamic' target='main' title='_encode'>
#_encode
</a>
<small>
(ReplaceManager)
</small>
</li>
<li> <li>
<a href='class/Word.html#_encode-dynamic' target='main' title='_encode'> <a href='class/Word.html#_encode-dynamic' target='main' title='_encode'>
#_encode #_encode
@ -62,27 +54,11 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/Delimiter.html#_encode-dynamic' target='main' title='_encode'> <a href='class/ReplaceManager.html#_encode-dynamic' target='main' title='_encode'>
#_encode #_encode
</a> </a>
<small> <small>
(Delimiter) (ReplaceManager)
</small>
</li>
<li>
<a href='class/Delete.html#_encode-dynamic' target='main' title='_encode'>
#_encode
</a>
<small>
(Delete)
</small>
</li>
<li>
<a href='class/TextInsert.html#_encode-dynamic' target='main' title='_encode'>
#_encode
</a>
<small>
(TextInsert)
</small> </small>
</li> </li>
<li> <li>
@ -93,6 +69,14 @@
(AddName) (AddName)
</small> </small>
</li> </li>
<li>
<a href='class/Delete.html#_encode-dynamic' target='main' title='_encode'>
#_encode
</a>
<small>
(Delete)
</small>
</li>
<li> <li>
<a href='class/ImmutableObject.html#_encode-dynamic' target='main' title='_encode'> <a href='class/ImmutableObject.html#_encode-dynamic' target='main' title='_encode'>
#_encode #_encode
@ -101,6 +85,22 @@
(ImmutableObject) (ImmutableObject)
</small> </small>
</li> </li>
<li>
<a href='class/Delimiter.html#_encode-dynamic' target='main' title='_encode'>
#_encode
</a>
<small>
(Delimiter)
</small>
</li>
<li>
<a href='class/TextInsert.html#_encode-dynamic' target='main' title='_encode'>
#_encode
</a>
<small>
(TextInsert)
</small>
</li>
<li> <li>
<a href='class/JsonType.html#_encode-dynamic' target='main' title='_encode'> <a href='class/JsonType.html#_encode-dynamic' target='main' title='_encode'>
#_encode #_encode
@ -117,6 +117,14 @@
(HistoryBuffer) (HistoryBuffer)
</small> </small>
</li> </li>
<li>
<a href='class/HistoryBuffer.html#addToCounter-dynamic' target='main' title='addToCounter'>
#addToCounter
</a>
<small>
(HistoryBuffer)
</small>
</li>
<li> <li>
<a href='class/Insert.html#applyDelete-dynamic' target='main' title='applyDelete'> <a href='class/Insert.html#applyDelete-dynamic' target='main' title='applyDelete'>
#applyDelete #applyDelete
@ -158,67 +166,11 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/ListManager.html#constructor-dynamic' target='main' title='constructor'> <a href='class/Delete.html#constructor-dynamic' target='main' title='constructor'>
#constructor #constructor
</a> </a>
<small> <small>
(ListManager) (Delete)
</small>
</li>
<li>
<a href='class/Engine.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(Engine)
</small>
</li>
<li>
<a href='class/Word.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(Word)
</small>
</li>
<li>
<a href='class/JsonType.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(JsonType)
</small>
</li>
<li>
<a href='class/JsonYatta.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(JsonYatta)
</small>
</li>
<li>
<a href='class/JsonWrapper.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(JsonWrapper)
</small>
</li>
<li>
<a href='class/AddName.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(AddName)
</small>
</li>
<li>
<a href='class/Delimiter.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(Delimiter)
</small> </small>
</li> </li>
<li> <li>
@ -230,11 +182,11 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/ImmutableObject.html#constructor-dynamic' target='main' title='constructor'> <a href='class/JsonYatta.html#constructor-dynamic' target='main' title='constructor'>
#constructor #constructor
</a> </a>
<small> <small>
(ImmutableObject) (JsonYatta)
</small> </small>
</li> </li>
<li> <li>
@ -246,11 +198,51 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/Insert.html#constructor-dynamic' target='main' title='constructor'> <a href='class/JsonType.html#constructor-dynamic' target='main' title='constructor'>
#constructor #constructor
</a> </a>
<small> <small>
(Insert) (JsonType)
</small>
</li>
<li>
<a href='class/JsonWrapper.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(JsonWrapper)
</small>
</li>
<li>
<a href='class/ListManager.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(ListManager)
</small>
</li>
<li>
<a href='class/Delimiter.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(Delimiter)
</small>
</li>
<li>
<a href='class/TextInsert.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(TextInsert)
</small>
</li>
<li>
<a href='class/ImmutableObject.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(ImmutableObject)
</small> </small>
</li> </li>
<li> <li>
@ -262,19 +254,27 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/Replaceable.html#constructor-dynamic' target='main' title='constructor'> <a href='class/Engine.html#constructor-dynamic' target='main' title='constructor'>
#constructor #constructor
</a> </a>
<small> <small>
(Replaceable) (Engine)
</small> </small>
</li> </li>
<li> <li>
<a href='class/Delete.html#constructor-dynamic' target='main' title='constructor'> <a href='class/Insert.html#constructor-dynamic' target='main' title='constructor'>
#constructor #constructor
</a> </a>
<small> <small>
(Delete) (Insert)
</small>
</li>
<li>
<a href='class/AddName.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(AddName)
</small> </small>
</li> </li>
<li> <li>
@ -302,11 +302,19 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/TextInsert.html#constructor-dynamic' target='main' title='constructor'> <a href='class/Word.html#constructor-dynamic' target='main' title='constructor'>
#constructor #constructor
</a> </a>
<small> <small>
(TextInsert) (Word)
</small>
</li>
<li>
<a href='class/Replaceable.html#constructor-dynamic' target='main' title='constructor'>
#constructor
</a>
<small>
(Replaceable)
</small> </small>
</li> </li>
<li> <li>
@ -341,6 +349,14 @@
(Word) (Word)
</small> </small>
</li> </li>
<li>
<a href='class/Insert.html#execute-dynamic' target='main' title='execute'>
#execute
</a>
<small>
(Insert)
</small>
</li>
<li> <li>
<a href='class/Delimiter.html#execute-dynamic' target='main' title='execute'> <a href='class/Delimiter.html#execute-dynamic' target='main' title='execute'>
#execute #execute
@ -357,22 +373,6 @@
(Delete) (Delete)
</small> </small>
</li> </li>
<li>
<a href='class/AddName.html#execute-dynamic' target='main' title='execute'>
#execute
</a>
<small>
(AddName)
</small>
</li>
<li>
<a href='class/Insert.html#execute-dynamic' target='main' title='execute'>
#execute
</a>
<small>
(Insert)
</small>
</li>
<li> <li>
<a href='class/Replaceable.html#execute-dynamic' target='main' title='execute'> <a href='class/Replaceable.html#execute-dynamic' target='main' title='execute'>
#execute #execute
@ -381,6 +381,14 @@
(Replaceable) (Replaceable)
</small> </small>
</li> </li>
<li>
<a href='class/AddName.html#execute-dynamic' target='main' title='execute'>
#execute
</a>
<small>
(AddName)
</small>
</li>
<li> <li>
<a href='class/Operation.html#execute-dynamic' target='main' title='execute'> <a href='class/Operation.html#execute-dynamic' target='main' title='execute'>
#execute #execute
@ -413,14 +421,6 @@
(TestConnector) (TestConnector)
</small> </small>
</li> </li>
<li>
<a href='class/JsonYatta.html#getConnector-dynamic' target='main' title='getConnector'>
#getConnector
</a>
<small>
(JsonYatta)
</small>
</li>
<li> <li>
<a href='class/TextYatta.html#getConnector-dynamic' target='main' title='getConnector'> <a href='class/TextYatta.html#getConnector-dynamic' target='main' title='getConnector'>
#getConnector #getConnector
@ -429,6 +429,14 @@
(TextYatta) (TextYatta)
</small> </small>
</li> </li>
<li>
<a href='class/JsonYatta.html#getConnector-dynamic' target='main' title='getConnector'>
#getConnector
</a>
<small>
(JsonYatta)
</small>
</li>
<li> <li>
<a href='class/Insert.html#getDistanceToOrigin-dynamic' target='main' title='getDistanceToOrigin'> <a href='class/Insert.html#getDistanceToOrigin-dynamic' target='main' title='getDistanceToOrigin'>
#getDistanceToOrigin #getDistanceToOrigin
@ -437,14 +445,6 @@
(Insert) (Insert)
</small> </small>
</li> </li>
<li>
<a href='class/JsonYatta.html#getEngine-dynamic' target='main' title='getEngine'>
#getEngine
</a>
<small>
(JsonYatta)
</small>
</li>
<li> <li>
<a href='class/TextYatta.html#getEngine-dynamic' target='main' title='getEngine'> <a href='class/TextYatta.html#getEngine-dynamic' target='main' title='getEngine'>
#getEngine #getEngine
@ -453,6 +453,14 @@
(TextYatta) (TextYatta)
</small> </small>
</li> </li>
<li>
<a href='class/JsonYatta.html#getEngine-dynamic' target='main' title='getEngine'>
#getEngine
</a>
<small>
(JsonYatta)
</small>
</li>
<li> <li>
<a href='class/ListManager.html#getFirstOperation-dynamic' target='main' title='getFirstOperation'> <a href='class/ListManager.html#getFirstOperation-dynamic' target='main' title='getFirstOperation'>
#getFirstOperation #getFirstOperation
@ -541,14 +549,6 @@
(HistoryBuffer) (HistoryBuffer)
</small> </small>
</li> </li>
<li>
<a href='class/TextYatta.html#getRootElement-dynamic' target='main' title='getRootElement'>
#getRootElement
</a>
<small>
(TextYatta)
</small>
</li>
<li> <li>
<a href='class/JsonYatta.html#getRootElement-dynamic' target='main' title='getRootElement'> <a href='class/JsonYatta.html#getRootElement-dynamic' target='main' title='getRootElement'>
#getRootElement #getRootElement
@ -557,6 +557,14 @@
(JsonYatta) (JsonYatta)
</small> </small>
</li> </li>
<li>
<a href='class/TextYatta.html#getRootElement-dynamic' target='main' title='getRootElement'>
#getRootElement
</a>
<small>
(TextYatta)
</small>
</li>
<li> <li>
<a href='class/Operation.html#getUid-dynamic' target='main' title='getUid'> <a href='class/Operation.html#getUid-dynamic' target='main' title='getUid'>
#getUid #getUid
@ -573,14 +581,6 @@
(HistoryBuffer) (HistoryBuffer)
</small> </small>
</li> </li>
<li>
<a href='class/TextYatta.html#getUserId-dynamic' target='main' title='getUserId'>
#getUserId
</a>
<small>
(TextYatta)
</small>
</li>
<li> <li>
<a href='class/JsonYatta.html#getUserId-dynamic' target='main' title='getUserId'> <a href='class/JsonYatta.html#getUserId-dynamic' target='main' title='getUserId'>
#getUserId #getUserId
@ -589,6 +589,14 @@
(JsonYatta) (JsonYatta)
</small> </small>
</li> </li>
<li>
<a href='class/TextYatta.html#getUserId-dynamic' target='main' title='getUserId'>
#getUserId
</a>
<small>
(TextYatta)
</small>
</li>
<li> <li>
<a href='class/Word.html#insertText-dynamic' target='main' title='insertText'> <a href='class/Word.html#insertText-dynamic' target='main' title='insertText'>
#insertText #insertText
@ -605,14 +613,6 @@
(TextYatta) (TextYatta)
</small> </small>
</li> </li>
<li>
<a href='class/Delimiter.html#isDeleted-dynamic' target='main' title='isDeleted'>
#isDeleted
</a>
<small>
(Delimiter)
</small>
</li>
<li> <li>
<a href='class/Insert.html#isDeleted-dynamic' target='main' title='isDeleted'> <a href='class/Insert.html#isDeleted-dynamic' target='main' title='isDeleted'>
#isDeleted #isDeleted
@ -621,6 +621,14 @@
(Insert) (Insert)
</small> </small>
</li> </li>
<li>
<a href='class/Delimiter.html#isDeleted-dynamic' target='main' title='isDeleted'>
#isDeleted
</a>
<small>
(Delimiter)
</small>
</li>
<li> <li>
<a href='class/Engine.html#parseOperation-dynamic' target='main' title='parseOperation'> <a href='class/Engine.html#parseOperation-dynamic' target='main' title='parseOperation'>
#parseOperation #parseOperation
@ -645,14 +653,6 @@
(TestConnector) (TestConnector)
</small> </small>
</li> </li>
<li>
<a href='class/Replaceable.html#replace-dynamic' target='main' title='replace'>
#replace
</a>
<small>
(Replaceable)
</small>
</li>
<li> <li>
<a href='class/ReplaceManager.html#replace-dynamic' target='main' title='replace'> <a href='class/ReplaceManager.html#replace-dynamic' target='main' title='replace'>
#replace #replace
@ -662,11 +662,11 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/Word.html#replaceText-dynamic' target='main' title='replaceText'> <a href='class/Replaceable.html#replace-dynamic' target='main' title='replace'>
#replaceText #replace
</a> </a>
<small> <small>
(Word) (Replaceable)
</small> </small>
</li> </li>
<li> <li>
@ -677,6 +677,14 @@
(TextYatta) (TextYatta)
</small> </small>
</li> </li>
<li>
<a href='class/Word.html#replaceText-dynamic' target='main' title='replaceText'>
#replaceText
</a>
<small>
(Word)
</small>
</li>
<li> <li>
<a href='class/Operation.html#saveOperation-dynamic' target='main' title='saveOperation'> <a href='class/Operation.html#saveOperation-dynamic' target='main' title='saveOperation'>
#saveOperation #saveOperation
@ -685,14 +693,6 @@
(Operation) (Operation)
</small> </small>
</li> </li>
<li>
<a href='class/IwcConnector.html#send-dynamic' target='main' title='send'>
#send
</a>
<small>
(IwcConnector)
</small>
</li>
<li> <li>
<a href='class/TestConnector.html#send-dynamic' target='main' title='send'> <a href='class/TestConnector.html#send-dynamic' target='main' title='send'>
#send #send
@ -702,19 +702,19 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/IwcConnector.html#sendIwcIntent-dynamic' target='main' title='sendIwcIntent'> <a href='class/IwcConnector.html#send-dynamic' target='main' title='send'>
#sendIwcIntent #send
</a> </a>
<small> <small>
(IwcConnector) (IwcConnector)
</small> </small>
</li> </li>
<li> <li>
<a href='class/JsonYatta.html#setMutableDefault-dynamic' target='main' title='setMutableDefault'> <a href='class/IwcConnector.html#sendIwcIntent-dynamic' target='main' title='sendIwcIntent'>
#setMutableDefault #sendIwcIntent
</a> </a>
<small> <small>
(JsonYatta) (IwcConnector)
</small> </small>
</li> </li>
<li> <li>
@ -725,6 +725,14 @@
(JsonType) (JsonType)
</small> </small>
</li> </li>
<li>
<a href='class/JsonYatta.html#setMutableDefault-dynamic' target='main' title='setMutableDefault'>
#setMutableDefault
</a>
<small>
(JsonYatta)
</small>
</li>
<li> <li>
<a href='class/Word.html#setReplaceManager-dynamic' target='main' title='setReplaceManager'> <a href='class/Word.html#setReplaceManager-dynamic' target='main' title='setReplaceManager'>
#setReplaceManager #setReplaceManager
@ -733,22 +741,6 @@
(Word) (Word)
</small> </small>
</li> </li>
<li>
<a href='class/IwcConnector.html#sync-dynamic' target='main' title='sync'>
#sync
</a>
<small>
(IwcConnector)
</small>
</li>
<li>
<a href='class/TestConnector.html#sync-dynamic' target='main' title='sync'>
#sync
</a>
<small>
(TestConnector)
</small>
</li>
<li> <li>
<a href='class/ListManager.html#toArray-dynamic' target='main' title='toArray'> <a href='class/ListManager.html#toArray-dynamic' target='main' title='toArray'>
#toArray #toArray
@ -774,11 +766,11 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/JsonType.html#val-dynamic' target='main' title='val'> <a href='class/ImmutableObject.html#val-dynamic' target='main' title='val'>
#val #val
</a> </a>
<small> <small>
(JsonType) (ImmutableObject)
</small> </small>
</li> </li>
<li> <li>
@ -789,6 +781,14 @@
(TextInsert) (TextInsert)
</small> </small>
</li> </li>
<li>
<a href='class/JsonYatta.html#val-dynamic' target='main' title='val'>
#val
</a>
<small>
(JsonYatta)
</small>
</li>
<li> <li>
<a href='class/Replaceable.html#val-dynamic' target='main' title='val'> <a href='class/Replaceable.html#val-dynamic' target='main' title='val'>
#val #val
@ -798,27 +798,19 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/ImmutableObject.html#val-dynamic' target='main' title='val'> <a href='class/JsonType.html#val-dynamic' target='main' title='val'>
#val #val
</a> </a>
<small> <small>
(ImmutableObject) (JsonType)
</small> </small>
</li> </li>
<li> <li>
<a href='class/ReplaceManager.html#val-dynamic' target='main' title='val'> <a href='class/MapManager.html#val-dynamic' target='main' title='val'>
#val #val
</a> </a>
<small> <small>
(ReplaceManager) (MapManager)
</small>
</li>
<li>
<a href='class/JsonYatta.html#val-dynamic' target='main' title='val'>
#val
</a>
<small>
(JsonYatta)
</small> </small>
</li> </li>
<li> <li>
@ -838,11 +830,11 @@
</small> </small>
</li> </li>
<li> <li>
<a href='class/MapManager.html#val-dynamic' target='main' title='val'> <a href='class/ReplaceManager.html#val-dynamic' target='main' title='val'>
#val #val
</a> </a>
<small> <small>
(MapManager) (ReplaceManager)
</small> </small>
</li> </li>
<li> <li>

View File

@ -1,4 +1,7 @@
#
# @param {Function} callback The callback is called when the connector is initialized.
#
createIwcConnector = (callback)-> createIwcConnector = (callback)->
iwcHandler = {} iwcHandler = {}
duiClient = new DUIClient() duiClient = new DUIClient()
@ -21,6 +24,13 @@ createIwcConnector = (callback)->
# @see http://dbis.rwth-aachen.de/cms/projects/ROLE # @see http://dbis.rwth-aachen.de/cms/projects/ROLE
# #
class IwcConnector class IwcConnector
#
# @param {Engine} engine The transformation engine
# @param {HistoryBuffer} HB
# @param {Array<Function>} execution_listener You must ensure that whenever an operation is executed, every function in this Array is called.
# @param {Yatta} yatta The Yatta framework.
#
constructor: (@engine, @HB, @execution_listener, @yatta)-> constructor: (@engine, @HB, @execution_listener, @yatta)->
@duiClient = duiClient @duiClient = duiClient
@iwcHandler = iwcHandler @iwcHandler = iwcHandler
@ -44,14 +54,27 @@ createIwcConnector = (callback)->
@sendIwcIntent "Yatta_push_HB_element", json @sendIwcIntent "Yatta_push_HB_element", json
@iwcHandler["Yatta_get_HB_element"] = [sendHistoryBuffer] @iwcHandler["Yatta_get_HB_element"] = [sendHistoryBuffer]
#
# This function is called whenever an operation was executed.
# @param {Operation} o The operation that was executed.
#
send: (o)-> send: (o)->
if o.uid.creator is @HB.getUserId() and (typeof o.uid.op_number isnt "string") if o.uid.creator is @HB.getUserId() and (typeof o.uid.op_number isnt "string")
@sendIwcIntent "Yatta_new_operation", o @sendIwcIntent "Yatta_new_operation", o
#
# This function is called whenever an operation was received from another peer.
# @param {Operation} o The operation that was received.
#
receive: (o)-> receive: (o)->
if o.uid.creator isnt @HB.getUserId() if o.uid.creator isnt @HB.getUserId()
@engine.applyOp o @engine.applyOp o
#
# Helper for sending iwc intents.
# @param {String} action_name The name of the action that is going to be send.
# @param {String} content The content that is atteched to the intent.
#
sendIwcIntent: (action_name, content)-> sendIwcIntent: (action_name, content)->
intent = intent =
action: action_name action: action_name
@ -62,9 +85,6 @@ createIwcConnector = (callback)->
@duiClient.sendIntent(intent) @duiClient.sendIntent(intent)
sync: ()->
throw new Error "Can't use this a.t.m."
get_HB_intent = get_HB_intent =
action: "Yatta_get_HB_element" action: "Yatta_get_HB_element"
component: "" component: ""

View File

@ -7,6 +7,13 @@ module.exports = (user_list)->
# A trivial Connector that simulates network delay. # A trivial Connector that simulates network delay.
# #
class TestConnector class TestConnector
#
# @param {Engine} engine The transformation engine
# @param {HistoryBuffer} HB
# @param {Array<Function>} execution_listener You must ensure that whenever an operation is executed, every function in this Array is called.
# @param {Yatta} yatta The Yatta framework.
#
constructor: (@engine, @HB, @execution_listener)-> constructor: (@engine, @HB, @execution_listener)->
send_ = (o)=> send_ = (o)=>
@send o @send o
@ -21,29 +28,49 @@ module.exports = (user_list)->
@unexecuted = {} @unexecuted = {}
#
# This engine applied operations in a specific order.
# Get the ops in the right order.
#
getOpsInExecutionOrder: ()-> getOpsInExecutionOrder: ()->
@applied_operations @applied_operations
#
# This function is called whenever an operation was executed.
# @param {Operation} o The operation that was executed.
#
send: (o)-> send: (o)->
if (o.uid.creator is @HB.getUserId()) and (typeof o.uid.op_number isnt "string") if (o.uid.creator is @HB.getUserId()) and (typeof o.uid.op_number isnt "string")
for user in user_list for user in user_list
if user.getUserId() isnt @HB.getUserId() if user.getUserId() isnt @HB.getUserId()
user.getConnector().receive(o) user.getConnector().receive(o)
#
# This function is called whenever an operation was received from another peer.
# @param {Operation} o The operation that was received.
#
receive: (o)-> receive: (o)->
@unexecuted[o.uid.creator] ?= [] @unexecuted[o.uid.creator] ?= []
@unexecuted[o.uid.creator].push o @unexecuted[o.uid.creator].push o
#
# Flush one operation from the line of a specific user.
#
flushOne: (user)-> flushOne: (user)->
if @unexecuted[user]?.length > 0 if @unexecuted[user]?.length > 0
@engine.applyOp @unexecuted[user].shift() @engine.applyOp @unexecuted[user].shift()
#
# Flush one operation on a random line.
#
flushOneRandom: ()-> flushOneRandom: ()->
@flushOne (_.random 0, (user_list.length-1)) @flushOne (_.random 0, (user_list.length-1))
#
# Flush all operations on every line.
#
flushAll: ()-> flushAll: ()->
for n,ops of @unexecuted for n,ops of @unexecuted
@engine.applyOps ops @engine.applyOps ops
@unexecuted = {} @unexecuted = {}
sync: ()->
throw new Error "Can't use this a.t.m."

View File

@ -3,6 +3,11 @@
# The Engine handles how and in which order to execute operations and add operations to the HistoryBuffer. # The Engine handles how and in which order to execute operations and add operations to the HistoryBuffer.
# #
class Engine class Engine
#
# @param {HistoryBuffer} HB
# @param {Array} parser Defines how to parse encoded messages.
#
constructor: (@HB, @parser)-> constructor: (@HB, @parser)->
@unprocessed_ops = [] @unprocessed_ops = []
@ -31,6 +36,10 @@ class Engine
@unprocessed_ops.push o @unprocessed_ops.push o
@tryUnprocessed() @tryUnprocessed()
#
# Same as applyOps but operations that are already in the HB are not applied.
# @see Engine.applyOps
#
applyOpsCheckDouble: (ops_json)-> applyOpsCheckDouble: (ops_json)->
for o in ops_json for o in ops_json
if @HB.getOperation(o.uid)? if @HB.getOperation(o.uid)?
@ -49,6 +58,7 @@ class Engine
applyOp: (op_json)-> applyOp: (op_json)->
# $parse_and_execute will return false if $o_json was parsed and executed, otherwise the parsed operadion # $parse_and_execute will return false if $o_json was parsed and executed, otherwise the parsed operadion
o = @parseOperation op_json o = @parseOperation op_json
@HB.addToCounter o
# @HB.addOperation o # @HB.addOperation o
if not o.execute() if not o.execute()
@unprocessed_ops.push o @unprocessed_ops.push o

View File

@ -11,6 +11,11 @@ Engine = require "../Engine.coffee"
# * Array # * Array
# #
class JsonYatta class JsonYatta
#
# @param {String} user_id Unique id of the peer.
# @param {Connector} Connector the connector class.
#
constructor: (user_id, Connector)-> constructor: (user_id, Connector)->
@HB = new HistoryBuffer user_id @HB = new HistoryBuffer user_id
json_types = json_types_uninitialized @HB json_types = json_types_uninitialized @HB
@ -21,7 +26,6 @@ class JsonYatta
@HB.addOperation(first_word).execute() @HB.addOperation(first_word).execute()
@root_element = first_word @root_element = first_word
# #
# @result JsonType # @result JsonType
# #

View File

@ -7,46 +7,76 @@ Engine = require "../Engine.coffee"
# Framework for Text Datastructures. # Framework for Text Datastructures.
# #
class TextYatta class TextYatta
#
# @param {String} user_id Uniqe user id that defines this peer.
# @param {Connector} Connector The connector defines how you connect to the other peers.
#
constructor: (user_id, Connector)-> constructor: (user_id, Connector)->
@HB = new HistoryBuffer user_id @HB = new HistoryBuffer user_id
text_types = text_types_uninitialized @HB text_types = text_types_uninitialized @HB
@engine = new Engine @HB, text_types.parser @engine = new Engine @HB, text_types.parser
@connector = new Connector @engine, @HB, text_types.execution_listener @connector = new Connector @engine, @HB, text_types.execution_listener
root_elem = @connector.getRootElement()
if not root_elem?
first_word = new text_types.types.Word @HB.getNextOperationIdentifier()
@HB.addOperation(first_word)
first_word.execute()
@root_element = @HB.addOperation(new text_types.types.ReplaceManager first_word, @HB.getNextOperationIdentifier()).execute()
else
@root_element = @HB.getOperation(root_elem)
first_word = new text_types.types.Word undefined
@HB.addOperation(first_word).execute()
@root_element = first_word
#
# @result Word
#
getRootElement: ()-> getRootElement: ()->
@root_element @root_element
#
# @see Engine
#
getEngine: ()-> getEngine: ()->
@engine @engine
#
# Get the initialized connector.
#
getConnector: ()-> getConnector: ()->
@connector @connector
#
# @see HistoryBuffer
#
getHistoryBuffer: ()-> getHistoryBuffer: ()->
@HB @HB
#
# Get the UserId from the HistoryBuffer object.
# In most cases this will be the same as the user_id value with which
# JsonYatta was initialized (Depending on the HistoryBuffer implementation).
#
getUserId: ()-> getUserId: ()->
@HB.getUserId() @HB.getUserId()
#
# @see JsonType.val
#
val: ()-> val: ()->
@root_element.val().val() @root_element.val()
#
# @see Word.insertText
#
insertText: (pos, content)-> insertText: (pos, content)->
@root_element.val().insertText pos, content @root_element.insertText pos, content
#
# @see Word.deleteText
#
deleteText: (pos, length)-> deleteText: (pos, length)->
@root_element.val().deleteText pos, length @root_element.deleteText pos, length
#
# @see Word.replaceText
#
replaceText: (text)-> replaceText: (text)->
@root_element.val().replaceText text @root_element.replaceText text
module.exports = TextYatta module.exports = TextYatta

View File

@ -42,6 +42,9 @@ class HistoryBuffer
res[user] = ctn res[user] = ctn
res res
#
# Encode this operation in such a way that it can be parsed by remote peers.
#
_encode: (state_vector={})-> _encode: (state_vector={})->
json = [] json = []
unknown = (user, o_number)-> unknown = (user, o_number)->
@ -84,28 +87,38 @@ class HistoryBuffer
@operation_counter[user_id]++ @operation_counter[user_id]++
uid uid
#
# Retrieve an operation from a unique id. # Retrieve an operation from a unique id.
#
getOperation: (uid)-> getOperation: (uid)->
if uid instanceof Object if uid instanceof Object
@buffer[uid.creator]?[uid.op_number] @buffer[uid.creator]?[uid.op_number]
else if not uid? else if not uid?
else else
throw new Error "This type of uid is not defined!" throw new Error "This type of uid is not defined!"
#
# Add an operation to the HB. Note that this will not link it against # Add an operation to the HB. Note that this will not link it against
# other operations (it wont executed) # other operations (it wont executed)
#
addOperation: (o)-> addOperation: (o)->
if not @buffer[o.creator]? if not @buffer[o.creator]?
@buffer[o.creator] = {} @buffer[o.creator] = {}
if not @operation_counter[o.creator]?
@operation_counter[o.creator] = 0
#if @operation_counter[o.creator] isnt o.op_number and typeof o.op_number is 'number'
# throw new Error "You don't receive operations in the proper order. Try counting like this 0,1,2,3,4,.. ;)"
if @buffer[o.creator][o.op_number]? if @buffer[o.creator][o.op_number]?
throw new Error "You must not overwrite operations!" throw new Error "You must not overwrite operations!"
@buffer[o.creator][o.op_number] = o @buffer[o.creator][o.op_number] = o
if typeof o.op_number is 'number' and o.creator isnt @getUserId()
@operation_counter[o.creator]++
o o
#
# Increment the operation_counter that defines the current state of the Engine.
#
addToCounter: (o)->
if not @operation_counter[o.creator]?
@operation_counter[o.creator] = 0
if typeof o.op_number is 'number' and o.creator isnt @getUserId()
@operation_counter[o.creator]++
#if @operation_counter[o.creator] isnt (o.op_number + 1)
#console.log (@operation_counter[o.creator] - (o.op_number + 1))
#console.log o
#throw new Error "You don't receive operations in the proper order. Try counting like this 0,1,2,3,4,.. ;)"
module.exports = HistoryBuffer module.exports = HistoryBuffer

View File

@ -303,6 +303,9 @@ module.exports = (HB)->
val : ()-> val : ()->
@content @content
#
# Encode this operation in such a way that it can be parsed by remote peers.
#
_encode: ()-> _encode: ()->
json = { json = {
'type': "ImmutableObject" 'type': "ImmutableObject"

View File

@ -64,6 +64,10 @@ module.exports = (HB)->
# console.log(w.newProperty == "Awesome") # true! # console.log(w.newProperty == "Awesome") # true!
# #
class JsonWrapper class JsonWrapper
#
# @param {JsonType} jsonType Instance of the JsonType that this class wrappes.
#
constructor: (jsonType)-> constructor: (jsonType)->
for name, obj of jsonType.map for name, obj of jsonType.map
do (name, obj)-> do (name, obj)->
@ -105,9 +109,15 @@ module.exports = (HB)->
for name,o of initial_value for name,o of initial_value
@val name, o, mutable @val name, o, mutable
#
# Whether the default is 'mutable' (true) or 'immutable' (false)
#
mutable_default: mutable_default:
true true
#
# Set if the default is 'mutable' or 'immutable'
# @param {String|Boolean} mutable Set either 'mutable' / true or 'immutable' / false
setMutableDefault: (mutable)-> setMutableDefault: (mutable)->
if mutable is true or mutable is 'mutable' if mutable is true or mutable is 'mutable'
JsonType.prototype.mutable_default = true JsonType.prototype.mutable_default = true

View File

@ -17,6 +17,9 @@ module.exports = (HB)->
@map = {} @map = {}
super uid super uid
#
# @see JsonTypes.val
#
val: (name, content)-> val: (name, content)->
if content? if content?
if not @map[name]? if not @map[name]?
@ -55,6 +58,12 @@ module.exports = (HB)->
@saveOperation 'map_manager', map_manager @saveOperation 'map_manager', map_manager
super uid super uid
#
# If map_manager doesn't have the property name, then add it.
# The ReplaceManager that is being written on the property is unique
# in such a way that if AddName is executed (from another peer) it will
# always have the same result (ReplaceManager, and its beginning and end are the same)
#
execute: ()-> execute: ()->
if not @validateSavedOperations() if not @validateSavedOperations()
return false return false
@ -72,6 +81,9 @@ module.exports = (HB)->
@map_manager.map[@name] = HB.addOperation(new ReplaceManager undefined, uid_r, beg, end).execute() @map_manager.map[@name] = HB.addOperation(new ReplaceManager undefined, uid_r, beg, end).execute()
super super
#
# Encode this operation in such a way that it can be parsed by remote peers.
#
_encode: ()-> _encode: ()->
{ {
'type' : "AddName" 'type' : "AddName"
@ -163,17 +175,27 @@ module.exports = (HB)->
if initial_content? if initial_content?
@replace initial_content @replace initial_content
#
# Replace the existing word with a new word.
#
replace: (content)-> replace: (content)->
o = @getLastOperation() o = @getLastOperation()
op = new Replaceable content, @, undefined, o, o.next_cl op = new Replaceable content, @, undefined, o, o.next_cl
HB.addOperation(op).execute() HB.addOperation(op).execute()
#
# Get the value of this Word
# @return {String}
#
val: ()-> val: ()->
o = @getLastOperation() o = @getLastOperation()
if o instanceof types.Delimiter if o instanceof types.Delimiter
throw new Error "dtrn" throw new Error "dtrn"
o.val() o.val()
#
# Encode this operation in such a way that it can be parsed by remote peers.
#
_encode: ()-> _encode: ()->
json = json =
{ {
@ -220,12 +242,22 @@ module.exports = (HB)->
throw new Error "You must define content, prev, and next for Replaceable-types!" throw new Error "You must define content, prev, and next for Replaceable-types!"
super uid, prev, next, origin super uid, prev, next, origin
#
# Return the content that this operation holds.
#
val: ()-> val: ()->
@content @content
#
# Replace the content of this replaceable with new content.
#
replace: (content)-> replace: (content)->
@parent.replace content @parent.replace content
#
# If possible set the replace manager in the content.
# @see Word.setReplaceManager
#
execute: ()-> execute: ()->
if not @validateSavedOperations() if not @validateSavedOperations()
return false return false
@ -235,8 +267,7 @@ module.exports = (HB)->
@ @
# #
# Convert all relevant information of this operation to the json-format. # Encode this operation in such a way that it can be parsed by remote peers.
# This result can be send to other clients.
# #
_encode: ()-> _encode: ()->
json = json =

View File

@ -140,6 +140,9 @@ module.exports = (HB)->
@saveOperation 'replace_manager', op @saveOperation 'replace_manager', op
@validateSavedOperations @validateSavedOperations
#
# Encode this operation in such a way that it can be parsed by remote peers.
#
_encode: ()-> _encode: ()->
json = { json = {
'type': "Word" 'type': "Word"

View File

@ -1,7 +1,7 @@
{ {
"name": "Yatta", "name": "yatta",
"version": "0.0.1", "version": "0.0.0",
"description": "A Collaboration Framework for arbitrary data structures that is NOT based on Operational Transformation.", "description": "A Framework that enables Real-Time Collaboration on arbitrary data structures.",
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {
"test": "grunt test" "test": "grunt test"
@ -12,13 +12,16 @@
}, },
"keywords": [ "keywords": [
"OT", "OT",
"Complex Data Structures",
"XML",
"collaboration", "collaboration",
"Yata" "Yata",
"synchronization",
"ShareJS",
"Coweb",
"concurrency"
], ],
"author": "Kevin Jahns", "author": "Kevin Jahns",
"license": "LGPL", "email" : "kevin.jahns@rwth-aachen.de",
"license": "MIT",
"bugs": { "bugs": {
"url": "https://github.com/DadaMonad/Yatta/issues" "url": "https://github.com/DadaMonad/Yatta/issues"
}, },

View File

@ -13,9 +13,9 @@ Connector_uninitialized = require "../lib/Connectors/TestConnector.coffee"
class Test class Test
constructor: (@name_suffix = "")-> constructor: (@name_suffix = "")->
@number_of_test_cases_multiplier = 1 @number_of_test_cases_multiplier = 1
@repeat_this = 5 * @number_of_test_cases_multiplier @repeat_this = 1 * @number_of_test_cases_multiplier
@doSomething_amount = 1000 * @number_of_test_cases_multiplier @doSomething_amount = 1000 * @number_of_test_cases_multiplier
@number_of_engines = 10 + @number_of_test_cases_multiplier - 1 @number_of_engines = 2 + @number_of_test_cases_multiplier - 1
@time = 0 @time = 0
@ops = 0 @ops = 0
@ -169,7 +169,7 @@ describe "JsonYatta", ->
expect(w.set.x).to.equal("x") expect(w.set.x).to.equal("x")
it "handles double-late-join", -> it "handles double-late-join", ->
test = new Test("doubble") test = new Test("double")
test.run() test.run()
@yTest.run() @yTest.run()
u1 = test.users[0] u1 = test.users[0]