Esempio n. 1
0
        public override void GenerateFiles(Generator generator, Document document)
        {
            foreach (Protocol protocol in document.Protocols)
            {
                foreach (Declaration declaration in protocol.Declarations)
                {
                    JavaStructure implementation = declaration.Implementation as JavaStructure;

                    string fileSuffix = implementation != null && implementation.IsSurrogate ? "Surrogate.java" : ".java";

                    generator.GenerateFile(
                        Path.Combine(generator.DestinationPath, declaration.Identifier + fileSuffix),
                        Templates.JavaTemplate, "file", "Declaration", declaration);
                }
            }
        }
Esempio n. 2
0
 public override void GenerateFiles(Generator generator, Document document)
 {
     generator.GenerateFile(
         Path.Combine(generator.DestinationPath, generator.BaseName + ".cs"), Templates.CsTemplate, "file", "Document", document);
 }
Esempio n. 3
0
        public override void GenerateFiles(Generator generator, Document document)
        {
            foreach (Protocol protocol in document.Protocols)
            {
                PythonProtocol pythonProtocol = protocol.Implementation as PythonProtocol;

                generator.GenerateFile(
                    Path.Combine(generator.DestinationPath, pythonProtocol.ModuleName + ".py"),
                    Templates.PythonTemplate, "file", "Protocol", protocol);
            }
        }