Renamed the JavaScript's MibewAPIWindowToCoreInteraction class to the MibewAPICoreInteraction

This commit is contained in:
Dmitriy Simushev 2012-08-22 12:07:05 +00:00
parent 3ec23b5ae5
commit 077eac1c53
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ MibewAPI.prototype.buildResult=function(a,b){var c=this.interaction.getObligator
MibewAPI.prototype.decodePackage=function(a){a=JSON.parse(decodeURIComponent(a.replace(/\+/gi," ")));this.checkPackage(a);return a};function MibewAPIInteraction(){this.obligatoryArguments={};this.reservedFunctionNames=[]} MibewAPI.prototype.decodePackage=function(a){a=JSON.parse(decodeURIComponent(a.replace(/\+/gi," ")));this.checkPackage(a);return a};function MibewAPIInteraction(){this.obligatoryArguments={};this.reservedFunctionNames=[]}
MibewAPIInteraction.prototype.getObligatoryArguments=function(a){var b=[];if("object"==typeof this.obligatoryArguments["*"])for(var c in this.obligatoryArguments["*"])this.obligatoryArguments["*"].hasOwnProperty(c)&&b.push(c);if("object"==typeof this.obligatoryArguments[a])for(c in this.obligatoryArguments[a])this.obligatoryArguments[a].hasOwnProperty(c)&&b.push(c);return b}; MibewAPIInteraction.prototype.getObligatoryArguments=function(a){var b=[];if("object"==typeof this.obligatoryArguments["*"])for(var c in this.obligatoryArguments["*"])this.obligatoryArguments["*"].hasOwnProperty(c)&&b.push(c);if("object"==typeof this.obligatoryArguments[a])for(c in this.obligatoryArguments[a])this.obligatoryArguments[a].hasOwnProperty(c)&&b.push(c);return b};
MibewAPIInteraction.prototype.getObligatoryArgumentsDefaults=function(a){var b={};if("object"==typeof this.obligatoryArguments["*"])for(var c in this.obligatoryArguments["*"])this.obligatoryArguments["*"].hasOwnProperty(c)&&(b[c]=this.obligatoryArguments["*"][c]);if("object"==typeof this.obligatoryArguments[a])for(c in this.obligatoryArguments[a])this.obligatoryArguments[a].hasOwnProperty(c)&&(b[c]=this.obligatoryArguments[a][c]);return b}; MibewAPIInteraction.prototype.getObligatoryArgumentsDefaults=function(a){var b={};if("object"==typeof this.obligatoryArguments["*"])for(var c in this.obligatoryArguments["*"])this.obligatoryArguments["*"].hasOwnProperty(c)&&(b[c]=this.obligatoryArguments["*"][c]);if("object"==typeof this.obligatoryArguments[a])for(c in this.obligatoryArguments[a])this.obligatoryArguments[a].hasOwnProperty(c)&&(b[c]=this.obligatoryArguments[a][c]);return b};
function MibewAPIWindowToCoreInteraction(){this.obligatoryArguments={"*":{"return":{},references:{}}};this.reservedFunctionNames=["result"]}MibewAPIWindowToCoreInteraction.prototype=new MibewAPIInteraction;function MibewAPIExecutionContext(){this.returnValues={};this.functionsResults=[]} function MibewAPICoreInteraction(){this.obligatoryArguments={"*":{"return":{},references:{}}};this.reservedFunctionNames=["result"]}MibewAPICoreInteraction.prototype=new MibewAPIInteraction;function MibewAPIExecutionContext(){this.returnValues={};this.functionsResults=[]}
MibewAPIExecutionContext.prototype.getArgumentsList=function(a){var b=a.arguments,c=a.arguments.references,d,f,e;for(e in c)if(c.hasOwnProperty(e)){f=c[e];if("undefined"==typeof this.functionsResults[f-1])throw Error("Wrong reference in '"+a["function"]+"' function. Function #"+f+" does not call yet.");if("undefined"==typeof b[e]||""==b[e])throw Error("Wrong reference in '"+a["function"]+"' function. Empty '"+e+"' argument.");d=b[e];if("undefined"==typeof this.functionsResults[f-1][d])throw Error("Wrong reference in '"+ MibewAPIExecutionContext.prototype.getArgumentsList=function(a){var b=a.arguments,c=a.arguments.references,d,f,e;for(e in c)if(c.hasOwnProperty(e)){f=c[e];if("undefined"==typeof this.functionsResults[f-1])throw Error("Wrong reference in '"+a["function"]+"' function. Function #"+f+" does not call yet.");if("undefined"==typeof b[e]||""==b[e])throw Error("Wrong reference in '"+a["function"]+"' function. Empty '"+e+"' argument.");d=b[e];if("undefined"==typeof this.functionsResults[f-1][d])throw Error("Wrong reference in '"+
a["function"]+"' function. There is no '"+d+"' argument in #"+f+" function results");b[e]=this.functionsResults[f-1][d]}return b};MibewAPIExecutionContext.prototype.getResults=function(){return this.returnValues}; a["function"]+"' function. There is no '"+d+"' argument in #"+f+" function results");b[e]=this.functionsResults[f-1][d]}return b};MibewAPIExecutionContext.prototype.getResults=function(){return this.returnValues};
MibewAPIExecutionContext.prototype.storeFunctionResults=function(a,b){var c,d;for(d in a.arguments["return"])if(a.arguments["return"].hasOwnProperty(d)){c=a.arguments["return"][d];if("undefined"==typeof b[d])throw Error("Variable with name '"+d+"' is undefined in the results of the '"+a["function"]+"' function");this.returnValues[c]=b[d]}this.functionsResults.push(b)}; MibewAPIExecutionContext.prototype.storeFunctionResults=function(a,b){var c,d;for(d in a.arguments["return"])if(a.arguments["return"].hasOwnProperty(d)){c=a.arguments["return"][d];if("undefined"==typeof b[d])throw Error("Variable with name '"+d+"' is undefined in the results of the '"+a["function"]+"' function");this.returnValues[c]=b[d]}this.functionsResults.push(b)};

View File

@ -383,7 +383,7 @@ MibewAPIInteraction.prototype.getObligatoryArgumentsDefaults = function(function
* @constructor * @constructor
* @todo Think about real values! * @todo Think about real values!
*/ */
function MibewAPIWindowToCoreInteraction() { function MibewAPICoreInteraction() {
this.obligatoryArguments = { this.obligatoryArguments = {
'*': { '*': {
'return': {}, 'return': {},
@ -395,7 +395,7 @@ function MibewAPIWindowToCoreInteraction() {
'result' 'result'
]; ];
} }
MibewAPIWindowToCoreInteraction.prototype = new MibewAPIInteraction(); MibewAPICoreInteraction.prototype = new MibewAPIInteraction();
/** /**
* Implements functions execution context * Implements functions execution context