HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 
30  std::ostream &out() { return *my_out; }
31  std::ostream &err(int show_line_number = 1);
32 
33  /// Print an error message on err()
34  void error(const char *fmt, ...)
36 
37  void quietErrors() { myFirstError = 0; }
38  void showUsage();
39  void callBaseClassCommand();
40 
41  UT_String commandName();
42 
43 private:
44  void init(std::ostream *os, std::ostream *es, CMD_Source *src);
45 
46  std::ostream *my_out;
47  std::ostream *my_err;
48  UT_String myFilename;
49  int myLineNumber;
50  CMD_Command *myCommand;
51  int myFirstError;
52 
53  friend class CMD_Manager;
54 };
55 #endif
< returns > If no error
Definition: snippets.dox:2
std::ostream & out()
Definition: CMD_Args.h:30
#define SYS_PRINTF_CHECK_ATTRIBUTE(string_index, first_to_check)
Definition: SYS_Types.h:447
#define CMD_API
Definition: CMD_API.h:10
GLenum src
Definition: glcorearb.h:1793