Main Page ? Class Hierarchy ? Compound List ? File List ? Compound Members ? File Members ?

cmt_generators.h

Go to the documentation of this file.
00001 #ifndef __cmt_generators_h__
00002 #define __cmt_generators_h__
00003 
00004 #include "cmt_constituent.h"
00005 #include "cmt_fragment.h"
00006 #include "cmt_generator.h"
00007 
00008 class AnyDocumentGenerator : public CmtGenerator
00009 {
00010 public:
00011   AnyDocumentGenerator ();
00012 
00013 protected:
00014   void reset ();
00015 
00016   Variable m_TITLE;
00017 
00018   FragmentHandle make_header_fragment;
00019   FragmentHandle cleanup_header_fragment;
00020   FragmentHandle cleanup_fragment;
00021   FragmentHandle dependencies_fragment;
00022   FragmentHandle dependencies_and_triggers_fragment;
00023 };
00024 
00025 class DocumentGenerator : public AnyDocumentGenerator
00026 {
00027 public:
00028   DocumentGenerator ();
00029   void build (const cmt_string& package,
00030               const Constituent& constituent);
00031 
00032 private:
00033   void reset ();
00034   void analyze_document_file (const cmt_string& file,
00035                               const cmt_string& constituent_name,
00036                               const cmt_string& output_suffix);
00037 
00038   FragmentHandle document_header_fragment;
00039 };
00040 
00041 class LibraryGenerator : public AnyDocumentGenerator
00042 {
00043 public:
00044   LibraryGenerator ();
00045   void build (const cmt_string& package,
00046               const Constituent& constituent);
00047 
00048 protected:
00049   void reset ();
00050   void analyze_file (const Constituent& constituent,
00051                      const cmt_string& file);
00052   void java_file_action (SourceFile& file, const Constituent& constituent);
00053   void proto_file_action (const cmt_string& file, const Constituent& constituent);
00054   void prepare_proto_file (const cmt_string& file);
00055   void module_file_action (SourceFile& file, const Constituent& constituent);
00056 
00057   FragmentHandle library_header_fragment;
00058   FragmentHandle application_header_fragment;
00059   FragmentHandle java_header_fragment;
00060   FragmentHandle jar_header_fragment;
00061   FragmentHandle library_fragment;
00062   FragmentHandle library_no_share_fragment;
00063   FragmentHandle application_fragment;
00064   FragmentHandle jar_fragment;
00065   FragmentHandle java_fragment;
00066   FragmentHandle java_copy_fragment;
00067   FragmentHandle cleanup_library_fragment;
00068   FragmentHandle cleanup_application_fragment;
00069   FragmentHandle cleanup_java_fragment;
00070   FragmentHandle cleanup_objects_fragment;
00071   FragmentHandle buildproto_fragment;
00072   FragmentHandle check_application_fragment;
00073   FragmentHandle check_java_fragment;
00074   FragmentHandle protos_header_fragment;
00075 };
00076 
00077 class ApplicationGenerator : public LibraryGenerator
00078 {
00079 public:
00080 };
00081 
00082 class ReadmeGenerator : public CmtGenerator
00083 {
00084 public:
00085   ReadmeGenerator ();
00086   void build (const CmtSystem::cmt_string_vector& arguments);
00087 
00088 private:
00089   void reset ();
00090 
00091   FragmentHandle readme_header_fragment;
00092   FragmentHandle readme_fragment;
00093   FragmentHandle readme_doc_fragment;
00094   FragmentHandle readme_use_fragment;
00095   FragmentHandle readme_trailer_fragment;
00096 };
00097 
00098 class PrototypeGenerator : public CmtGenerator
00099 {
00100 public:
00101   void build (const cmt_string& file_name);
00102 };
00103 
00104 class DefaultMakefileGenerator : public CmtGenerator
00105 {
00106 public:
00107   void build ();
00108 };
00109 
00110 class MSDEVGenerator : public CmtGenerator
00111 {
00112 public:
00113   MSDEVGenerator ();
00114   int build_workspace (const Constituent::ConstituentVector& constituents);
00115   int build_project (const Constituent& constituent);
00116 
00117 private:
00118   void reset ();
00119 
00120   cmt_string msdevdir;
00121 
00122   FragmentHandle dsw_header_fragment;
00123   FragmentHandle dsw_project_fragment;
00124   FragmentHandle dsw_all_project_header_fragment;
00125   FragmentHandle dsw_all_project_dependency_fragment;
00126   FragmentHandle dsw_all_project_trailer_fragment;
00127   FragmentHandle dsw_trailer_fragment;
00128 
00129   FragmentHandle dsp_all_fragment;
00130   FragmentHandle dsp_library_header_fragment;
00131   FragmentHandle dsp_application_header_fragment;
00132   FragmentHandle dsp_windows_header_fragment;
00133   FragmentHandle dsp_contents_fragment;
00134   FragmentHandle dsp_trailer_fragment;
00135 
00136 };
00137 
00138 class VSNETGenerator : public CmtGenerator
00139 {
00140 public:
00141   VSNETGenerator ();
00142   int build_workspace (const Constituent::ConstituentVector& constituents);
00143   int build_project (const Constituent& constituent);
00144 
00145 private:
00146   void reset ();
00147 
00148   void pseudoGUID (const cmt_string& a, 
00149                    const cmt_string& b, 
00150                    const cmt_string& c, 
00151                    cmt_string& d);
00152 
00153   cmt_string vsnetdir;
00154 
00155     //Visual Studio.net Support
00156   FragmentHandle sln_header_fragment;
00157   FragmentHandle sln_project_fragment;
00158   FragmentHandle sln_dependency_header_fragment;
00159   FragmentHandle sln_dependency_project_fragment;
00160   FragmentHandle sln_dependency_trailer_fragment;
00161   FragmentHandle sln_project_config_fragment;
00162   FragmentHandle sln_trailer_fragment;
00163 
00164   FragmentHandle vcproj_all_fragment;
00165   FragmentHandle vcproj_library_header_fragment;
00166   FragmentHandle vcproj_application_header_fragment;
00167   FragmentHandle vcproj_windows_header_fragment;
00168   FragmentHandle vcproj_contents_fragment;
00169   FragmentHandle vcproj_directory_header_fragment;
00170   FragmentHandle vcproj_directory_trailer_fragment;
00171   FragmentHandle vcproj_trailer_fragment;
00172 };
00173 
00174 class MakeSetupGenerator : public CmtGenerator
00175 {
00176 public:
00177   MakeSetupGenerator ();
00178   void build (const cmt_string& package);
00179 
00180 private:
00181   void reset ();
00182 
00183   FragmentHandle make_setup_header_fragment;
00184   FragmentHandle make_setup_fragment;
00185 };
00186 
00187 class ConstituentsMakefileGenerator : public CmtGenerator
00188 {
00189 public:
00190   ConstituentsMakefileGenerator ();
00191   void build (const cmt_string& package,
00192               const CmtSystem::cmt_string_vector& arguments);
00193 
00194 private:
00195   void reset ();
00196 
00197   FragmentHandle constituents_header_fragment;
00198   FragmentHandle constituents_trailer_fragment;
00199   FragmentHandle group_fragment;
00200   FragmentHandle constituent_fragment;
00201   FragmentHandle check_application_header_fragment;
00202 };
00203 
00204 class DependencyGenerator : public CmtGenerator
00205 {
00206 public:
00207   void build (const cmt_string& name, int argc, char* argv[]);
00208 
00209 private:
00210   void add_line_to_text (const cmt_string& line, cmt_string& text);
00211   cmt_string build (const cmt_string& file_name);
00212 };
00213 
00214 #endif

Generated on Thu Jul 1 15:25:33 2004 for CMT by 1.2.18