cmt.h Source File

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

# cmt.h

Go to the documentation of this file.

    00001 #ifndef __cmt_h__
    00002 #define __cmt_h__
    00003
    00004 #include "cmt_parser.h"
    00005 #include "cmt_system.h"
    00006
    00007 class Symbol;
    00008 class Tag;
    00009
    00010 class Cmt
    00011 {
    00012  public:
    00013   static void build_config (const cmt_string& prefix, cmt_string& config);
    00014   static void build_makefile (const cmt_string& target);
    00015   static void build_msdev_file (const cmt_string& target);
    00016   static bool build_nmake ();
    00017   static void build_OS9_makefile (const cmt_string& target);
    00018   static void build_prefix (const cmt_string& package, cmt_string& prefix);
    00019   static void clear ();
    00020
    00021   static void configure ();
    00022   static void configure_cmt_path (Use* use);
    00023   static void configure_config_tag ();
    00024   static void configure_current_dir ();
    00025   static void configure_current_package ();
    00026   static void configure_default_path ();
    00027   static void configure_home (Use* use);
    00028   static void configure_user_context (Use* use);
    00029   static void configure_hosttype_tag ();
    00030   static void configure_site_tag (Use* use);
    00031   static void configure_tags (Use* use);
    00032   static void configure_uname_tag ();
    00033
    00034   static void do_awk (const CmtSystem::cmt_string_vector& arguments);
    00035   static void do_broadcast (const CmtSystem::cmt_string_vector& arguments,
    00036                             int argc,
    00037                             char* argv[]);
    00038   static void do_build_constituent_makefile (const CmtSystem::cmt_string_vector& arguments,
    00039                                              int argc,
    00040                                              char* argv[]);
    00041   static void do_build_constituents_makefile (const CmtSystem::cmt_string_vector& arguments,
    00042                                               int argc,
    00043                                               char* argv[]);
    00044   static void do_build_dependencies (const CmtSystem::cmt_string_vector& arguments,
    00045                                      int argc,
    00046                                      char* argv[]);
    00047   static void do_build_library_links ();
    00048   static void do_build_make_setup ();
    00049   static void do_build_msdev (const CmtSystem::cmt_string_vector& arguments);
    00050   static void do_build_os9_makefile (const CmtSystem::cmt_string_vector& arguments);
    00051   static void do_build_prototype (const CmtSystem::cmt_string_vector& arguments);
    00052   static void do_build_readme (const CmtSystem::cmt_string_vector& arguments);
    00053   static void do_build_tag_makefile ();
    00054   static void do_build_temporary_name ();
    00055   static void do_build_triggers (const CmtSystem::cmt_string_vector& arguments);
    00056   static void do_build_windefs (const CmtSystem::cmt_string_vector& arguments);
    00057   static void do_check_configuration ();
    00058   static void do_check_files (const CmtSystem::cmt_string_vector& arguments);
    00059   static void do_check_version (const CmtSystem::cmt_string_vector& arguments);
    00060   static void do_checkout (const CmtSystem::cmt_string_vector& arguments);
    00061   static void do_cleanup (PrintMode& mode);
    00062   static void do_config ();
    00063   static void do_create (const CmtSystem::cmt_string_vector& arguments);
    00064   static void do_cvsbranches (const CmtSystem::cmt_string_vector& arguments);
    00065   static void do_cvssubpackages (const CmtSystem::cmt_string_vector& arguments);
    00066   static void do_cvstags (const CmtSystem::cmt_string_vector& arguments);
    00067   static void do_expand_model (const CmtSystem::cmt_string_vector& arguments);
    00068   static void do_filter (const CmtSystem::cmt_string_vector& arguments);
    00069   static void do_help ();
    00070   static void do_lock (const cmt_string& package,
    00071                        const cmt_string& version,
    00072                        const cmt_string& path);
    00073   static void do_remove (const cmt_string& package,
    00074                          const cmt_string& version,
    00075                          const cmt_string& path);
    00076   static void do_remove_library_links ();
    00077   static void do_run (const CmtSystem::cmt_string_vector& arguments);
    00078   static void do_run_sequence (const CmtSystem::cmt_string_vector& arguments);
    00079   static void do_setup (PrintMode& mode);
    00080   static void do_show_all_tags ();
    00081   static void do_show_applied_patterns ();
    00082   static void do_show_author ();
    00083   static void do_show_branches (PrintMode& mode);
    00084   static void do_show_clients (const CmtSystem::cmt_string_vector& arguments);
    00085   static void do_show_constituent (const CmtSystem::cmt_string_vector& arguments);
    00086   static void do_show_constituent_names ();
    00087   static void do_show_constituents ();
    00088   static void do_show_fragment (const CmtSystem::cmt_string_vector& arguments);
    00089   static void do_show_fragments ();
    00090   static void do_show_groups ();
    00091   static void do_show_include_dirs ();
    00092   static void do_show_language (const CmtSystem::cmt_string_vector& arguments);
    00093   static void do_show_languages ();
    00094   static void do_show_macro (const CmtSystem::cmt_string_vector& arguments,
    00095                              PrintMode& mode);
    00096   static void do_show_macro_names (const CmtSystem::cmt_string_vector& arguments,
    00097                                    PrintMode& mode);
    00098   static void do_show_macro_value (const CmtSystem::cmt_string_vector& arguments,
    00099                                    PrintMode& mode);
    00100   static void do_show_macros (const CmtSystem::cmt_string_vector& arguments,
    00101                               PrintMode& mode);
    00102   static void do_show_manager ();
    00103   static void do_show_packages (const CmtSystem::cmt_string_vector& arguments);
    00104   static void do_show_path ();
    00105   static void do_show_pattern (const CmtSystem::cmt_string_vector& arguments);
    00106   static void do_show_pattern_names ();
    00107   static void do_show_patterns ();
    00108   static void do_show_pwd ();
    00109   static void do_show_set (const CmtSystem::cmt_string_vector& arguments,
    00110                            PrintMode& mode);
    00111   static void do_show_set_names (const CmtSystem::cmt_string_vector& arguments,
    00112                                  PrintMode& mode);
    00113   static void do_show_set_value (const CmtSystem::cmt_string_vector& arguments,
    00114                                  PrintMode& mode);
    00115   static void do_show_sets (const CmtSystem::cmt_string_vector& arguments,
    00116                             PrintMode& mode);
    00117   static void do_show_strategies ();
    00118   static void do_show_tags ();
    00119   static void do_show_uses ();
    00120   static void do_show_version ();
    00121   static void do_show_versions (const CmtSystem::cmt_string_vector& arguments);
    00122   static void do_show_system ();
    00123   static void do_unlock (const cmt_string& package,
    00124                          const cmt_string& version,
    00125                          const cmt_string& path);
    00126   static void do_version ();
    00127
    00128
    00129   static const cmt_string& filter_dir (const cmt_string& dir);
    00130
    00131   static ActionType get_action ();
    00132   static const CmtSystem::cmt_string_vector& get_cmt_path ();
    00133   static const cmt_string& get_cmt_home ();
    00134   static const cmt_string& get_cmt_user_context ();
    00135   static const cmt_string& get_current_dir ();
    00136   static const cmt_string& get_current_package ();
    00137   static AccessMode get_current_access ();
    00138   static VersionStrategy get_current_strategy ();
    00139   static const cmt_string& get_current_version ();
    00140   static const cmt_string& get_current_target ();
    00141   static bool get_debug ();
    00142   static bool get_quiet ();
    00143   static bool get_recursive ();
    00144   static ScopeType get_scope ();
    00145
    00146   static void install_cleanup_scripts ();
    00147   static void install_setup_scripts ();
    00148   static void install_test_cleanup_scripts ();
    00149   static void install_test_setup_scripts ();
    00150   static bool load (const cmt_string& path,
    00151                     const cmt_string& package,
    00152                     const cmt_string& version,
    00153                     const cmt_string& tag_name = "");
    00154   static bool need_prototypes ();
    00155   static void parse_arguments (int argc, char* argv[],
    00156                                CmtSystem::cmt_string_vector& arguments,
    00157                                cmt_string& extra_line,
    00158                                cmt_string& extra_file,
    00159                                PrintMode& mode);
    00160   static void parse_requirements (const cmt_string& file_name, Use* use);
    00161   static void parse_requirements_line (const cmt_string& line,
    00162                                        Use* use,
    00163                                        const cmt_string& file_name = "",
    00164                                        int line_number = 0);
    00165   static void parse_requirements_text (const cmt_string& text,
    00166                                        const cmt_string& file_name,
    00167                                        Use* use);
    00168   static int parser (const cmt_string& command_line);
    00169   static int parser (int argc, char* argv[]);
    00170   static void print (PrintMode mode);
    00171   static void print_clean (PrintMode mode);
    00172   static void print_context (Use& use, PrintMode mode, const cmt_string& tag);
    00173   static void print_macros (PrintMode mode, const cmt_string& pattern = "");
    00174   static void print_symbol_names (PrintMode mode, const cmt_string& pattern = "");
    00175   static void print_tabs (int tabs);
    00176   static int reach_current_package ();
    00177   static void restore_all_tags (Use* use);
    00178   static void select (const CmtSystem::cmt_string_vector& words, Use* use,
    00179                       const cmt_string& file_name,
    00180                       int line_number);
    00181   static void set_standard_macros ();
    00182   static void use_cmt ();
    00183   static void use_home_requirements ();
    00184   static void use_user_context_requirements ();
    00185   static cmt_string vector_to_string (const CmtSystem::cmt_string_vector& v);
    00186   static void vector_to_string (const CmtSystem::cmt_string_vector& v,
    00187                                 const cmt_string& separator,
    00188                                 cmt_string& result);
    00189
    00190 private:
    00191
    00193
    00194   static ActionType m_action;
    00195   static bool m_build_nmake;
    00196   static cmt_string m_cmt_config;
    00197   static CmtSystem::cmt_string_vector m_cmt_path;
    00198   static CmtSystem::cmt_string_vector m_cmt_path_pwds;
    00199   static CmtSystem::cmt_string_vector m_cmt_path_sources;
    00200   static cmt_string m_cmt_root;
    00201   static cmt_string m_cmt_home;
    00202   static cmt_string m_cmt_user_context;
    00203   static cmt_string m_cmt_site;
    00204   static cmt_string m_cmt_version;
    00205
    00206   static int m_current_build_strategy;
    00207
    00208   static cmt_string m_current_dir;
    00209   static cmt_string m_current_package;
    00210   static cmt_string m_current_config;
    00211   static cmt_string m_current_path;
    00212   static cmt_string m_current_prefix;
    00213
    00214   static AccessMode m_current_access;
    00215   static VersionStrategy m_current_strategy;
    00216   static CmtDirStyle m_current_style;
    00217
    00218   static cmt_string m_current_tag;
    00219   static cmt_string m_current_target;
    00220   static cmt_string m_current_version;
    00221
    00222   static cmt_string m_extra_tags;
    00223   static cmt_string m_configure_error;
    00224
    00225   static bool m_debug;
    00226
    00227   static cmt_string m_default_path;
    00228   static cmt_string m_filtered_text;
    00229   static bool m_quiet;
    00230   static bool m_recursive;
    00231   static ScopeType m_scope;
    00232   static bool m_simulation;
    00233   static bool m_standard_macros_done;
    00234 };
    00235
    00236 #endif