00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __PRM_BatchList__
00024 #define __PRM_BatchList__
00025
00026 #include "PRM_API.h"
00027 #include <UT/UT_PtrArray.h>
00028 #include "PRM_BatchParm.h"
00029
00030 class PRM_Template;
00031 class UT_IntArray;
00032 class prm_BatchOpInfo;
00033
00034 class PRM_API PRM_BatchList {
00035 public:
00036 PRM_BatchList();
00037 ~PRM_BatchList();
00038
00039 PRM_BatchParm *addParm(int index, const char *name, PRM_BatchType type,
00040 int size, void *data=0);
00041 PRM_BatchParm *addParm(PRM_Template *tplate, void *data=0);
00042 PRM_BatchParm *addParm(const char *name, PRM_BatchType type,
00043 int size, void *data=0)
00044 {
00045 return addParm(myParms.entries(), name, type, size, data);
00046 }
00047
00048
00049 bool validate() const;
00050
00051
00052 int entries() const { return myParms.entries(); }
00053 PRM_BatchParm *operator()(int i) { return myParms(i); }
00054
00055
00056
00057
00058
00059
00060 void setEvaluator(int opid);
00061
00062
00063 int getEvaluatingOps(UT_IntArray &list);
00064
00065
00066 void setEvaluated(int batch_idx, int parmlist_idx);
00067
00068
00069
00070 void clearEvaluated()
00071 {
00072 clearOpList();
00073 for (int i = myParms.entries(); i-- > 0; )
00074 myParms(i)->clearEvaluated();
00075 }
00076 void clearValueSet()
00077 {
00078 for (int i = myParms.entries(); i-- > 0; )
00079 myParms(i)->clearValueSet();
00080 }
00081
00082 void dump();
00083
00084 private:
00085 void clearOpList();
00086
00087 UT_PtrArray<PRM_BatchParm *> myParms;
00088 UT_PtrArray<prm_BatchOpInfo *> myOpList;
00089 int myEvaluatingOp;
00090 };
00091
00092 #endif
00093