source: CMT/v1r25-branch/source/cmt_commands.h

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

merge -r 646:663 HEAD

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