HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DS_CommandList.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: DS library (C++)
7  *
8  * COMMENTS: List of commands
9  */
10 
11 #ifndef __DS_CommandList_h__
12 #define __DS_CommandList_h__
13 
14 #include "PRM_API.h"
15 #include <UT/UT_ValArray.h>
16 #include <UT/UT_String.h>
17 
18 class DS_Command;
19 
21 public:
22  enum {
23  DS_COMMAND_NONE, // Plain syntax
24  DS_COMMAND_RMAN, // RenderMan Syntax
25  DS_COMMAND_VEX // Toggles have value with them
26  };
27  DS_CommandList(const char *filename);
28  DS_CommandList(const char * const filename[]); // Multiple filenames
29  ~DS_CommandList();
30 
31  int findCommand(const char *name);
32  DS_Command *getCommand(const char *name);
33  DS_Command *getCommand(int i) { return myCommands(i); }
34  int getNCommands() { return myCommands.entries(); }
35  const char *getFileName() const { return myFileName; }
36  void enforceOptions();
37 
38  void setSyntax(int syntax);
39 
40 private:
41  void load(const char *filename);
42  void defaultEntry();
43 
44  UT_ValArray<DS_Command *> myCommands;
45  UT_String myFileName;
46 };
47 
48 #endif
DS_Command * getCommand(int i)
GT_API const UT_StringHolder filename
const char * getFileName() const
GLuint const GLchar * name
Definition: glcorearb.h:786
#define PRM_API
Definition: PRM_API.h:10