source: CMT/HEAD/source/cmt_commands.h @ 659

Last change on this file since 659 was 659, checked in by rybkin, 10 years ago

See C.L. 518

  • Property svn:eol-style set to native
File size: 2.8 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_projects ();
86  void option_without_projects ();
87  void option_with_version_directory ();
88  void option_without_version_directory ();
89  void option_no_cleanup ();
90  void option_no_strip_path ();
91  void option_strip_path ();
92  void option_private ();
93  void option_public ();
94
95  void shift ();
96  void unshift ();
97  void fill_arguments ();
98  cmt_string& fill_one_argument ();
99  cmt_string& fill_one_argument_filtered ();
100
101  CmtContext& cmt;
102
103  cmt_vmap <cmt_string, int> parsers;
104  cmt_vector <parser> pv;
105
106};
107
108class CommandHelp
109{
110public:
111  typedef cmt_map <ActionType, cmt_string> HelpMap;
112  typedef cmt_vector <cmt_string> HelpTexts;
113
114  static HelpMap& get_help ();
115  static HelpTexts& get_help_texts ();
116  static const cmt_string& get_help_text (ActionType key);
117  static void show_all ();
118  static void show (ActionType action);
119
120private:
121  static CommandHelp& instance ();
122
123  CommandHelp ();
124
125  HelpMap m_help;
126  HelpTexts m_help_texts;
127};
128
129#endif
Note: See TracBrowser for help on using the repository browser.