package gw.rating uses gw.lang.reflect.IType interface RateRoutineExecutionLogger { public static final var LOGGER_NAME : String = "_log" property get Term(): RateRoutineExecutionTermWrapper property get Addition(): RateRoutineExecutionTermWrapper property get Division(): RateRoutineExecutionTermWrapper property get Multiplication(): RateRoutineExecutionTermWrapper property get Subtraction(): RateRoutineExecutionTermWrapper property get EqualTo(): RateRoutineExecutionTermWrapper property get LessThan(): RateRoutineExecutionTermWrapper property get GreaterThan(): RateRoutineExecutionTermWrapper property get LessThanEqual(): RateRoutineExecutionTermWrapper property get GreaterThanEqual(): RateRoutineExecutionTermWrapper property get NotEqual(): RateRoutineExecutionTermWrapper property get LogicalOr(): RateRoutineExecutionTermWrapper property get LogicalAnd(): RateRoutineExecutionTermWrapper property get TypekeyIn(): RateRoutineExecutionTermWrapper property get TypekeyNotIn(): RateRoutineExecutionTermWrapper /** * Log the beginning of a new rateflow routine * * @param book Book code * @param bookEdition Edition * @param routineCode Routine code * @param routineVersion Routine version */ function begin(book : String, bookEdition : String, routineCode : String, routineVersion : String) /** * Log the end of a rateflow routine */ function end() /** * Logs the assignment of a constant to a new variable * * @param variableName Variable name * @param value The value * @return the result of the expression */ reified function let(variableName : String, value : T ) : T /** * Logs the assignment of an expression to a new variable * * @param variableName Variable name * @param code The expression * @return the result of the expression * */ reified function let(variableName : String, code : block() : T ): T /** * Logs the assignment of an expression to an existing variable * * @param variableName the variable name * @param code The expression * @return the result of the expression */ reified function store(variableName : String, code : block() : T ) : T /** * Logs the return of a value of a function * * @param variableName the variable name * @param value The constant value * @return the result of the expression */ reified function retrn(value : T) : T /** * Logs the return of a value of a function * * @param variableName the variable name * @param code The code block * @return the result of the expression */ reified function retrn(code : block() : T) : T /** * Logs the assignment of an expression to an object property * * @param objectName the object name * @param obj the object we're setting the property on * @param propertyName the property name * @param code The expression * @return the result of the expression */ reified function set(objectName: String, obj: Object, propertyName: String, code: block(): T ) : T /** * Logs the invocation of a static function with no return value * * @param clazz The class containing the function * @param subroutineName The function's name * @param code the subroutine expression * */ function subr(clazz : IType, functionName : String, code : block() ) /** * Logs the invocation of a static function with no return value * * @param clazz The class containing the function * @param functionName The subroutine's name * @param type Arbitrary string value; may be useful as a rendering hint * @param code the subroutine expression * */ function subr(clazz : IType, functionName : String, type : String, code : block() ) /** * Logs the invocation of a function with no arguments and no return value. * * @param functionName the function name * @param code the subroutine expression */ function method(functionName: String, code: block()) /** * Logs the invocation of a function on an object with no return value * * @param objectName the object's variable name * @param object The object on which the function is being invoked * @param functionName The function name * @param code the subroutine expression * */ function method(objectName : String, object : Object, functionName : String, code : block() ) /** * Logs a function call on an object with no return value * * @param objectName the object's variable name * @param object The object on which the function is being invoked. * @param functionName The function name * @param type the type of subroutine, such as "Rounding" or any other type string wish to capture * @param code the subroutine expression * */ function method(objectName : String, object : Object, functionName : String, type : String, code : block() ) /** * Logs a message before loop start * * @param iterableName the Iterable/array being looped over * @param iterableTypeName type of the Iterable/array * @param loopVarName loop variable * @param loopVarTypeName type of the loop variable, i.e., type of elements in the Iterable/array * @param loopIndexVarName loop index variable */ function loop(iterableName: String, iterableTypeName: String, loopVarName: String, loopVarTypeName: String, loopIndexVarName: String, iterableSize: int) /** * Logs a message at the start of each loop iteration * * @param iterableName the Iterable/array being looped over * @param iterableTypeName type of the Iterable/array * @param loopvarName loop variable * @param loopvarTypeName type of the loop variable, i.e., type of elements in the Iterable/array * @param loopIndexVarName loop index variable name * @param loopIndexVarValue value of the loop index variable */ function iteration(iterableName: String, iterableTypeName: String, loopvarName: String, loopvarTypeName:String, loopIndexVarName: String, loopIndexVarValue: int) function endloop() /** * Log conditionals. A conditional is an entire if statement, including all its branches. * @param code block */ function conditionals(code : block()) /** * Logs an if statement * @param code the expression within the if statement * @return the result of the conditional statement */ function iff(code : block() : boolean ) : boolean /** * Logs an else if statement * @param code the expression within the else if statement * @return the result of the conditional statement * */ function elsif(code : block() : boolean ) : boolean /** * Logs an else statement * @param code the expression within the else statement * @return the result of the conditional statement * */ function els() /** * The condition of an if or else-if. * @param initialIf if true then this condition is of the first if */ function beginConditional(initialIf: boolean) /** * Logs the value of a condition of an if or else-if * @param value result of evaluating the condition */ function setConditionalResult(value: boolean) /** * End of a branch of an if statement. * @param isEndif true if this is the last branch */ function endConditional(isEndif: boolean) /** * Logs a note * @param note The note * */ function note(note : String) /** * Logs a note of a specific type * * @param type Note type * @param note Note text * */ function note(type : String, note : String) /** * Logs an empty line * */ function br() /** * Logs a named function argument * * @param name The argument name * @param value The constant value * @return the return value of the expression */ reified function arg(name : String, value : T) : T /** * Logs a named function argument * * @param name The argument name * @param code the expression representing the value of the argument * @return the return value of the expression */ reified function arg(name : String, code : block() : T) : T /** * Logs a named function argument that is copied to a local variable * * @param argumentName the argument name * @param localVariableName name of the local variable * @param value value of the argument * @param type of value * @return */ reified function argVar(argumentName: String, localVariableName: String, value: T): T reified function loggedRateQuery(op: String, rateBook: RateBook, table: String): RateRoutineExecutionLoggedRateQuery reified function loggedRateQuery(op: String, leftParens : int, rightParens : int, rateBook: RateBook, table: String): RateRoutineExecutionLoggedRateQuery public function startAssignment(variableName : String, variableDeclaration : boolean) : AssignmentFrame public function startSet(objectName : String, obj : Object, propertyName : String) : AssignmentFrame public function startCostDataRounding() : AssignmentFrame /** * Clear the logger */ function clear() interface AssignmentFrame { function finishAssignment(result : T) function finish() } interface PushFrame { function pop(returnVal : T) : T } interface OperationFrame { function calcValue(value : T) : T } interface VoidFunctionFrame { function finishVFn() } interface PushVoidFunctionFrame { function popVfn() } }