Esempio n. 1
0
        private static void compareValuesWithNotificationAndStoreResultInStatistics(CommunicationChannel communicationChannel, OperatorStatistics statistics, ExternalOperator calledOperator, Variadic left, Variadic right)
        {
            List <Variadic> operatorParameters;
            Variadic        operatorResult;

            operatorParameters = new List <Variadic>();
            operatorParameters.Add(left);
            operatorParameters.Add(right);

            operatorResult = callExternalOperatorAndSignalOnCommunicationChannel(communicationChannel, calledOperator, operatorParameters);
            // the result is supposed to be binary
            // TODO< other types? >

            System.Diagnostics.Debug.Assert(operatorResult.type == Variadic.EnumType.BOOL);
            statistics.addBool(operatorResult.valueBool);
        }
Esempio n. 2
0
        private static Variadic callExternalOperatorAndSignalOnCommunicationChannel(CommunicationChannel communicationChannel, ExternalOperator calledOperator, List <Variadic> parameters)
        {
            communicationChannel.signalExternalOperator(calledOperator.getName(), parameters);

            return(calledOperator.call(parameters));
        }