/// <summary> /// Loads all templates for the 'CPP' 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_cpp.Properties.Resources.cg_cpp_templates, "cg_cpp_templates.txt"); if (S.m_generateTestSuite) // only load when testing code is required { cog.LoadTemplates(g25_cg_cpp.Properties.Resources.cg_cpp_test_templates, "cg_cpp_test_templates.txt"); } }
/// <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"); }
/// <summary> /// Loads shared templates for C and C++ for into 'cog'. /// Specifically, loads 'cg_shared_c_templates.txt' /// which is a project resource of g25_cg_shared. /// </summary> /// <param name="cog">Templates are loaded into cog.</param> public static void LoadCTemplates(CoGsharp.CoG cog) { cog.LoadTemplates(g25_cg_shared.Properties.Resources.cg_shared_c_templates, "cg_shared_c_templates.txt"); }