Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ArgParser Class Reference

#include <cmt_commands.h>

Collaboration diagram for ArgParser:

Collaboration graph
[legend]
List of all members.

Public Types

typedef void(ArgParser::* parser )(void)

Public Member Functions

 ArgParser (CmtContext &context)
void parse ()

Public Attributes

int argc
char ** argv
cmt_string arg
CmtSystem::cmt_string_vector arguments
cmt_string extra_line
cmt_string extra_file
PrintMode mode
ActionType help_action

Private Member Functions

void do_awk ()
void do_broadcast ()
void do_build ()
void do_check ()
void do_check_files ()
void do_checkout ()
void do_cleanup ()
void do_config ()
void do_create ()
void do_create_project ()
void do_cvsbranches ()
void do_cvssubpackages ()
void do_cvssubprojects ()
void do_cvstags ()
void do_do ()
void do_expand ()
void do_filter ()
void do_help ()
void do_lock ()
void do_remove ()
void do_run ()
void do_run_sequence ()
void do_set ()
void do_setup ()
void do_show ()
void do_system ()
void do_unlock ()
void do_version ()
void option_help ()
void option_n ()
void option_quiet ()
void option_csh ()
void option_sh ()
void option_bat ()
void option_use ()
void option_pack ()
void option_version ()
void option_path ()
void option_f ()
void option_e ()
void option_home ()
void option_tag ()
void option_tag_add ()
void option_tag_remove ()
void option_user_context ()
void option_with_version_directory ()
void option_without_version_directory ()
void option_no_cleanup ()
void option_private ()
void option_public ()
void shift ()
void unshift ()
void fill_arguments ()
cmt_stringfill_one_argument ()
cmt_stringfill_one_argument_filtered ()

Private Attributes

CmtContextcmt
cmt_vmap< cmt_string, int > parsers
cmt_vector< parserpv

Member Typedef Documentation

typedef void(ArgParser::* ArgParser::parser)(void)
 

Definition at line 16 of file cmt_commands.h.

Referenced by parse().


Constructor & Destructor Documentation

ArgParser::ArgParser CmtContext context  ) 
 

Definition at line 12 of file cmt_commands.cxx.

References cmt_vmap< cmt_string, int >::add(), arguments, cmt_vector< T >::clear(), Csh, do_awk(), do_broadcast(), do_build(), do_check(), do_check_files(), do_checkout(), do_cleanup(), do_config(), do_create(), do_create_project(), do_cvsbranches(), do_cvssubpackages(), do_cvssubprojects(), do_cvstags(), do_do(), do_expand(), do_filter(), do_help(), do_lock(), do_remove(), do_run(), do_run_sequence(), do_set(), do_setup(), do_show(), do_system(), do_unlock(), do_version(), option_bat(), option_csh(), option_e(), option_f(), option_help(), option_home(), option_n(), option_no_cleanup(), option_pack(), option_path(), option_private(), option_public(), option_quiet(), option_sh(), option_tag(), option_tag_add(), option_tag_remove(), option_use(), option_user_context(), option_version(), option_with_version_directory(), option_without_version_directory(), parsers, cmt_vector< parser >::push_back(), and pv.

00012                                          : cmt(context), argc(0), argv(0), mode(Csh)
00013 {
00014   arguments.clear ();
00015 
00016   int i = 0;
00017 
00018   parsers.add ("awk", i);
00019   pv.push_back (&ArgParser::do_awk); i++;
00020 
00021   parsers.add ("br", i);
00022   parsers.add ("bro", i);
00023   parsers.add ("broa", i);
00024   parsers.add ("broad", i);
00025   parsers.add ("broadc", i);
00026   parsers.add ("broadca", i);
00027   parsers.add ("broadcas", i);
00028   parsers.add ("broadcast", i);
00029   pv.push_back (&ArgParser::do_broadcast); i++;
00030 
00031   parsers.add ("bu", i);
00032   parsers.add ("bui", i);
00033   parsers.add ("buil", i);
00034   parsers.add ("build", i);
00035   pv.push_back (&ArgParser::do_build); i++;
00036 
00037   parsers.add ("check", i);
00038   pv.push_back (&ArgParser::do_check); i++;
00039 
00040   parsers.add ("check_f", i);
00041   parsers.add ("check_fi", i);
00042   parsers.add ("check_fil", i);
00043   parsers.add ("check_file", i);
00044   parsers.add ("check_files", i);
00045   pv.push_back (&ArgParser::do_check_files); i++;
00046 
00047   parsers.add ("co", i);
00048   parsers.add ("checkout", i);
00049   pv.push_back (&ArgParser::do_checkout); i++;
00050 
00051   parsers.add ("cl", i);
00052   parsers.add ("cle", i);
00053   parsers.add ("clea", i);
00054   parsers.add ("clean", i);
00055   parsers.add ("cleanu", i);
00056   parsers.add ("cleanup", i);
00057   pv.push_back (&ArgParser::do_cleanup); i++;
00058 
00059   parsers.add ("con", i);
00060   parsers.add ("conf", i);
00061   parsers.add ("confi", i);
00062   parsers.add ("config", i);
00063   pv.push_back (&ArgParser::do_config); i++;
00064 
00065   parsers.add ("create", i);
00066   pv.push_back (&ArgParser::do_create); i++;
00067 
00068   parsers.add ("create_project", i);
00069   pv.push_back (&ArgParser::do_create_project); i++;
00070 
00071   parsers.add ("cvsb", i);
00072   parsers.add ("cvsbr", i);
00073   parsers.add ("cvsbra", i);
00074   parsers.add ("cvsbran", i);
00075   parsers.add ("cvsbranc", i);
00076   parsers.add ("cvsbranch", i);
00077   parsers.add ("cvsbranche", i);
00078   parsers.add ("cvsbranches", i);
00079   pv.push_back (&ArgParser::do_cvsbranches); i++;
00080 
00081   parsers.add ("cvssubpa", i);
00082   parsers.add ("cvssubpac", i);
00083   parsers.add ("cvssubpack", i);
00084   parsers.add ("cvssubpacka", i);
00085   parsers.add ("cvssubpackag", i);
00086   parsers.add ("cvssubpackage", i);
00087   parsers.add ("cvssubpackages", i);
00088   pv.push_back (&ArgParser::do_cvssubpackages); i++;
00089 
00090   parsers.add ("cvssubpr", i);
00091   parsers.add ("cvssubpro", i);
00092   parsers.add ("cvssubproj", i);
00093   parsers.add ("cvssubproje", i);
00094   parsers.add ("cvssubprojec", i);
00095   parsers.add ("cvssubproject", i);
00096   parsers.add ("cvssubprojects", i);
00097   pv.push_back (&ArgParser::do_cvssubprojects); i++;
00098 
00099   parsers.add ("cvst", i);
00100   parsers.add ("cvsta", i);
00101   parsers.add ("cvstag", i);
00102   parsers.add ("cvstags", i);
00103   pv.push_back (&ArgParser::do_cvstags); i++;
00104 
00105   parsers.add ("d", i);
00106   parsers.add ("do", i);
00107   pv.push_back (&ArgParser::do_do); i++;
00108 
00109   parsers.add ("e", i);
00110   parsers.add ("ex", i);
00111   parsers.add ("exp", i);
00112   parsers.add ("expa", i);
00113   parsers.add ("expan", i);
00114   parsers.add ("expand", i);
00115   pv.push_back (&ArgParser::do_expand); i++;
00116 
00117   parsers.add ("f", i);
00118   parsers.add ("fi", i);
00119   parsers.add ("fil", i);
00120   parsers.add ("filt", i);
00121   parsers.add ("filte", i);
00122   parsers.add ("filter", i);
00123   pv.push_back (&ArgParser::do_filter); i++;
00124 
00125   parsers.add ("h", i);
00126   parsers.add ("he", i);
00127   parsers.add ("hel", i);
00128   parsers.add ("help", i);
00129   pv.push_back (&ArgParser::do_help); i++;
00130 
00131   parsers.add ("l", i);
00132   parsers.add ("lo", i);
00133   parsers.add ("loc", i);
00134   parsers.add ("lock", i);
00135   pv.push_back (&ArgParser::do_lock); i++;
00136 
00137   parsers.add ("re", i);
00138   parsers.add ("rem", i);
00139   parsers.add ("remo", i);
00140   parsers.add ("remov", i);
00141   parsers.add ("remove", i);
00142   pv.push_back (&ArgParser::do_remove); i++;
00143 
00144   parsers.add ("run", i);
00145   pv.push_back (&ArgParser::do_run); i++;
00146 
00147   parsers.add ("run_sequence", i);
00148   pv.push_back (&ArgParser::do_run_sequence); i++;
00149 
00150   parsers.add ("set", i);
00151   pv.push_back (&ArgParser::do_set); i++;
00152 
00153   parsers.add ("setup", i);
00154   pv.push_back (&ArgParser::do_setup); i++;
00155 
00156   parsers.add ("sh", i);
00157   parsers.add ("sho", i);
00158   parsers.add ("show", i);
00159   pv.push_back (&ArgParser::do_show); i++;
00160 
00161   parsers.add ("sy", i);
00162   parsers.add ("sys", i);
00163   parsers.add ("syst", i);
00164   parsers.add ("syste", i);
00165   parsers.add ("system", i);
00166   pv.push_back (&ArgParser::do_system); i++;
00167 
00168   parsers.add ("u", i);
00169   parsers.add ("un", i);
00170   parsers.add ("unl", i);
00171   parsers.add ("unlo", i);
00172   parsers.add ("unloc", i);
00173   parsers.add ("unlock", i);
00174   pv.push_back (&ArgParser::do_unlock); i++;
00175 
00176   parsers.add ("v", i);
00177   parsers.add ("ve", i);
00178   parsers.add ("ver", i);
00179   parsers.add ("vers", i);
00180   parsers.add ("versi", i);
00181   parsers.add ("versio", i);
00182   parsers.add ("version", i);
00183   parsers.add ("--version", i);
00184   pv.push_back (&ArgParser::do_version); i++;
00185 
00186   parsers.add ("-b", i);
00187   parsers.add ("-ba", i);
00188   parsers.add ("-bat", i);
00189   pv.push_back (&ArgParser::option_bat); i++;
00190 
00191   parsers.add ("-c", i);
00192   parsers.add ("-cs", i);
00193   parsers.add ("-csh", i);
00194   pv.push_back (&ArgParser::option_csh); i++;
00195 
00196   parsers.add ("-e", i);
00197   pv.push_back (&ArgParser::option_e); i++;
00198 
00199   parsers.add ("-f", i);
00200   pv.push_back (&ArgParser::option_f); i++;
00201 
00202   parsers.add ("-h", i);
00203   parsers.add ("-he", i);
00204   parsers.add ("-hel", i);
00205   parsers.add ("-help", i);
00206   parsers.add ("--h", i);
00207   parsers.add ("--he", i);
00208   parsers.add ("--hel", i);
00209   parsers.add ("--help", i);
00210   pv.push_back (&ArgParser::option_help); i++;
00211 
00212   parsers.add ("-ho", i);
00213   parsers.add ("-hom", i);
00214   parsers.add ("-home", i);
00215   pv.push_back (&ArgParser::option_home); i++;
00216 
00217   parsers.add ("-n", i);
00218   pv.push_back (&ArgParser::option_n); i++;
00219 
00220   parsers.add ("-no_c", i);
00221   parsers.add ("-no_cl", i);
00222   parsers.add ("-no_cle", i);
00223   parsers.add ("-no_clea", i);
00224   parsers.add ("-no_clean", i);
00225   parsers.add ("-no_cleanu", i);
00226   parsers.add ("-no_cleanup", i);
00227   pv.push_back (&ArgParser::option_no_cleanup); i++;
00228 
00229   parsers.add ("-pac", i);
00230   parsers.add ("-pack", i);
00231   pv.push_back (&ArgParser::option_pack); i++;
00232 
00233   parsers.add ("-pat", i);
00234   parsers.add ("-path", i);
00235   pv.push_back (&ArgParser::option_path); i++;
00236 
00237   parsers.add ("-pr", i);
00238   parsers.add ("-pri", i);
00239   parsers.add ("-priv", i);
00240   parsers.add ("-priva", i);
00241   parsers.add ("-privat", i);
00242   parsers.add ("-private", i);
00243   pv.push_back (&ArgParser::option_private); i++;
00244 
00245   parsers.add ("-pu", i);
00246   parsers.add ("-pub", i);
00247   parsers.add ("-publ", i);
00248   parsers.add ("-publi", i);
00249   parsers.add ("-public", i);
00250   pv.push_back (&ArgParser::option_public); i++;
00251 
00252   parsers.add ("-s", i);
00253   parsers.add ("-sh", i);
00254   pv.push_back (&ArgParser::option_sh); i++;
00255 
00256   parsers.add ("-q", i);
00257   parsers.add ("-qu", i);
00258   parsers.add ("-qui", i);
00259   parsers.add ("-quie", i);
00260   parsers.add ("-quiet", i);
00261   pv.push_back (&ArgParser::option_quiet); i++;
00262 
00263   parsers.add ("-tag", i);
00264   pv.push_back (&ArgParser::option_tag); i++;
00265 
00266   parsers.add ("-tag_add", i);
00267   pv.push_back (&ArgParser::option_tag_add); i++;
00268 
00269   parsers.add ("-tag_remove", i);
00270   pv.push_back (&ArgParser::option_tag_remove); i++;
00271 
00272   parsers.add ("-u", i);
00273   parsers.add ("-us", i);
00274   parsers.add ("-use", i);
00275   pv.push_back (&ArgParser::option_use); i++;
00276 
00277   parsers.add ("-user", i);
00278   parsers.add ("-user_", i);
00279   parsers.add ("-user_c", i);
00280   parsers.add ("-user_co", i);
00281   parsers.add ("-user_con", i);
00282   parsers.add ("-user_cont", i);
00283   parsers.add ("-user_conte", i);
00284   parsers.add ("-user_contex", i);
00285   parsers.add ("-user_context", i);
00286   pv.push_back (&ArgParser::option_user_context); i++;
00287 
00288   parsers.add ("-v", i);
00289   parsers.add ("-ve", i);
00290   parsers.add ("-ver", i);
00291   parsers.add ("-vers", i);
00292   parsers.add ("-versi", i);
00293   parsers.add ("-versio", i);
00294   parsers.add ("-version", i);
00295   pv.push_back (&ArgParser::option_version); i++;
00296 
00297   parsers.add ("-with_v", i);
00298   parsers.add ("-with_ve", i);
00299   parsers.add ("-with_ver", i);
00300   parsers.add ("-with_vers", i);
00301   parsers.add ("-with_versi", i);
00302   parsers.add ("-with_versio", i);
00303   parsers.add ("-with_version", i);
00304   parsers.add ("-with_version_", i);
00305   parsers.add ("-with_version_d", i);
00306   parsers.add ("-with_version_di", i);
00307   parsers.add ("-with_version_dir", i);
00308   parsers.add ("-with_version_dire", i);
00309   parsers.add ("-with_version_direc", i);
00310   parsers.add ("-with_version_direct", i);
00311   parsers.add ("-with_version_directo", i);
00312   parsers.add ("-with_version_director", i);
00313   parsers.add ("-with_version_directory", i);
00314   pv.push_back (&ArgParser::option_with_version_directory); i++;
00315 
00316   parsers.add ("-without_v", i);
00317   parsers.add ("-without_ve", i);
00318   parsers.add ("-without_ver", i);
00319   parsers.add ("-without_vers", i);
00320   parsers.add ("-without_versi", i);
00321   parsers.add ("-without_versio", i);
00322   parsers.add ("-without_version", i);
00323   parsers.add ("-without_version_", i);
00324   parsers.add ("-without_version_d", i);
00325   parsers.add ("-without_version_di", i);
00326   parsers.add ("-without_version_dir", i);
00327   parsers.add ("-without_version_dire", i);
00328   parsers.add ("-without_version_direc", i);
00329   parsers.add ("-without_version_direct", i);
00330   parsers.add ("-without_version_directo", i);
00331   parsers.add ("-without_version_director", i);
00332   parsers.add ("-without_version_directory", i);
00333   pv.push_back (&ArgParser::option_without_version_directory); i++;
00334 
00335 }


Member Function Documentation

void ArgParser::do_awk  )  [private]
 

Definition at line 489 of file cmt_commands.cxx.

References action_awk, cmt, fill_arguments(), and CmtContext::m_action.

Referenced by ArgParser().

00490 {
00491   fill_arguments ();
00492   cmt.m_action = action_awk;
00493 }

void ArgParser::do_broadcast  )  [private]
 

Definition at line 495 of file cmt_commands.cxx.

References action_broadcast, cmt, default_filtering_mode, fill_arguments(), CmtContext::m_action, CmtContext::m_scope_filtering_mode, and reach_private_uses.

Referenced by ArgParser().

00496 {
00497   fill_arguments ();
00498   cmt.m_action = action_broadcast;
00499   
00500   if (cmt.m_scope_filtering_mode == default_filtering_mode)
00501     {
00502       cmt.m_scope_filtering_mode = reach_private_uses;
00503     }
00504 }

void ArgParser::do_build  )  [private]
 

Definition at line 506 of file cmt_commands.cxx.

References action_build, action_build_CMT_pacman, action_build_constituent_makefile, action_build_constituents_makefile, action_build_dependencies, action_build_library_links, action_build_make_setup, action_build_msdev, action_build_os9_makefile, action_build_prototype, action_build_readme, action_build_tag_makefile, action_build_temporary_name, action_build_triggers, action_build_vsnet, action_build_windefs, action_help, arg, argc, argv, cmt, fill_arguments(), fill_one_argument(), fill_one_argument_filtered(), help_action, CmtContext::m_action, CmtContext::m_build_nmake, CmtContext::m_quiet, and shift().

Referenced by ArgParser().

00507 {
00508   if (argc > 0)
00509     {
00510       arg = argv[0];
00511 
00512       if (arg == "-nmake")
00513         {
00514           cmt.m_build_nmake = true;
00515           shift ();
00516         }
00517     }
00518 
00519   if (argc > 0)
00520     {
00521       arg = argv[0];
00522 
00523       shift ();
00524 
00525       if (arg == "constituent_makefile")
00526         {
00527           if (argc > 0)
00528             {
00529               fill_one_argument ();
00530               cmt.m_action = action_build_constituent_makefile;
00531             }
00532           else
00533             {
00534               if (!cmt.m_quiet) cerr << "#CMT> syntax error : constituent name missing" << endl;
00535               cmt.m_action = action_build_constituent_makefile;
00536               help_action = action_help;
00537             }
00538         }
00539       else if (arg == "constituents_makefile")
00540         {
00541           fill_arguments ();
00542           cmt.m_action = action_build_constituents_makefile;
00543         }
00544       else if (arg == "dependencies")
00545         {
00546           if (argc > 0)
00547             {
00548               fill_arguments ();
00549               cmt.m_action = action_build_dependencies;
00550             }
00551           else
00552             {
00553               if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing " << endl;
00554               help_action = action_help;
00555               cmt.m_action = action_build_dependencies;
00556             }
00557         }
00558       else if (arg == "library_links")
00559         {
00560           cmt.m_action = action_build_library_links;
00561         }
00562       else if (arg == "make_setup")
00563         {
00564           cmt.m_action = action_build_make_setup;
00565         }
00566       else if (arg == "msdev")
00567         {
00568           if (argc > 0)
00569             {
00570               fill_one_argument_filtered ();
00571             }
00572 
00573           cmt.m_action = action_build_msdev;
00574         }
00575       else if (arg == "CMT_pacman")
00576         {
00577           cmt.m_action = action_build_CMT_pacman;
00578         }
00579       else if (arg == "vsnet") 
00580         {
00581           if (argc > 0)
00582             {
00583               fill_one_argument_filtered ();
00584             }
00585                                                                     
00586           cmt.m_action = action_build_vsnet;                 
00587         }                                              
00588       else if (arg == "os9_makefile")
00589         {
00590           if (argc > 0)
00591             {
00592               fill_one_argument ();
00593               cmt.m_action = action_build_os9_makefile;
00594             }
00595           else
00596             {
00597               if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing " << endl;
00598               help_action = action_help;
00599               cmt.m_action = action_build_os9_makefile;
00600             }
00601         }
00602       else if (arg == "prototype")
00603         {
00604           if (argc > 0)
00605             {
00606               fill_one_argument ();
00607               cmt.m_action = action_build_prototype;
00608             }
00609           else
00610             {
00611               if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing" << endl;
00612               help_action = action_help;
00613               cmt.m_action = action_build_prototype;
00614             }
00615         }
00616       else if (arg == "readme")
00617         {
00618           cmt.m_action = action_build_readme;
00619 
00620           fill_arguments ();
00621         }
00622       else if (arg == "tag_makefile")
00623         {
00624           cmt.m_action = action_build_tag_makefile;
00625         }
00626       else if (arg == "temporary_name")
00627         {
00628           cmt.m_action = action_build_temporary_name;
00629         }
00630       else if (arg == "triggers")
00631         {
00632           if (argc > 0)
00633             {
00634               fill_one_argument ();
00635               cmt.m_action = action_build_triggers;
00636             }
00637           else
00638             {
00639               if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing" << endl;
00640               help_action = action_help;
00641               cmt.m_action = action_build_triggers;
00642             }
00643         }
00644       else if (arg == "windefs")
00645         {
00646           if (argc > 0)
00647             {
00648               fill_one_argument ();
00649               cmt.m_action = action_build_windefs;
00650             }
00651           else
00652             {
00653               if (!cmt.m_quiet) cerr << "#CMT> syntax error : arguments missing" << endl;
00654               help_action = action_help;
00655               cmt.m_action = action_build_windefs;
00656             }
00657         }
00658       else
00659         {
00660           if (!cmt.m_quiet) cerr << "#CMT> syntax error : wrong build argument" << endl;
00661           help_action = action_help;
00662           cmt.m_action = action_build;
00663         }
00664     }
00665   else
00666     {
00667       if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to build" << endl;
00668       help_action = action_help;
00669       cmt.m_action = action_build;
00670     }
00671 }

void ArgParser::do_check  )  [private]
 

Definition at line 673 of file cmt_commands.cxx.

References action_check, action_check_configuration, action_check_files, action_check_version, action_help, arg, argc, argv, cmt, fill_one_argument(), help_action, CmtContext::m_action, CmtContext::m_quiet, and shift().

Referenced by ArgParser().

00674 {
00675   if (argc > 0)
00676     {
00677       arg = argv[0];
00678 
00679       shift ();
00680 
00681       if (arg == "configuration")
00682         {
00683           cmt.m_action = action_check_configuration;
00684         }
00685       else if (arg == "files")
00686         {
00687           if (argc > 0)
00688             {
00689               fill_one_argument ();
00690               if (argc > 0)
00691                 {
00692                   fill_one_argument ();
00693                   cmt.m_action = action_check_files;
00694                 }
00695               else
00696                 {
00697                   if (!cmt.m_quiet) cerr << "#CMT> syntax error : reference file name missing" 
00698                                          << endl;
00699                   help_action = action_help;
00700                   cmt.m_action = action_check_files;
00701                 }
00702             }
00703           else
00704             {
00705               if (!cmt.m_quiet) cerr << "#CMT> syntax error : file name missing" << endl;
00706               help_action = action_help;
00707               cmt.m_action = action_check_files;
00708             }
00709         }
00710       else if (arg == "version")
00711         {
00712           if (argc > 0)
00713             {
00714               fill_one_argument ();
00715               cmt.m_action = action_check_version;
00716             }
00717           else
00718             {
00719               if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
00720               help_action = action_help;
00721               cmt.m_action = action_check_version;
00722             }
00723         }
00724       else
00725         {
00726           if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad check option" << endl;
00727           help_action = action_help;
00728           cmt.m_action = action_check;
00729         }
00730     }
00731   else
00732     {
00733       if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to check" << endl;
00734       help_action = action_help;
00735       cmt.m_action = action_check;
00736     }
00737 }

void ArgParser::do_check_files  )  [private]
 

Definition at line 739 of file cmt_commands.cxx.

References action_check_files, action_help, argc, cmt, fill_one_argument(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

00740 {
00741   if (argc > 0)
00742     {
00743       fill_one_argument ();
00744       if (argc > 0)
00745         {
00746           fill_one_argument ();
00747           cmt.m_action = action_check_files;
00748         }
00749       else
00750         {
00751           if (!cmt.m_quiet) cerr << "#CMT> syntax error : reference file missing" << endl;
00752           help_action = action_help;
00753           cmt.m_action = action_check_files;
00754         }
00755     }
00756   else
00757     {
00758       if (!cmt.m_quiet) cerr << "#CMT> syntax error : file name missing" << endl;
00759       help_action = action_help;
00760       cmt.m_action = action_check_files;
00761     }
00762 }

void ArgParser::do_checkout  )  [private]
 

Definition at line 764 of file cmt_commands.cxx.

References action_checkout, action_help, argc, cmt, fill_arguments(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

00765 {
00766   if (argc > 0)
00767     {
00768       fill_arguments ();
00769       cmt.m_action = action_checkout;
00770     }
00771   else
00772     {
00773       if (!cmt.m_quiet) cerr << "#CMT> syntax error : checkout arguments missing" << endl;
00774       help_action = action_help;
00775       cmt.m_action = action_checkout;
00776     }
00777 }

void ArgParser::do_cleanup  )  [private]
 

Definition at line 779 of file cmt_commands.cxx.

References action_cleanup, cmt, and CmtContext::m_action.

Referenced by ArgParser().

00780 {
00781   cmt.m_action = action_cleanup;
00782 }

void ArgParser::do_config  )  [private]
 

Definition at line 784 of file cmt_commands.cxx.

References action_config, cmt, and CmtContext::m_action.

Referenced by ArgParser().

00785 {
00786   cmt.m_action = action_config;
00787 }

void ArgParser::do_create  )  [private]
 

Definition at line 789 of file cmt_commands.cxx.

References action_create, action_help, argc, cmt, fill_arguments(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

00790 {
00791   if (argc > 0)
00792     {
00793       fill_arguments ();
00794       cmt.m_action = action_create;
00795     }
00796   else
00797     {
00798       if (!cmt.m_quiet) cerr << "#CMT> syntax error : create arguments missing" << endl;
00799       help_action = action_help;
00800       cmt.m_action = action_create;
00801     }
00802 }

void ArgParser::do_create_project  )  [private]
 

Definition at line 804 of file cmt_commands.cxx.

References action_create_project, action_help, argc, cmt, fill_arguments(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

00805 {
00806   if (argc > 0)
00807     {
00808       fill_arguments ();
00809       cmt.m_action = action_create_project;
00810     }
00811   else
00812     {
00813       if (!cmt.m_quiet) cerr << "#CMT> syntax error : create_project arguments missing" << endl;
00814       help_action = action_help;
00815       cmt.m_action = action_create_project;
00816     }
00817 }

void ArgParser::do_cvsbranches  )  [private]
 

Definition at line 819 of file cmt_commands.cxx.

References action_cvsbranches, action_help, argc, cmt, fill_one_argument(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

00820 {
00821   if (argc > 0)
00822     {
00823       fill_one_argument ();
00824       cmt.m_action = action_cvsbranches;
00825     }
00826   else
00827     {
00828       if (!cmt.m_quiet) cerr << "#CMT> syntax error : cvsbranches arguments missing" << endl;
00829       help_action = action_help;
00830       cmt.m_action = action_cvsbranches;
00831     }
00832 }

void ArgParser::do_cvssubpackages  )  [private]
 

Definition at line 834 of file cmt_commands.cxx.

References action_cvssubpackages, argc, cmt, fill_one_argument(), and CmtContext::m_action.

Referenced by ArgParser().

00835 {
00836   if (argc > 0)
00837     {
00838       fill_one_argument ();
00839     }
00840 
00841   cmt.m_action = action_cvssubpackages;
00842 }

void ArgParser::do_cvssubprojects  )  [private]
 

Definition at line 844 of file cmt_commands.cxx.

References action_cvssubprojects, argc, cmt, fill_one_argument(), and CmtContext::m_action.

Referenced by ArgParser().

00845 {
00846   if (argc > 0)
00847     {
00848       fill_one_argument ();
00849     }
00850 
00851   cmt.m_action = action_cvssubprojects;
00852 }

void ArgParser::do_cvstags  )  [private]
 

Definition at line 854 of file cmt_commands.cxx.

References action_cvstags, action_help, argc, cmt, fill_arguments(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

00855 {
00856   if (argc > 0)
00857     {
00858       fill_arguments ();
00859       cmt.m_action = action_cvstags;
00860     }
00861   else
00862     {
00863       if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
00864       help_action = action_help;
00865       cmt.m_action = action_cvstags;
00866     }
00867 }

void ArgParser::do_do  )  [private]
 

Definition at line 869 of file cmt_commands.cxx.

References action_do, action_help, Tag::add(), argc, arguments, cmt, fill_arguments(), help_action, CmtContext::m_action, CmtContext::m_quiet, Tag::mark(), and PriorityUserTag.

Referenced by ArgParser(), and parse().

00870 {
00871   if (argc > 0)
00872     {
00873       fill_arguments ();
00874                   
00875       {
00876         cmt_string tag_name = "target_";
00877         tag_name += arguments[0];
00878 
00879         Tag* tag;
00880         tag = Tag::add (tag_name, PriorityUserTag, "action", 0);                      
00881         tag->mark ();
00882       }
00883 
00884       cmt.m_action = action_do;
00885     }
00886   else
00887     {
00888       if (!cmt.m_quiet) cerr << "#CMT> syntax error : action not specified" << endl;
00889       help_action = action_help;
00890       cmt.m_action = action_do;
00891     }
00892 }

void ArgParser::do_expand  )  [private]
 

Definition at line 894 of file cmt_commands.cxx.

References action_expand_model, action_help, arg, argc, argv, cmt, fill_arguments(), help_action, CmtContext::m_action, CmtContext::m_quiet, and shift().

Referenced by ArgParser().

00895 {
00896   if (argc > 0)
00897     {
00898       arg = argv[0];
00899 
00900       shift ();
00901       if (arg == "model")
00902         {
00903           if (argc > 0)
00904             {
00905               fill_arguments ();
00906               cmt.m_action = action_expand_model;
00907             }
00908           else
00909             {
00910               if (!cmt.m_quiet) cerr << "#CMT> syntax error : model not specified" << endl;
00911               help_action = action_help;
00912               cmt.m_action = action_expand_model;
00913             }
00914         }
00915       else
00916         {
00917           if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad expand option" << endl;
00918           help_action = action_help;
00919           cmt.m_action = action_expand_model;
00920         }
00921     }
00922   else
00923     {
00924       if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to expand" << endl;
00925       help_action = action_help;
00926       cmt.m_action = action_expand_model;
00927     }
00928 }

void ArgParser::do_filter  )  [private]
 

Definition at line 930 of file cmt_commands.cxx.

References action_filter, action_help, argc, cmt, fill_arguments(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

00931 {
00932   if (argc > 0)
00933     {
00934       fill_arguments ();
00935       cmt.m_action = action_filter;
00936     }
00937   else
00938     {
00939       if (!cmt.m_quiet) cerr << "#CMT> syntax error : file to filter not specified" << endl;
00940       help_action = action_help;
00941       cmt.m_action = action_filter;
00942     }
00943 }

void ArgParser::do_help  )  [private]
 

Definition at line 945 of file cmt_commands.cxx.

References action_help, and help_action.

Referenced by ArgParser().

00946 {
00947   help_action = action_help;
00948 }

void ArgParser::do_lock  )  [private]
 

Definition at line 950 of file cmt_commands.cxx.

References action_help, action_lock, argc, cmt, Use::current(), cmt_string::erase(), fill_one_argument(), fill_one_argument_filtered(), help_action, CmtContext::m_action, CmtContext::m_current_access, CmtContext::m_current_package, CmtContext::m_current_path, CmtContext::m_current_version, CmtContext::m_quiet, and UserMode.

Referenced by ArgParser().

00951 {
00952   if (argc > 0)
00953     {
00954       cmt.m_current_package = fill_one_argument ();
00955       cmt.m_current_version.erase (0);
00956       cmt.m_current_path.erase (0);
00957 
00958       if (argc > 0)
00959         {
00960           cmt.m_current_version = fill_one_argument ();
00961           cmt.m_action = action_lock;
00962 
00963           if (argc > 0)
00964             {
00965               cmt.m_current_path = fill_one_argument_filtered ();
00966             }
00967 
00968           cmt.m_current_access = UserMode;
00969           (Use::current()).set (cmt.m_current_package, 
00970                                 cmt.m_current_version, 
00971                                 cmt.m_current_path);
00972 
00973         }
00974       else
00975         {
00976           if (!cmt.m_quiet) cerr << "#CMT> syntax error : version missing" << endl;
00977           help_action = action_help;
00978           cmt.m_action = action_lock;
00979         }
00980     }
00981   else
00982     {
00983       cmt.m_action = action_lock;
00984     }
00985 }

void ArgParser::do_remove  )  [private]
 

Definition at line 987 of file cmt_commands.cxx.

References action_help, action_remove, action_remove_library_links, arg, argc, argv, cmt, cmt_string::erase(), fill_one_argument(), fill_one_argument_filtered(), help_action, CmtContext::m_action, CmtContext::m_current_package, CmtContext::m_current_path, CmtContext::m_current_version, CmtContext::m_quiet, and shift().

Referenced by ArgParser().

00988 {
00989   if (argc > 0)
00990     {
00991       arg = argv[0];
00992 
00993       if (arg == "library_links")
00994         {
00995           shift ();
00996           cmt.m_action = action_remove_library_links;
00997         }
00998       else
00999         {
01000           cmt.m_current_package = fill_one_argument ();
01001           cmt.m_current_version.erase (0);
01002           cmt.m_current_path.erase (0);
01003                       
01004           if (argc > 0)
01005             {
01006               cmt.m_current_version = fill_one_argument ();
01007 
01008               if (argc > 0)
01009                 {
01010                   cmt.m_current_path = fill_one_argument_filtered ();
01011                 }
01012                             
01013               cmt.m_action = action_remove;
01014             }
01015           else
01016             {
01017               if (!cmt.m_quiet) cerr << "#CMT> syntax error : version missing" << endl;
01018               help_action = action_help;
01019               cmt.m_action = action_remove;
01020             }
01021         }
01022     }
01023   else
01024     {
01025       if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to remove" << endl;
01026       help_action = action_help;
01027       cmt.m_action = action_remove;
01028     }
01029 }

void ArgParser::do_run  )  [private]
 

Definition at line 1031 of file cmt_commands.cxx.

References action_help, action_run, argc, cmt, fill_arguments(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

01032 {
01033   if (argc > 0)
01034     {
01035       fill_arguments ();
01036       cmt.m_action = action_run;
01037     }
01038   else
01039     {
01040       if (!cmt.m_quiet) cerr << "#CMT> syntax error : run arguments missing" << endl;
01041       help_action = action_help;
01042       cmt.m_action = action_run;
01043     }
01044 }

void ArgParser::do_run_sequence  )  [private]
 

Definition at line 1046 of file cmt_commands.cxx.

References action_help, action_run_sequence, argc, cmt, fill_one_argument(), help_action, CmtContext::m_action, and CmtContext::m_quiet.

Referenced by ArgParser().

01047 {
01048   if (argc > 0)
01049     {
01050       fill_one_argument ();
01051       cmt.m_action = action_run_sequence;
01052     }
01053   else
01054     {
01055       if (!cmt.m_quiet) cerr << "#CMT> syntax error : run_sequence arguments missing" << endl;
01056       help_action = action_help;
01057       cmt.m_action = action_run_sequence;
01058     }
01059 }

void ArgParser::do_set  )  [private]
 

Definition at line 1061 of file cmt_commands.cxx.

References action_help, action_set_version, action_set_versions, arg, argc, argv, cmt, default_filtering_mode, fill_arguments(), help_action, CmtContext::m_action, CmtContext::m_quiet, CmtContext::m_scope_filtering_mode, reach_private_uses, and shift().

Referenced by ArgParser().

01062 {
01063   if (argc > 0)
01064     {
01065       arg = argv[0];
01066 
01067       shift ();
01068 
01069       if (arg == "version")
01070         {
01071           fill_arguments ();
01072           cmt.m_action = action_set_version;
01073         }
01074       else if (arg == "versions")
01075         {
01076           fill_arguments ();
01077 
01078           cmt.m_action = action_set_versions;
01079 
01080           if (cmt.m_scope_filtering_mode == default_filtering_mode)
01081             {
01082               cmt.m_scope_filtering_mode = reach_private_uses;
01083             }
01084         }
01085       else
01086         {
01087           if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad set argument" << endl;
01088           help_action = action_help;
01089           //cmt.m_action = action_set;
01090         }
01091     }
01092   else
01093     {
01094       if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to set" << endl;
01095       help_action = action_help;
01096       //cmt.m_action = action_set;
01097     }
01098 }

void ArgParser::do_setup  )  [private]
 

Definition at line 1100 of file cmt_commands.cxx.

References action_setup, cmt, and CmtContext::m_action.

Referenced by ArgParser().

01101 {
01102   cmt.m_action = action_setup;
01103 }

void ArgParser::do_show  )  [private]
 

Definition at line 1105 of file cmt_commands.cxx.

References action_help, action_show, action_show_action, action_show_action_names, action_show_action_value, action_show_actions, action_show_all_tags, action_show_applied_patterns, action_show_author, action_show_branches, action_show_clients, action_show_cmtpath_patterns, action_show_constituent, action_show_constituent_names, action_show_constituents, action_show_cycles, action_show_fragment, action_show_fragments, action_show_groups, action_show_include_dirs, action_show_language, action_show_languages, action_show_macro, action_show_macro_names, action_show_macro_value, action_show_macros, action_show_manager, action_show_packages, action_show_path, action_show_pattern, action_show_pattern_names, action_show_patterns, action_show_projects, action_show_pwd, action_show_set, action_show_set_names, action_show_set_value, action_show_sets, action_show_setup, action_show_strategies, action_show_tags, action_show_use_paths, action_show_uses, action_show_version, action_show_versions, cmt_vector< T >::add(), arg, argc, arguments, argv, cmt, default_filtering_mode, fill_one_argument(), help_action, CmtContext::m_action, CmtContext::m_current_target, CmtContext::m_quiet, CmtContext::m_scope_filtering_mode, reach_private_uses, and shift().

Referenced by ArgParser().

01106 {
01107   if (argc > 0)
01108     {
01109       arg = argv[0];
01110 
01111       //cerr << "Running show arg=" << arg << endl;
01112 
01113       shift ();
01114 
01115       if (arg == "action")
01116         {
01117           if (argc > 0)
01118             {
01119               cmt.m_current_target = fill_one_argument ();
01120               cmt.m_action = action_show_action;
01121             }
01122           else
01123             {
01124               if (!cmt.m_quiet) cerr << "#CMT> syntax error : action name missing" << endl;
01125               help_action = action_help;
01126               cmt.m_action = action_show_action;
01127             }
01128         }
01129       else if (arg == "action_names")
01130         {
01131           if (argc > 0)
01132             {
01133               fill_one_argument ();
01134             }
01135 
01136           cmt.m_action = action_show_action_names;
01137         }
01138       else if (arg == "action_value")
01139         {
01140           cmt.m_quiet = true;
01141           if (argc > 0)
01142             {
01143               cmt.m_current_target = fill_one_argument ();
01144               cmt.m_action = action_show_action_value;
01145             }
01146           else
01147             {
01148               if (!cmt.m_quiet) cerr << "#CMT> syntax error : action name missing" << endl;
01149               help_action = action_help;
01150               cmt.m_action = action_show_action_value;
01151             }
01152         }
01153       else if (arg == "actions")
01154         {
01155           if (argc > 0)
01156             {
01157               fill_one_argument ();
01158             }
01159 
01160           cmt.m_action = action_show_actions;
01161         }
01162       else if (arg == "all_tags")
01163         {
01164           cmt.m_action = action_show_all_tags;
01165         }
01166       else if (arg == "applied_patterns")
01167         {
01168           cmt.m_action = action_show_applied_patterns;
01169         }
01170       else if (arg == "author")
01171         {
01172           cmt.m_action = action_show_author;
01173         }
01174       else if (arg == "branches")
01175         {
01176           cmt.m_action = action_show_branches;
01177         }
01178       else if (arg == "clients")
01179         {
01180           if (argc > 0)
01181             {
01182               cmt.m_current_target = fill_one_argument ();
01183 
01184               cmt.m_action = action_show_clients;
01185 
01186               if (argc > 0)
01187                 {
01188                   fill_one_argument ();
01189                   if (argc > 0)
01190                     {
01191                       fill_one_argument ();
01192                     }
01193                 }
01194             }
01195           else
01196             {
01197               if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
01198               help_action = action_help;
01199               cmt.m_action = action_show_clients;
01200             }
01201         }
01202       else if (arg == "cmtpath_patterns")
01203         {
01204           cmt.m_action = action_show_cmtpath_patterns;
01205         }
01206       else if (arg == "constituent")
01207         {
01208           if (argc > 0)
01209             {
01210               cmt.m_current_target = fill_one_argument ();
01211               cmt.m_action = action_show_constituent;
01212             }
01213           else
01214             {
01215               if (!cmt.m_quiet) cerr << "#CMT> syntax error : constituent name missing" << endl;
01216               help_action = action_help;
01217               cmt.m_action = action_show_constituent;
01218             }
01219         }
01220       else if (arg == "constituent_names")
01221         {
01222           cmt.m_action = action_show_constituent_names;
01223         }
01224       else if (arg == "constituents")
01225         {
01226           cmt.m_action = action_show_constituents;
01227         }
01228       else if (arg == "cycles")
01229         {
01230           cmt.m_action = action_show_cycles;
01231         }
01232       else if (arg == "fragment")
01233         {
01234           if (argc > 0)
01235             {
01236               cmt.m_current_target = fill_one_argument ();
01237               cmt.m_action = action_show_fragment;
01238             }
01239           else
01240             {
01241               if (!cmt.m_quiet) cerr << "#CMT> syntax error : fragment name missing" << endl;
01242               help_action = action_help;
01243               cmt.m_action = action_show_fragment;
01244             }
01245         }
01246       else if (arg == "fragments")
01247         {
01248           cmt.m_action = action_show_fragments;
01249         }
01250       else if (arg == "groups")
01251         {
01252           cmt.m_action = action_show_groups;
01253         }
01254       else if (arg == "include_dirs")
01255         {
01256           cmt.m_action = action_show_include_dirs;
01257         }
01258       else if (arg == "language")
01259         {
01260           if (argc > 0)
01261             {
01262               cmt.m_current_target = fill_one_argument ();
01263               cmt.m_action = action_show_language;
01264             }
01265           else
01266             {
01267               if (!cmt.m_quiet) cerr << "#CMT> syntax error : language name missing" << endl;
01268               help_action = action_help;
01269               cmt.m_action = action_show_language;
01270             }
01271         }
01272       else if (arg == "languages")
01273         {
01274           cmt.m_action = action_show_languages;
01275         }
01276       else if (arg == "macro")
01277         {
01278           if (argc > 0)
01279             {
01280               cmt.m_current_target = fill_one_argument ();
01281               cmt.m_action = action_show_macro;
01282             }
01283           else
01284             {
01285               if (!cmt.m_quiet) cerr << "#CMT> syntax error : macro name missing" << endl;
01286               help_action = action_help;
01287               cmt.m_action = action_show_macro;
01288             }
01289         }
01290       else if (arg == "macro_names")
01291         {
01292           if (argc > 0)
01293             {
01294               fill_one_argument ();
01295             }
01296 
01297           cmt.m_action = action_show_macro_names;
01298         }
01299       else if (arg == "macro_value")
01300         {
01301           cmt.m_quiet = true;
01302           if (argc > 0)
01303             {
01304               cmt.m_current_target = fill_one_argument ();
01305               cmt.m_action = action_show_macro_value;
01306             }
01307           else
01308             {
01309               if (!cmt.m_quiet) cerr << "#CMT> syntax error : macro name missing" << endl;
01310               help_action = action_help;
01311               cmt.m_action = action_show_macro_value;
01312             }
01313         }
01314       else if (arg == "macros")
01315         {
01316           if (argc > 0)
01317             {
01318               fill_one_argument ();
01319             }
01320 
01321           cmt.m_action = action_show_macros;
01322         }
01323       else if (arg == "manager")
01324         {
01325           cmt.m_action = action_show_manager;
01326         }
01327       else if (arg == "packages")
01328         {
01329           if (argc > 0)
01330             {
01331               cmt.m_current_target = fill_one_argument ();
01332             }
01333 
01334           cmt.m_action = action_show_packages;
01335         }
01336       else if (arg == "path")
01337         {
01338           cmt.m_action = action_show_path;
01339         }
01340       else if (arg == "pattern")
01341         {
01342           if (argc > 0)
01343             {
01344               cmt.m_current_target = fill_one_argument ();
01345               cmt.m_action = action_show_pattern;
01346             }
01347           else
01348             {
01349               if (!cmt.m_quiet) cerr << "#CMT> syntax error : pattern name missing" << endl;
01350               help_action = action_help;
01351               cmt.m_action = action_show_pattern;
01352             }
01353         }
01354       else if (arg == "pattern_names")
01355         {
01356           cmt.m_action = action_show_pattern_names;
01357         }
01358       else if (arg == "patterns")
01359         {
01360           cmt.m_action = action_show_patterns;
01361         }
01362       else if (arg == "projects")
01363         {
01364           cmt.m_action = action_show_projects;
01365         }
01366       else if (arg == "pwd")
01367         {
01368           cmt.m_action = action_show_pwd;
01369         }
01370       else if (arg == "setup")
01371         {
01372           cmt.m_action = action_show_setup;
01373 
01374           if (cmt.m_scope_filtering_mode == default_filtering_mode)
01375             {
01376               cmt.m_scope_filtering_mode = reach_private_uses;
01377             }
01378         }
01379       else if (arg == "set_names")
01380         {
01381           if (argc > 0)
01382             {
01383               fill_one_argument ();
01384             }
01385 
01386           cmt.m_action = action_show_set_names;
01387         }
01388       else if (arg == "set_value")
01389         {
01390           cmt.m_quiet = true;
01391           if (argc > 0)
01392             {
01393               cmt.m_current_target = fill_one_argument ();
01394               cmt.m_action = action_show_set_value;
01395             }
01396           else
01397             {
01398               if (!cmt.m_quiet) cerr << "#CMT> syntax error : set name missing" << endl;
01399               help_action = action_help;
01400               cmt.m_action = action_show_set_value;
01401             }
01402         }
01403       else if (arg == "set")
01404         {
01405           if (argc > 0)
01406             {
01407               cmt.m_current_target = fill_one_argument ();
01408               cmt.m_action = action_show_set;
01409             }
01410           else
01411             {
01412               if (!cmt.m_quiet) cerr << "#CMT> syntax error : set name missing" << endl;
01413               help_action = action_help;
01414               cmt.m_action = action_show_set;
01415             }
01416         }
01417       else if (arg == "sets")
01418         {
01419           if (argc > 0)
01420             {
01421               fill_one_argument ();
01422             }
01423 
01424           cmt.m_action = action_show_sets;
01425         }
01426       else if (arg == "strategies")
01427         {
01428           cmt.m_action = action_show_strategies;
01429         }
01430       else if (arg == "tags")
01431         {
01432           cmt.m_action = action_show_tags;
01433         }
01434       else if (arg == "use_paths")
01435         {
01436           if (argc > 0)
01437             {
01438               while (argc > 0)
01439                 {
01440                   if (strcmp (argv[0], "-private") == 0)
01441                     {
01442                       cmt.m_scope_filtering_mode = reach_private_uses;
01443                     }
01444                   else if (strcmp (argv[0], "--private") == 0)
01445                     {
01446                       cmt.m_scope_filtering_mode = reach_private_uses;
01447                     }
01448                   else
01449                     {
01450                       cmt_string& s = arguments.add ();
01451                       s = argv[0];
01452                     }
01453 
01454                   shift ();
01455                 }
01456 
01457               cmt.m_action = action_show_use_paths;
01458             }
01459           else
01460             {
01461               if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
01462               help_action = action_help;
01463               cmt.m_action = action_show_use_paths;
01464             }
01465         }
01466       else if ((arg == "u") ||
01467                (arg == "us") ||
01468                (arg == "use") ||
01469                (arg == "uses"))
01470         {
01471           cmt.m_action = action_show_uses;
01472 
01473           if (cmt.m_scope_filtering_mode == default_filtering_mode)
01474             {
01475               cmt.m_scope_filtering_mode = reach_private_uses;
01476             }
01477         }
01478       else if (arg == "version")
01479         {
01480           cmt.m_action = action_show_version;
01481         }
01482       else if (arg == "versions")
01483         {
01484           if (argc > 0)
01485             {
01486               cmt.m_current_target = fill_one_argument ();
01487               cmt.m_action = action_show_versions;
01488             }
01489           else
01490             {
01491               if (!cmt.m_quiet) cerr << "#CMT> syntax error : package name missing" << endl;
01492               help_action = action_help;
01493               cmt.m_action = action_show_versions;
01494             }
01495         }
01496       else
01497         {
01498           if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad show argument" << endl;
01499           help_action = action_help;
01500           cmt.m_action = action_show;
01501         }
01502     }
01503   else
01504     {
01505       if (!cmt.m_quiet) cerr << "#CMT> syntax error : don't know what to show" << endl;
01506       help_action = action_help;
01507       cmt.m_action = action_show;
01508     }
01509 }

void ArgParser::do_system  )  [private]
 

Definition at line 1511 of file cmt_commands.cxx.

References action_system, cmt, and CmtContext::m_action.

Referenced by ArgParser().

01512 {
01513   cmt.m_action = action_system;
01514 }

void ArgParser::do_unlock  )  [private]
 

Definition at line 1516 of file cmt_commands.cxx.

References action_help, action_unlock, argc, cmt, Use::current(), cmt_string::erase(), fill_one_argument(), fill_one_argument_filtered(), help_action, CmtContext::m_action, CmtContext::m_current_access, CmtContext::m_current_package, CmtContext::m_current_path, CmtContext::m_current_version, CmtContext::m_quiet, and UserMode.

Referenced by ArgParser().

01517 {
01518   if (argc > 0)
01519     {
01520       cmt.m_current_package = fill_one_argument ();
01521       cmt.m_current_version.erase (0);
01522       cmt.m_current_path.erase (0);
01523                                         
01524       if (argc > 0)
01525         {
01526           cmt.m_current_version = fill_one_argument ();
01527           cmt.m_action = action_unlock;
01528 
01529           if (argc > 0)
01530             {
01531               cmt.m_current_path = fill_one_argument_filtered ();
01532             }
01533                                                 
01534           cmt.m_current_access = UserMode;
01535           (Use::current()).set (cmt.m_current_package, 
01536                                 cmt.m_current_version, 
01537                                 cmt.m_current_path);
01538 
01539         }
01540       else
01541         {
01542           if (!cmt.m_quiet) cerr << "#CMT> syntax error : version missing" << endl;
01543           help_action = action_help;
01544           cmt.m_action = action_unlock;
01545         }
01546     }
01547   else
01548     {
01549       cmt.m_action = action_unlock;
01550     }
01551 }

void ArgParser::do_version  )  [private]
 

Definition at line 1553 of file cmt_commands.cxx.

References action_version, cmt, and CmtContext::m_action.

Referenced by ArgParser().

01554 {
01555   cmt.m_action = action_version;
01556 }

void ArgParser::fill_arguments  )  [private]
 

Definition at line 352 of file cmt_commands.cxx.

References cmt_vector< T >::add(), argc, arguments, argv, and shift().

Referenced by do_awk(), do_broadcast(), do_build(), do_checkout(), do_create(), do_create_project(), do_cvstags(), do_do(), do_expand(), do_filter(), do_run(), and do_set().

00353 {
00354   while (argc > 0)
00355     {
00356       cmt_string& s = arguments.add ();
00357       s = argv[0];
00358 
00359       //cerr << "Getting arg[" << s << "] " << endl;
00360 
00361       shift ();
00362     }  
00363 }

cmt_string & ArgParser::fill_one_argument  )  [private]
 

Definition at line 365 of file cmt_commands.cxx.

References cmt_vector< T >::add(), argc, arguments, argv, and shift().

Referenced by do_build(), do_check(), do_check_files(), do_cvsbranches(), do_cvssubpackages(), do_cvssubprojects(), do_lock(), do_remove(), do_run_sequence(), do_show(), and do_unlock().

00366 {
00367   if (argc > 0)
00368     {
00369       cmt_string& s = arguments.add ();
00370       s = argv[0];
00371 
00372       //cerr << "Getting arg[" << s << "] " << endl;
00373 
00374       shift ();
00375 
00376       return (s);
00377     }
00378   else
00379     {
00380       static cmt_string empty = "";
00381       return (empty);
00382     }
00383 }

cmt_string & ArgParser::fill_one_argument_filtered  )  [private]
 

Definition at line 385 of file cmt_commands.cxx.

References cmt_vector< T >::add(), argc, arguments, argv, and shift().

Referenced by do_build(), do_lock(), do_remove(), and do_unlock().

00386 {
00387   if (argc > 0)
00388     {
00389       cmt_string& s = arguments.add ();
00390       s = argv[0];
00391 
00392       if (s[0] == '-')
00393         {
00394           s = "";
00395         }
00396 
00397       //cerr << "Getting arg[" << s << "] " << endl;
00398 
00399       shift ();
00400 
00401       return (s);
00402     }
00403   else
00404     {
00405       static cmt_string empty = "";
00406       return (empty);
00407     }
00408 }

void ArgParser::option_bat  )  [private]
 

Definition at line 1583 of file cmt_commands.cxx.

References Bat, and mode.

Referenced by ArgParser().

01584 {
01585   mode = Bat;
01586 }

void ArgParser::option_csh  )  [private]
 

Definition at line 1573 of file cmt_commands.cxx.

References Csh, and mode.

Referenced by ArgParser().

01574 {
01575   mode = Csh;
01576 }

void ArgParser::option_e  )  [private]
 

Definition at line 1679 of file cmt_commands.cxx.

References arg, and extra_line.

Referenced by ArgParser().

01680 {
01681   cerr << "#CMT> Warning: extra statement = " << arg << endl;
01682   extra_line = arg;
01683 }

void ArgParser::option_f  )  [private]
 

Definition at line 1674 of file cmt_commands.cxx.

References arg, and extra_file.

Referenced by ArgParser().

01675 {
01676   extra_file = arg;
01677 }

void ArgParser::option_help  )  [private]
 

Definition at line 1558 of file cmt_commands.cxx.

References action_help, and help_action.

Referenced by ArgParser().

01559 {
01560   help_action = action_help;
01561 }

void ArgParser::option_home  )  [private]
 

Definition at line 1685 of file cmt_commands.cxx.

References arg, cmt, CmtContext::m_cmt_home, and CmtSystem::test_directory().

Referenced by ArgParser().

01686 {
01687   if (CmtSystem::test_directory (arg))
01688     {
01689       cmt.m_cmt_home = arg;
01690     }
01691 }

void ArgParser::option_n  )  [private]
 

Definition at line 1563 of file cmt_commands.cxx.

References cmt, and CmtContext::m_simulation.

Referenced by ArgParser().

01564 {
01565   cmt.m_simulation = true;
01566 }

void ArgParser::option_no_cleanup  )  [private]
 

Definition at line 1907 of file cmt_commands.cxx.

Referenced by ArgParser().

01908 {
01909   //cmt.m_current_setup_strategy |= SetupNoCleanup;
01910 }

void ArgParser::option_pack  )  [private]
 

Definition at line 1607 of file cmt_commands.cxx.

References action_create, arg, cmt, Use::current(), CmtContext::m_action, CmtContext::m_current_access, CmtContext::m_current_package, CmtContext::m_current_path, CmtContext::m_current_version, and UserMode.

Referenced by ArgParser().

01608 {
01609   if ((cmt.m_action != action_create) && (cmt.m_current_package != arg))
01610     {
01611       //CmtSystem::cd (cmt.m_default_path);
01612 
01613       cmt.m_current_access = UserMode;
01614 
01615       cmt.m_current_package = arg;
01616       cmt.m_current_version = "";
01617 
01618       /*
01619       cerr << "ArgParser::option_pack> "
01620            << " cp=" << cmt.m_current_package
01621            << " cv=" << cmt.m_current_version
01622            << " cp=" << cmt.m_current_path << endl;
01623       */
01624 
01625       (Use::current()).set (cmt.m_current_package, 
01626                             cmt.m_current_version, 
01627                             cmt.m_current_path);
01628     }
01629 }

void ArgParser::option_path  )  [private]
 

Definition at line 1651 of file cmt_commands.cxx.

References action_create, arg, cmt, Use::current(), CmtContext::m_action, CmtContext::m_current_access, CmtContext::m_current_package, CmtContext::m_current_path, CmtContext::m_current_version, and UserMode.

Referenced by ArgParser().

01652 {
01653   if ((cmt.m_action != action_create) && (cmt.m_current_path != arg))
01654     {
01655       cmt.m_current_access = UserMode;
01656       cmt.m_current_path = arg;
01657 
01658       /*
01659       cerr << "ArgParser::option_path> "
01660            << " cp=" << cmt.m_current_package
01661            << " cv=" << cmt.m_current_version
01662            << " cp=" << cmt.m_current_path << endl;
01663       */
01664 
01665       (Use::current()).set (cmt.m_current_package, 
01666                             cmt.m_current_version, 
01667                             cmt.m_current_path);
01668 
01669       //IProjectFactory& factory = ProjectFactory::instance ();
01670       //CmtSystem::add_cmt_path (cmt.m_current_path, "argument", factory);
01671     }
01672 }

void ArgParser::option_private  )  [private]
 

Definition at line 1912 of file cmt_commands.cxx.

References cmt, CmtContext::m_scope_filtering_mode, and reach_private_uses.

Referenced by ArgParser().

void ArgParser::option_public  )  [private]
 

Definition at line 1917 of file cmt_commands.cxx.

References block_private_uses, cmt, and CmtContext::m_scope_filtering_mode.

Referenced by ArgParser().

void ArgParser::option_quiet  )  [private]
 

Definition at line 1568 of file cmt_commands.cxx.

References cmt, and CmtContext::m_quiet.

Referenced by ArgParser().

01569 {
01570   cmt.m_quiet = true;
01571 }

void ArgParser::option_sh  )  [private]
 

Definition at line 1578 of file cmt_commands.cxx.

References mode, and Sh.

Referenced by ArgParser().

01579 {
01580   mode = Sh;
01581 }

void ArgParser::option_tag  )  [private]
 

Definition at line 1693 of file cmt_commands.cxx.

References Tag::add(), arg, cmt, CmtSystem::cmt_string_vector, Cmt::configure_config_tag(), Cmt::configure_home(), Cmt::configure_hosttype_tag(), Cmt::configure_site_tag(), Cmt::configure_uname_tag(), Cmt::configure_version_tag(), cmt_string::find(), CmtSystem::get_cmt_config(), Cmt::guess_current_project(), CmtContext::m_current_tag, CmtContext::m_extra_tags, Tag::mark(), PriorityArgument, cmt_vector< T >::size(), CmtSystem::split(), CmtSystem::testenv(), and Tag::unmark_all().

Referenced by ArgParser().

01694 {
01695   /*
01696     Here we are going to change the complete tag set
01697   */
01698               
01699   if (arg != "")
01700     {
01701       Tag* tag;
01702       CmtSystem::cmt_string_vector words;
01703 
01704       // First reset selection of all existing tags
01705       //Tag::clear_all ();
01706       Tag::unmark_all ();
01707       cmt.m_extra_tags = ",";
01708                     
01709       // Then restore CMTSITE
01710       Cmt::configure_version_tag ();
01711       Cmt::configure_site_tag (0);
01712       Cmt::configure_uname_tag ();
01713       Cmt::configure_hosttype_tag ();
01714       Cmt::configure_config_tag ();
01715       Cmt::configure_home (0);
01716       Cmt::guess_current_project ();
01717 
01718       CmtSystem::split (arg, " \t,", words);
01719                   
01720       for (int i = 0; i < words.size (); i++)
01721         {
01722           const cmt_string& a = words[i];
01723                       
01724           cmt_string s = ",";
01725           s += a;
01726           s += ",";
01727                       
01728           if (i == 0)
01729             {
01730               cmt.m_current_tag = a;
01731                           
01732               if (CmtSystem::testenv ("TAGDEBUG")) cerr 
01733                 << "parse_argument(tag_add)> current_tag=" << cmt.m_current_tag << endl;
01734             }
01735                       
01736           if (cmt.m_extra_tags.find (s) == cmt_string::npos)
01737             {
01738               //if (!cmt.m_quiet) cerr << "  a=[" << a << "]" << endl;
01739                           
01740               // Then restore uname if the specified tag is CMTCONFIG
01741               if (a == CmtSystem::get_cmt_config ())
01742                 {
01743                   Cmt::configure_uname_tag ();
01744                 }
01745                           
01746               tag = Tag::add (a, PriorityArgument, "arguments", 0);
01747                           
01748               tag->mark ();
01749                           
01750               cmt.m_extra_tags += a;
01751               cmt.m_extra_tags += ",";
01752             }
01753         }
01754     }
01755 }

void ArgParser::option_tag_add  )  [private]
 

Then restore uname if the specified tag is CMTCONFIG

Definition at line 1757 of file cmt_commands.cxx.

References Tag::add(), arg, cmt, CmtSystem::cmt_string_vector, Cmt::configure_uname_tag(), cmt_string::find(), CmtSystem::get_cmt_config(), CmtContext::m_extra_tags, Tag::mark(), PriorityUserTag, cmt_vector< T >::size(), and CmtSystem::split().

Referenced by ArgParser().

01758 {
01759   Tag* tag;
01760   CmtSystem::cmt_string_vector words;
01761               
01762   //if (!cmt.m_quiet) cerr << "-tag_add=" << arg << endl;
01763 
01764   CmtSystem::split (arg, " \t,", words);
01765 
01766   for (int i = 0; i < words.size (); i++)
01767     {
01768       const cmt_string& a = words[i];
01769 
01770       cmt_string s = ",";
01771       s += a;
01772       s += ",";
01773 
01774       if (cmt.m_extra_tags.find (s) == cmt_string::npos)
01775         {
01776           //if (!cmt.m_quiet) cerr << "  a=[" << a << "]" << endl;
01777 
01779           if (a == CmtSystem::get_cmt_config ())
01780             {
01781               Cmt::configure_uname_tag ();
01782             }
01783                       
01784           tag = Tag::add (a, PriorityUserTag, "arguments", 0);
01785                       
01786           tag->mark ();
01787 
01788           cmt.m_extra_tags += a;
01789           cmt.m_extra_tags += ",";
01790         }
01791     }
01792 }

void ArgParser::option_tag_remove  )  [private]
 

First forget about all existing tags

Then restore CMTSITE

Then restore uname if the specified tag is CMTCONFIG

Definition at line 1794 of file cmt_commands.cxx.

References Tag::add(), arg, cmt, CmtSystem::cmt_string_vector, Cmt::configure_hosttype_tag(), Cmt::configure_site_tag(), Cmt::configure_uname_tag(), Cmt::configure_version_tag(), cmt_string::erase(), cmt_string::find(), CmtSystem::get_cmt_config(), CmtContext::m_current_tag, CmtContext::m_extra_tags, Tag::mark(), PriorityTag, PriorityUserTag, cmt_string::size(), cmt_vector< T >::size(), CmtSystem::split(), Tag::TagPtrVector, Tag::tags(), and Tag::unmark_all().

Referenced by ArgParser().

01795 {
01796   Tag::TagPtrVector tags = Tag::tags ();
01797   int i;
01798   Tag* tag;
01799 
01800   /*
01801     for (i = 0; i < tags.size (); i++)
01802     {
01803     tag = tags[i];
01804     if ((tag != 0) &&
01805     (tag->selected))
01806     {
01807     if (!cmt.m_quiet) cerr << "  original tag_list=" << tag->name << tag->priority << endl;
01808     }
01809     }
01810   */
01811 
01812   CmtSystem::cmt_string_vector words;
01813 
01814   //if (!cmt.m_quiet) cerr << "-arg_remove=" << arg << endl;
01815 
01816   CmtSystem::split (arg, " \t,", words);
01817 
01818   //
01819   // Now erase all entries in the old list that match
01820   // the specified tags 
01821   //
01822 
01823   for (i = 0; i < words.size (); i++)
01824     {
01825       const cmt_string& a = words[i];
01826 
01827       cmt_string s = ",";
01828       s += a;
01829       s += ",";
01830 
01831       int pos;
01832 
01833       pos = cmt.m_extra_tags.find (s);
01834 
01835       if (pos != cmt_string::npos)
01836         {
01837           cmt.m_extra_tags.erase (pos, s.size () - 1);
01838         }
01839 
01840       //if (!cmt.m_quiet) cerr << "  tag_list=[" << tag_list << "]" << endl;
01841     }
01842 
01843   //
01844   // Now reinject the purged list of tags into the database
01845   // exactly as when using -tag=<tag-list>
01846   //
01847 
01849       Tag::unmark_all ();
01850 
01852         Cmt::configure_version_tag ();
01853         Cmt::configure_site_tag (0);
01854         Cmt::configure_uname_tag ();
01855         Cmt::configure_hosttype_tag ();
01856               
01857         CmtSystem::split (cmt.m_extra_tags, " \t,", words);
01858 
01859         for (i = 0; i < words.size (); i++)
01860           {
01861             const cmt_string& a = words[i];
01862 
01863             //fprintf (stderr, "  a=[%s]\n", a.c_str ());
01864 
01866               if (a == CmtSystem::get_cmt_config ())
01867                 {
01868                   Cmt::configure_uname_tag ();
01869                 }
01870 
01871               if (i == 0)
01872                 {
01873                   cmt.m_current_tag = a;
01874 
01875                   //if (!cmt.m_quiet) cerr << "parse_argument(tag_remove)> current_tag=" 
01876                   //<< cmt.m_current_tag << endl;
01877 
01878                   tag = Tag::add (a, PriorityTag, "restore configuration", 0);
01879                 }
01880               else
01881                 {
01882                   tag = Tag::add (a, PriorityUserTag, "restore configuration", 0);
01883                 }
01884 
01885               tag->mark ();
01886           }
01887 }

void ArgParser::option_use  )  [private]
 

Definition at line 1588 of file cmt_commands.cxx.

References action_create, arg, cmt, CmtSystem::cmt_string_vector, Use::current(), CmtContext::m_action, CmtContext::m_current_access, CmtContext::m_current_package, CmtContext::m_current_path, CmtContext::m_current_version, cmt_vector< T >::size(), CmtSystem::split(), and UserMode.

Referenced by ArgParser().

01589 {
01590   if (cmt.m_action != action_create)
01591     {
01592       CmtSystem::cmt_string_vector words;
01593 
01594       CmtSystem::split (arg, ":", words);
01595 
01596       cmt.m_current_access = UserMode;
01597 
01598       if (words.size () > 0) cmt.m_current_package = words[0];
01599       if (words.size () > 1) cmt.m_current_version = words[1];
01600       if (words.size () > 2) cmt.m_current_path    = words[2];
01601       (Use::current()).set (cmt.m_current_package, 
01602                             cmt.m_current_version, 
01603                             cmt.m_current_path);
01604     }
01605 }

void ArgParser::option_user_context  )  [private]
 

Definition at line 1889 of file cmt_commands.cxx.

References arg, cmt, CmtContext::m_cmt_user_context, and CmtSystem::test_directory().

Referenced by ArgParser().

01890 {
01891   if (CmtSystem::test_directory (arg))
01892     {
01893       cmt.m_cmt_user_context = arg;
01894     }
01895 }

void ArgParser::option_version  )  [private]
 

Definition at line 1631 of file cmt_commands.cxx.

References action_create, arg, cmt, Use::current(), CmtContext::m_action, CmtContext::m_current_access, CmtContext::m_current_package, CmtContext::m_current_path, CmtContext::m_current_version, and UserMode.

Referenced by ArgParser().

01632 {
01633   if ((cmt.m_action != action_create) && (cmt.m_current_version != arg))
01634     {
01635       cmt.m_current_access = UserMode;
01636       cmt.m_current_version = arg;
01637 
01638       /*
01639       cerr << "ArgParser::option_version> "
01640            << " cp=" << cmt.m_current_package
01641            << " cv=" << cmt.m_current_version
01642            << " cp=" << cmt.m_current_path << endl;
01643       */
01644 
01645       (Use::current()).set (cmt.m_current_package, 
01646                             cmt.m_current_version, 
01647                             cmt.m_current_path);
01648     }
01649 }

void ArgParser::option_with_version_directory  )  [private]
 

Definition at line 1897 of file cmt_commands.cxx.

References cmt, CmtContext::m_current_structuring_style, and with_version_directory.

Referenced by ArgParser().

void ArgParser::option_without_version_directory  )  [private]
 

Definition at line 1902 of file cmt_commands.cxx.

References cmt, CmtContext::m_current_structuring_style, and without_version_directory.

Referenced by ArgParser().

void ArgParser::parse  ) 
 

Skip first argument ("cmt")

Suppress trailing carriage-return

Suppress enclosing quotes

Detect and split arguments of the form a=b left and right part of this argument

Definition at line 410 of file cmt_commands.cxx.

References action_none, arg, argc, arguments, argv, cmt_vector< T >::clear(), cmt, Csh, do_do(), cmt_string::erase(), extra_file, extra_line, cmt_vmap< cmt_string, int >::find(), cmt_string::find(), cmt_vmap< cmt_string, int >::has(), help_action, CmtContext::m_action, CmtContext::m_quiet, mode, parser, parsers, pv, shift(), cmt_string::size(), and unshift().

Referenced by Cmt::parse_arguments().

00411 {
00412   ArgParser& me = *this;
00413 
00414   help_action = action_none;
00415   arguments.clear ();
00416   extra_line.erase (0);
00417   extra_file.erase (0);
00418   mode = Csh;
00419 
00421   shift ();
00422 
00423   cmt.m_action = action_none;
00424 
00425   while (argc > 0)
00426     {
00427       arg = argv[0];
00428 
00429       shift ();
00430 
00432       int cr = arg.find ('\r');
00433       if (cr != cmt_string::npos) arg.erase (cr);
00434 
00436       if ((arg[0] == '\"') && (arg[arg.size () - 1] == '\"'))
00437         {
00438           arg.erase (0, 1);
00439           arg.erase (arg.size () - 1, 1);
00440         }
00441 
00444       cmt_string reduced_arg = arg;
00445       int pos = reduced_arg.find ('=');
00446       if (pos != cmt_string::npos)
00447         {
00448           reduced_arg.erase (pos);
00449           arg.erase (0, pos+1);
00450         }
00451       else
00452         {
00453           arg = "";
00454         }
00455 
00456       //cerr << "argc=" << argc << " reduced_arg=[" << reduced_arg << "] arg=[" << arg << "]" << endl;
00457 
00458       if (parsers.has (reduced_arg))
00459         {
00460           // This argument corresponds to a known command
00461 
00462           int i = (*parsers.find (reduced_arg));
00463 
00464           parser p = pv[i];
00465           (me.*p) ();
00466         }
00467       else if (cmt.m_action != action_none)
00468         {
00469           // We have unexpected arguments (not handled by the command handler). This may sign 
00470           // an unprotected handler implementation.
00471           if (!cmt.m_quiet) cerr << "#CMT> warning : unexpected parameter " << reduced_arg << endl;
00472         }
00473       else
00474         {
00475           // This argument does not correspond to a known command. We expect then an action
00476           // to be executed with that name
00477 
00478           unshift ();
00479           do_do ();
00480 
00481           /*
00482               if (!cmt.m_quiet) cerr << "#CMT> syntax error : bad command parameter " << arg << endl;
00483               help_action = action_none;
00484           */
00485         }
00486     }
00487 }

void ArgParser::shift  )  [private]
 

Definition at line 337 of file cmt_commands.cxx.

References argc, and argv.

Referenced by do_build(), do_check(), do_expand(), do_remove(), do_set(), do_show(), fill_arguments(), fill_one_argument(), fill_one_argument_filtered(), and parse().

00338 {
00339   if (argc > 0)
00340     {
00341       argc--;
00342       argv++;
00343     }
00344 }

void ArgParser::unshift  )  [private]
 

Definition at line 346 of file cmt_commands.cxx.

References argc, and argv.

Referenced by parse().

00347 {
00348   argc++;
00349   argv--;
00350 }


Member Data Documentation

cmt_string ArgParser::arg
 

Definition at line 24 of file cmt_commands.h.

Referenced by do_build(), do_check(), do_expand(), do_remove(), do_set(), do_show(), option_e(), option_f(), option_home(), option_pack(), option_path(), option_tag(), option_tag_add(), option_tag_remove(), option_use(), option_user_context(), option_version(), and parse().

int ArgParser::argc
 

Definition at line 22 of file cmt_commands.h.

Referenced by do_build(), do_check(), do_check_files(), do_checkout(), do_create(), do_create_project(), do_cvsbranches(), do_cvssubpackages(), do_cvssubprojects(), do_cvstags(), do_do(), do_expand(), do_filter(), do_lock(), do_remove(), do_run(), do_run_sequence(), do_set(), do_show(), do_unlock(), fill_arguments(), fill_one_argument(), fill_one_argument_filtered(), parse(), Cmt::parser(), shift(), and unshift().

CmtSystem::cmt_string_vector ArgParser::arguments
 

Definition at line 25 of file cmt_commands.h.

Referenced by ArgParser(), Cmt::do_awk(), Cmt::do_broadcast(), Cmt::do_build_constituent_makefile(), Cmt::do_build_constituents_makefile(), Cmt::do_build_dependencies(), Cmt::do_build_msdev(), Cmt::do_build_os9_makefile(), Cmt::do_build_prototype(), Cmt::do_build_readme(), Cmt::do_build_triggers(), Cmt::do_build_vsnet(), Cmt::do_build_windefs(), Cmt::do_check_files(), Cmt::do_check_version(), Cmt::do_checkout(), Cmt::do_create(), Cmt::do_create_project(), Cmt::do_cvsbranches(), Cmt::do_cvssubpackages(), Cmt::do_cvssubprojects(), Cmt::do_cvstags(), Cmt::do_do(), do_do(), Cmt::do_expand_model(), Cmt::do_filter(), Cmt::do_run(), Cmt::do_run_sequence(), Cmt::do_set_version(), Cmt::do_set_versions(), do_show(), Cmt::do_show_action(), Cmt::do_show_action_names(), Cmt::do_show_actions(), Cmt::do_show_clients(), Cmt::do_show_constituent(), Cmt::do_show_fragment(), Cmt::do_show_language(), Cmt::do_show_macro(), Cmt::do_show_macro_names(), Cmt::do_show_macros(), Cmt::do_show_packages(), Cmt::do_show_pattern(), Cmt::do_show_set_names(), Cmt::do_show_sets(), Cmt::do_show_use_paths(), Cmt::do_show_versions(), fill_arguments(), fill_one_argument(), fill_one_argument_filtered(), and parse().

char** ArgParser::argv
 

Definition at line 23 of file cmt_commands.h.

Referenced by do_build(), do_check(), do_expand(), do_remove(), do_set(), do_show(), fill_arguments(), fill_one_argument(), fill_one_argument_filtered(), parse(), Cmt::parser(), shift(), and unshift().

CmtContext& ArgParser::cmt [private]
 

Definition at line 89 of file cmt_commands.h.

Referenced by do_awk(), do_broadcast(), do_build(), do_check(), do_check_files(), do_checkout(), do_cleanup(), do_config(), do_create(), do_create_project(), do_cvsbranches(), do_cvssubpackages(), do_cvssubprojects(), do_cvstags(), do_do(), do_expand(), do_filter(), do_lock(), do_remove(), do_run(), do_run_sequence(), do_set(), do_setup(), do_show(), do_system(), do_unlock(), do_version(), option_home(), option_n(), option_pack(), option_path(), option_private(), option_public(), option_quiet(), option_tag(), option_tag_add(), option_tag_remove(), option_use(), option_user_context(), option_version(), option_with_version_directory(), option_without_version_directory(), and parse().

cmt_string ArgParser::extra_file
 

Definition at line 27 of file cmt_commands.h.

Referenced by option_f(), parse(), and Cmt::parser().

cmt_string ArgParser::extra_line
 

Definition at line 26 of file cmt_commands.h.

Referenced by option_e(), parse(), and Cmt::parser().

ActionType ArgParser::help_action
 

Definition at line 29 of file cmt_commands.h.

Referenced by do_build(), do_check(), do_check_files(), do_checkout(), do_create(), do_create_project(), do_cvsbranches(), do_cvstags(), do_do(), do_expand(), do_filter(), do_help(), do_lock(), do_remove(), do_run(), do_run_sequence(), do_set(), do_show(), do_unlock(), option_help(), parse(), and Cmt::parser().

PrintMode ArgParser::mode
 

Definition at line 28 of file cmt_commands.h.

Referenced by Cmt::do_cleanup(), Cmt::do_setup(), Cmt::do_show_action(), Cmt::do_show_action_names(), Cmt::do_show_actions(), Cmt::do_show_branches(), Cmt::do_show_macro(), Cmt::do_show_macro_names(), Cmt::do_show_macros(), Cmt::do_show_set_names(), Cmt::do_show_sets(), option_bat(), option_csh(), option_sh(), and parse().

cmt_vmap<cmt_string, int> ArgParser::parsers [private]
 

Definition at line 91 of file cmt_commands.h.

Referenced by ArgParser(), and parse().

cmt_vector<parser> ArgParser::pv [private]
 

Definition at line 92 of file cmt_commands.h.

Referenced by ArgParser(), and parse().


The documentation for this class was generated from the following files:
Generated on Mon May 2 10:25:26 2005 for CMT by doxygen 1.3.5