source: CMT/v1r25p20130606/source/cmt_commands.h

Last change on this file was 561, checked in by rybkin, 13 years ago

See C.L. 444

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
4// Modified by garonne@lal.in2p3.fr
5// See the complete license in cmt_license.txt "http://www.cecill.info".
6//-----------------------------------------------------------
7
8#ifndef __cmt_commands_h__
9#define __cmt_commands_h__
10
11#include "cmt_map.h"
12#include "cmt.h"
13
14class ArgParser
15{
16public:
17  typedef void (ArgParser::* parser) (void);
18
19  ArgParser (CmtContext& context);
20
21  void parse ();
22
23  int argc;
24  char** argv;
25  cmt_string arg;
26  CmtSystem::cmt_string_vector arguments;
27  cmt_string extra_line;
28  cmt_string extra_file;
29  PrintMode mode;
30  ActionType help_action;
31
32private:
33  void do_awk ();
34  void do_broadcast ();
35  void do_build ();
36  void do_check ();
37  void do_check_files ();
38  void do_checkout ();
39  void do_cleanup ();
40  void do_config ();
41  void do_create ();
42  void do_create_project ();
43  void do_cvsbranches ();
44  void do_cvssubpackages ();
45  void do_cvssubprojects ();
46  void do_cvstags  ();
47  void do_do       ();
48  void do_expand   ();
49  void do_filter   ();
50  void do_help     ();
51  void do_lock     ();
52  void do_relocate ();
53  void do_remove   ();
54  void do_run      ();
55  void do_run_sequence ();
56  void do_set ();
57  void do_setup ();
58  void do_show ();
59  void do_system ();
60  void do_unlock ();
61  void do_version ();
62  void option_disable_warnings();
63  void option_help ();
64  void option_n ();
65  void option_quiet ();
66  void option_warnings ();
67  void option_csh ();
68  void option_sh ();
69  void option_bat ();
70  void option_requirements ();
71  void option_xml ();
72  void option_use ();
73  void option_pack ();
74  void option_version ();
75  void option_path ();
76  void option_f ();
77  void option_e ();
78  void option_home ();
79  void option_tag ();
80  void option_tag_add ();
81  void option_tag_remove ();
82  void option_user_context ();
83  void option_with_cmt ();
84  void option_without_cmt ();
85  void option_with_version_directory ();
86  void option_without_version_directory ();
87  void option_no_cleanup ();
88  void option_private ();
89  void option_public ();
90
91  void shift ();
92  void unshift ();
93  void fill_arguments ();
94  cmt_string& fill_one_argument ();
95  cmt_string& fill_one_argument_filtered ();
96
97  CmtContext& cmt;
98
99  cmt_vmap <cmt_string, int> parsers;
100  cmt_vector <parser> pv;
101
102};
103
104class CommandHelp
105{
106public:
107  typedef cmt_map <ActionType, cmt_string> HelpMap;
108  typedef cmt_vector <cmt_string> HelpTexts;
109
110  static HelpMap& get_help ();
111  static HelpTexts& get_help_texts ();
112  static const cmt_string& get_help_text (ActionType key);
113  static void show_all ();
114  static void show (ActionType action);
115
116private:
117  static CommandHelp& instance ();
118
119  CommandHelp ();
120
121  HelpMap m_help;
122  HelpTexts m_help_texts;
123};
124
125#endif
Note: See TracBrowser for help on using the repository browser.