00001 //----------------------------------------------------------- 00002 // Copyright Christian Arnault LAL-Orsay CNRS 00003 // arnault@lal.in2p3.fr 00004 // See the complete license in cmt_license.txt "http://www.cecill.info". 00005 //----------------------------------------------------------- 00006 00007 #ifndef __cmt_constituent_h__ 00008 #define __cmt_constituent_h__ 00009 00010 #include "cmt_parser.h" 00011 #include "cmt_system.h" 00012 #include "cmt_fragment.h" 00013 #include "cmt_group.h" 00014 00015 class Constituent 00016 { 00017 public: 00018 typedef cmt_vector<Constituent> ConstituentVector; 00019 static void action (ConstituentType type, 00020 const CmtSystem::cmt_string_vector& words); 00021 static Constituent* find (const cmt_string& name); 00022 static Constituent* add (ConstituentType type, 00023 const cmt_string& name, 00024 const cmt_string& generator); 00025 static Constituent* add_for_action (const cmt_string& name); 00026 static void show (const cmt_string& name); 00027 static void parse_all (); 00028 static void show_all (); 00029 static void show_names (); 00030 static void build_all_makefiles (bool simulation); 00031 static void build_all_msdev_files (bool simulation); 00032 static void build_all_vsnet_files (bool simulation); 00033 static void clear_all (); 00034 static ConstituentVector& constituents (); 00035 00036 public: 00037 Constituent (); 00038 ~Constituent (); 00039 void parse (); 00040 00041 virtual void clear (); 00042 virtual void build_makefile (bool simulation) const; 00043 virtual void build_msdev_file (bool simulation) const; 00044 virtual void build_vsnet_file (bool simulation) const; 00045 virtual void show () const; 00046 00047 cmt_string name; 00048 cmt_string generator; 00049 ConstituentType type; 00050 Group* group; 00051 cmt_string suffix; 00052 CmtSystem::cmt_string_vector modules; 00053 bool need_OS9; 00054 bool windows; 00055 bool no_static; 00056 bool no_share; 00057 bool need_prototypes; 00058 bool need_check; 00059 bool build_triggers; 00060 bool has_target_tag; 00061 CmtSystem::cmt_string_vector excludes; 00062 cmt_vector<cmt_regexp> exclude_exprs; 00063 00064 CmtSystem::cmt_string_vector selects; 00065 cmt_vector<cmt_regexp> select_exprs; 00066 00067 CmtSystem::cmt_string_vector includes; 00068 CmtSystem::cmt_string_vector imports; 00069 Variable::VariableVector variables; 00070 00071 private: 00072 CmtSystem::cmt_string_vector parameters; 00073 00074 }; 00075 00076 #endif