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 #include <UT/UT_NonCopyable.h>
21 
22 class CMD_Args;
23 
25 
27 public:
28  const char *getName() const { return myName; }
29  const char *getOptions() const { return myOptions; }
30  CMD_Callback &getCallback() { return myCallback; }
31 
32  CMD_Command *getChainCommand() { return myChain; }
33  const char *getDSOLocation() { return myDSOLocation; }
34  bool isSafe() const { return myIsSafe; }
35 protected:
36 private:
37  const char *myName;
38  const char *myOptions;
39  char *myDSOLocation;
40  CMD_Callback myCallback;
41  CMD_Command *myChain;
42  int myIndex; // Index into command table
43  bool myIsSafe;
44 
45  CMD_Command(const char *n, const char *o, CMD_Callback c, bool is_safe);
46  ~CMD_Command();
48 
50 };
51 
53 
54 #endif
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
Definition: thread.h:623
void
Definition: png.h:1083
void(* CMD_Callback)(CMD_Args &args)
Definition: CMD_Command.h:24
const char * getDSOLocation()
Definition: CMD_Command.h:33
bool isSafe() const
Definition: CMD_Command.h:34
GLdouble n
Definition: glcorearb.h:2008
CMD_Command * getChainCommand()
Definition: CMD_Command.h:32
const char * getOptions() const
Definition: CMD_Command.h:29
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
CMD_Callback & getCallback()
Definition: CMD_Command.h:30
#define CMD_API
Definition: CMD_API.h:10
**If you just want to fire and args
Definition: thread.h:609
const char * getName() const
Definition: CMD_Command.h:28
CMD_API void CMDpythonCommandCallback(CMD_Args &args)