HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CMD_Command.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 Class for Command Library (C++)
7  *
8  * COMMENTS: This is the class for a general command.
9  * Instansiating one of these will automatically install it
10  * in the command manager.
11  * The name, options, and help are not duplicated, so don't
12  * pass in volatile data please.
13  *
14  */
15 
16 #ifndef __CMD_Command_H__
17 #define __CMD_Command_H__
18 
19 #include "CMD_API.h"
20 class CMD_Args;
21 
22 typedef void (*CMD_Callback)(CMD_Args &args);
23 
25 public:
26  const char *getName() const { return myName; }
27  const char *getOptions() const { return myOptions; }
28  CMD_Callback &getCallback() { return myCallback; }
29 
30  CMD_Command *getChainCommand() { return myChain; }
31  const char *getDSOLocation() { return myDSOLocation; }
32  bool isSafe() const { return myIsSafe; }
33 protected:
34 private:
35  const char *myName;
36  const char *myOptions;
37  char *myDSOLocation;
38  CMD_Callback myCallback;
39  CMD_Command *myChain;
40  int myIndex; // Index into command table
41  bool myIsSafe;
42 
43  CMD_Command(const char *n, const char *o, CMD_Callback c, bool is_safe);
44  ~CMD_Command();
45 
46  friend class CMD_Manager;
47 };
48 
50 
51 #endif
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
void(* CMD_Callback)(CMD_Args &args)
Definition: CMD_Command.h:22
const char * getDSOLocation()
Definition: CMD_Command.h:31
bool isSafe() const
Definition: CMD_Command.h:32
GLdouble n
Definition: glcorearb.h:2007
CMD_Command * getChainCommand()
Definition: CMD_Command.h:30
const char * getOptions() const
Definition: CMD_Command.h:27
CMD_Callback & getCallback()
Definition: CMD_Command.h:28
#define CMD_API
Definition: CMD_API.h:10
const char * getName() const
Definition: CMD_Command.h:26
CMD_API void CMDpythonCommandCallback(CMD_Args &args)