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 * George ElKoura 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: OP_Parm.h ( OP Library, C++) 00015 * 00016 * COMMENTS: 00017 * This class is an abstraction of a PRM_Parm-index pair for an OP's 00018 * parameter. This class is mostly useful for UI operations that don't 00019 * rely on the speed of a lookup operation. The advantage of this class 00020 * is that it does not rely on the persistance of a Parm, nor its node. 00021 * In some cases holding on to a PRM_Parm pointer is dangerous because 00022 * PRM_Parm pointers can be deleted for a variety of reasons (PRM_Multi, 00023 * OTL changes, etc...) 00024 */ 00025 00026 #ifndef __OP_Parm_h__ 00027 #define __OP_Parm_h__ 00028 00029 #include "OP_API.h" 00030 #include <UT/UT_String.h> 00031 00032 class OP_Node; 00033 class PRM_Parm; 00034 00035 class OP_API OP_Parm 00036 { 00037 public: 00038 OP_Parm(PRM_Parm &parm, int subindex); 00039 ~OP_Parm(); 00040 00041 00042 // Returns the PRM_Parm corresponding to our OP_Parm. Always check for 00043 // a NULL value as it is possible. 00044 PRM_Parm *getParm() const; 00045 00046 // Use this version of getParm if you would also like to know the subindex 00047 PRM_Parm *getParm(int &subindex) const; 00048 00049 // Returns the node, could be NULL. 00050 OP_Node *getNode() const; 00051 00052 00053 protected: 00054 int myNodeId; 00055 UT_String myParmName; 00056 }; 00057 00058 #endif 00059
1.5.9