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 * Jeff Lait 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_ParmCache.h ( OP Library, C++) 00015 * 00016 * COMMENTS: 00017 * This class handles tracking what the last value of the 00018 * parm was & whether it has changed. 00019 */ 00020 00021 #ifndef __OP_ParmCache__ 00022 #define __OP_ParmCache__ 00023 00024 #include "OP_API.h" 00025 #include <UT/UT_Defines.h> 00026 #include <UT/UT_PtrArray.h> 00027 00028 class OP_Context; 00029 class OP_Parameters; 00030 class op_ParmCacheEntry; 00031 00032 class OP_API OP_ParmCache 00033 { 00034 public: 00035 explicit OP_ParmCache(OP_Parameters *node); 00036 virtual ~OP_ParmCache(); 00037 00038 // This checks if the specified index is dirty. If it is not known, 00039 // it is added to our cached values table (but no value is cached yet) 00040 bool isDirty(int idx, float t); 00041 00042 // This caches all the values that we've built references to. 00043 void updateValues(const OP_Context &context); 00044 00045 int64 getMemUsage(UT_Bool onlythis) const; 00046 00047 protected: 00048 OP_Parameters *myNode; // Not _quite_ a node... 00049 UT_PtrArray<op_ParmCacheEntry *> myCachedValues; 00050 }; 00051 00052 #endif 00053
1.5.9