Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
Operation | transform (Operation op1, Operation op2, Object param) |
int | transformIndex (int index, Operation op, Object param) |
Protected Member Functions | |
Operation | transform (InsertOperation insA, InsertOperation insB, boolean isTransformPrivileged) |
Operation | transform (InsertOperation insA, DeleteOperation delB) |
Operation | transform (DeleteOperation delA, InsertOperation insB) |
Operation | transform (DeleteOperation delA, DeleteOperation delB) |
Implementation of the GOTO operational transformation functions. The pseudo code can be found in the paper "Achieving Convergence, Causality-preservation, and Intention-preservation in Real-time cooperative Editing Systems" by Chengzheng Sun, Xiaohua Jia, Yanchun Zhang, Yun Yang, and David Chen.
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform | ( | Operation | op1, |
Operation | op2, | ||
Object | param | ||
) |
Transform operation op1 in the context of another operation op2. The transformed operation op1' is returned.
op1 | the operation to transform |
op2 | the operation which is the context for the other one |
param | a boolean flag to privilege the first operation op1 (i.e. remains unchanged) when two insert operations are equivalent i.e. they have the same position and origin index. |
A NoOperation is not affected.
If the context is null, we return op1 unchanged.
Given two operations s1 and s2 to be transformed in the context of op2, we need to calculate s1' as t(s1, op2) and s2' as t(s2, op2') where op2' is t(op2, s1)
O s1 / \ op2 O O s2 / \ / s1' O O \ / s2' O
Given an operation op1 to be transformed in the context of two operations s1 and s2, we need to calculate op1' as t(op1', s2) where op1' is t(op1, s1)
O s1 / \ op1 O O s2 / \ / O O op1'\ / O
Implements de.fu_berlin.inf.dpp.concurrent.jupiter.InclusionTransformation.
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform | ( | DeleteOperation | delA, |
DeleteOperation | delB | ||
) | [protected] |
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform | ( | DeleteOperation | delA, |
InsertOperation | insB | ||
) | [protected] |
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform | ( | InsertOperation | insA, |
DeleteOperation | delB | ||
) | [protected] |
Operation de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transform | ( | InsertOperation | insA, |
InsertOperation | insB, | ||
boolean | isTransformPrivileged | ||
) | [protected] |
int de.fu_berlin.inf.dpp.concurrent.jupiter.internal.text.GOTOInclusionTransformation.transformIndex | ( | int | index, |
Operation | op, | ||
Object | param | ||
) |
Transforms an index against the given operation.
index | the index to be transformed |
op | the Operation to be transformed |
param | an additional implementation dependent parameter |
Implements de.fu_berlin.inf.dpp.concurrent.jupiter.InclusionTransformation.