HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CMD_Args.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: Command Library (C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __CMD_Args_H__
13 #define __CMD_Args_H__
14 
15 #include "CMD_API.h"
16 #include <iosfwd>
17 #include <UT/UT_Args.h>
18 #include <UT/UT_String.h>
19 
20 class CMD_Manager;
21 class CMD_Source;
22 class CMD_Command;
23 
24 #define CMD_MAX_OPTIONS UT_MAX_OPTIONS
25 
26 class CMD_API CMD_Args : public UT_Args
27 {
28 public:
29  CMD_Args();
30  virtual ~CMD_Args();
31 
32  std::ostream &out() { return *my_out; }
33  std::ostream &err(int show_line_number = 1);
34 
35  /// Print an error message on err()
36  void error(const char *fmt, ...)
38 
39  void quietErrors() { myFirstError = 0; }
40  void showUsage();
41  void callBaseClassCommand();
42 
43  UT_String commandName();
44 
45 private:
46  void init(std::ostream *os, std::ostream *es, CMD_Source *src);
47 
48  std::ostream *my_out;
49  std::ostream *my_err;
50  UT_String myFilename;
51  int myLineNumber;
52  CMD_Command *myCommand;
53  int myFirstError;
54 
55  friend class CMD_Manager;
56 };
57 #endif
std::ostream & out()
Definition: CMD_Args.h:32
#define SYS_PRINTF_CHECK_ATTRIBUTE(string_index, first_to_check)
Definition: SYS_Types.h:425
#define CMD_API
Definition: CMD_API.h:10
GLenum src
Definition: glcorearb.h:1792