00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Elendt 00008 * Side Effects 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: DS library (C++) 00015 * 00016 * COMMENTS: List of commands 00017 */ 00018 00019 #ifndef __DS_CommandList_h__ 00020 #define __DS_CommandList_h__ 00021 00022 #include "PRM_API.h" 00023 #include <UT/UT_PtrArray.h> 00024 #include <UT/UT_String.h> 00025 00026 class DS_Command; 00027 00028 class PRM_API DS_CommandList { 00029 public: 00030 enum { 00031 DS_COMMAND_NONE, // Plain syntax 00032 DS_COMMAND_RMAN, // RenderMan Syntax 00033 DS_COMMAND_VEX // Toggles have value with them 00034 }; 00035 DS_CommandList(const char *filename); 00036 DS_CommandList(const char * const filename[]); // Multiple filenames 00037 ~DS_CommandList(); 00038 00039 int findCommand(const char *name); 00040 DS_Command *getCommand(const char *name); 00041 DS_Command *getCommand(int i) { return myCommands(i); } 00042 int getNCommands() { return myCommands.entries(); } 00043 const char *getFileName() const { return myFileName; } 00044 void enforceOptions(); 00045 00046 void setSyntax(int syntax); 00047 00048 private: 00049 void load(const char *filename); 00050 void defaultEntry(); 00051 00052 UT_PtrArray<DS_Command *> myCommands; 00053 UT_String myFileName; 00054 }; 00055 00056 #endif
1.5.9