Example #1
0
        private QVTBase.FunctionParameter ConstructParameter(QVTBase.Function function, EnAr.Parameter parameter)
        {
            QVTBase.FunctionParameter result = new QVTBase.FunctionParameter()
            {
                Operation            = function,
                Type                 = emofImporter.ConstructTypeOfParameter(parameter),
                Name                 = parameter.Name,
                IsOrdered            = null,
                IsUnique             = null,
                Lower                = null,
                Upper                = null,
                InitExpression       = null,
                RepresentedParameter = null,
                ReferencedElements   = { },
                OwnedComment         = { },
                LetExp               = null,
            };

            function.OwnedParameter.Add(result);
            return(result);
        }
Example #2
0
        private QVTBase.Function ConstructFunction(QVTRelations.RelationalTransformation transformation, EnAr.Method method)
        {
            QVTBase.Function result = new QVTBase.Function()
            {
                Type               = emofImporter.ConstructTypeOfMethod(method),
                Name               = method.Name,
                Class              = transformation,
                IsOrdered          = false,
                IsUnique           = false,
                Lower              = 1,
                Upper              = 1,
                OwnedComment       = { },
                QueryExpression    = null,
                RaisedException    = { },
                ReferencedElements = { }, // TODO ???
            };

            foreach (EnAr.Parameter parameter in method.Parameters)
            {
                ConstructParameter(result, parameter);
            }

            return(result);
        }