예제 #1
0
파일: go.py 프로젝트: donlinglok/m2cgen
    def __init__(self, model):
        self.model = model
        self.interpreter = interpreters.GoInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self._go = "go"
예제 #2
0
    def __init__(self, model):
        self.model = model
        self.interpreter = interpreters.HaskellInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self.exec_path = None
예제 #3
0
파일: ruby.py 프로젝트: rspadim/m2cgen
    def __init__(self, model):
        self.model = model
        self.interpreter = interpreters.RubyInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self._ruby = "ruby"
예제 #4
0
    def __init__(self, model):
        self.model = model
        self.interpreter = interpreters.RInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self._r = "Rscript"
예제 #5
0
파일: dart.py 프로젝트: yarix/m2cgen
    def __init__(self, model):
        self.model = model
        self.interpreter = interpreters.DartInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self._dart = "dart"
예제 #6
0
    def __init__(self, model):
        self.model = model
        self.interpreter = interpreters.PhpInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self._php = "php"
예제 #7
0
    def __init__(self, model):
        self.model_name = "score"
        self.model = model
        self.interpreter = RubyInterpreter()

        assembler_cls = get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self.script_path = None
예제 #8
0
    def __init__(self, model):
        self.model_name = "score"
        self.model = model
        self.interpreter = interpreters.CInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self.exec_path = None
예제 #9
0
    def __init__(self, model):
        self.model = model
        self.interpreter = interpreters.PowershellInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self._powershell = ("powershell" if platform.system()
                            in ('Windows', 'Microsoft') else "pwsh")
예제 #10
0
    def __init__(self, model):
        self.model_name = "score"
        self.model = model
        self.interpreter = PowershellInterpreter()

        assembler_cls = get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()

        self._powershell = "powershell" if system() in {
            'Windows', 'Microsoft'
        } else "pwsh"

        self.script_path = None
예제 #11
0
def _export(model, interpreter):
    assembler_cls = assemblers.get_assembler_cls(model)
    model_ast = assembler_cls(model).assemble()
    return interpreter.interpret(model_ast)
예제 #12
0
    def __init__(self, model):
        self.model = model
        self.interpreter = interpreters.VisualBasicInterpreter()

        assembler_cls = assemblers.get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()
예제 #13
0
    def __init__(self, model):
        self.model = model
        self.interpreter = CSharpInterpreter()

        assembler_cls = get_assembler_cls(model)
        self.model_ast = assembler_cls(model).assemble()
예제 #14
0
 def assemble(self):
     # import here to avoid circular import error
     from m2cgen.assemblers import get_assembler_cls
     base_model = self._get_base_model()
     return get_assembler_cls(base_model)(base_model).assemble()
예제 #15
0
 def assemble(self):
     base_model = self._get_base_model()
     return assemblers.get_assembler_cls(base_model)(base_model).assemble()