示例#1
0
文件: main.cs 项目: Sciumo/gaigen
        /// <summary>
        /// Loads all templates for the 'C' language into 'cog'. Also loads
        /// shared templates by calling G25.CG.Shared.Util.LoadTemplates(cog);
        /// </summary>
        /// <param name="cog">Templates are loaded into this variable.</param>
        /// <param name="S">Specification. Used to know whether testing code will be generated.</param>
        public override void LoadTemplates(Specification S, CoGsharp.CoG cog)
        {
            // also load shared templates:
            G25.CG.Shared.Util.LoadTemplates(cog);
            G25.CG.Shared.Util.LoadCTemplates(cog);

            //cog.LoadTemplates(g25_cg_shared.Properties.Resources.cg_shared_templates, "cg_shared_templates.txt");

            cog.LoadTemplates(g25_cg_c.Properties.Resources.cg_c_templates, "cg_c_templates.txt");
            if (S.m_generateTestSuite) // only load when testing code is required
                cog.LoadTemplates(g25_cg_c.Properties.Resources.cg_c_test_templates, "cg_c_test_templates.txt");
        }
示例#2
0
文件: main.cs 项目: Sciumo/gaigen
        /// <summary>
        /// Loads all templates for the 'Java' language into 'cog'. Also loads
        /// shared templates by calling G25.CG.Shared.Util.LoadTemplates(cog);
        /// </summary>
        /// <param name="cog">Templates are loaded into this variable.</param>
        /// <param name="S">Specification. Used to know whether testing code will be generated.</param>
        public override void LoadTemplates(Specification S, CoGsharp.CoG cog)
        {
            cog.AddReference((new G25.CG.CSJ.GMV()).GetType().Assembly.Location); // add reference for g25_cg_csj

            // also load shared templates:
            G25.CG.Shared.Util.LoadTemplates(cog);

            cog.LoadTemplates(g25_cg_csj_shared.Properties.Resources.cg_csj_shared_templates , "cg_csj_shared_templates.txt");
            cog.LoadTemplates(g25_cg_csj_shared.Properties.Resources.cg_csj_shared_test_templates, "cg_csj_shared_test_templates.txt");

            cog.LoadTemplates(g25_cg_java.Properties.Resources.cg_java_templates, "cg_java_templates.txt");
            if (S.m_generateTestSuite) // only load when testing code is required
                cog.LoadTemplates(g25_cg_java.Properties.Resources.cg_java_test_templates, "cg_java_test_templates.txt");
        }
示例#3
0
文件: util.cs 项目: Sciumo/gaigen
 /// <summary>
 /// Loads globally shared templates for into 'cog'. 
 /// Specifically, loads 'cg_shared_templates.txt'
 /// which is a project resource of g25_cg_shared.
 /// </summary>
 /// <param name="cog">Templates are loaded into cog.</param>
 public static void LoadTemplates(CoGsharp.CoG cog)
 {
     cog.LoadTemplates(g25_cg_shared.Properties.Resources.cg_shared_templates, "cg_shared_templates.txt");
 }