00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __MGR_Node_h__
00015 #define __MGR_Node_h__
00016
00017 #include "MGR_API.h"
00018 #include <OP/OP_Network.h>
00019
00020 typedef enum {
00021 MGR_OBJECT_MANAGER = 0,
00022 MGR_ROP_MANAGER,
00023 MGR_PARTICLE_MANAGER,
00024 MGR_CHOPNET_MANAGER,
00025 MGR_SHOP_MANAGER,
00026 MGR_COP_MANAGER,
00027 MGR_VOPNET_MANAGER,
00028 MGR_NUM_MANAGERS
00029 } MGR_MANAGER_TYPE;
00030
00031
00032
00033
00034
00035
00036 #define OBJECT_MANAGER_NAME OBJ_SCRIPT_NAME
00037 #define OUTPUT_MANAGER_NAME ROP_SCRIPT_NAME
00038 #define PARTICLE_MANAGER_NAME POPNET_SCRIPT_NAME
00039 #define CHOPNET_MANAGER_NAME CHOPNET_SCRIPT_NAME
00040 #define SHOP_MANAGER_NAME SHOP_SCRIPT_NAME
00041 #define COMPOSITE2_MANAGER_NAME "img"
00042 #define VOPNET_MANAGER_NAME VOPNET_SCRIPT_NAME
00043
00044 class MGR_API MGR_Node : public OP_Network
00045 {
00046 public:
00047 virtual const char *getChildType() const;
00048 virtual const char *getOpType() const;
00049
00050 virtual OP_OpTypeId getChildTypeID() const;
00051 virtual OP_OpTypeId getOpTypeID() const;
00052
00053 static OP_Node *buildMe(OP_Network *, const char *, OP_Operator *);
00054 static PRM_Template myTemplateList[];
00055
00056 virtual OP_Node *getDisplayNodePtr();
00057 virtual OP_Node *getRenderNodePtr();
00058
00059 virtual int isManager() const;
00060
00061
00062 virtual void addExtraInput(OP_Node *op, OP_InterestType type);
00063
00064
00065 virtual unsigned maxOutputs() const { return 0; }
00066
00067 virtual bool canDestroyNode();
00068
00069 protected:
00070 MGR_Node(OP_Network *parent, MGR_MANAGER_TYPE type);
00071 virtual ~MGR_Node();
00072
00073 virtual OP_ERROR cookMe(OP_Context &);
00074 virtual OP_ERROR bypassMe(OP_Context &, int &);
00075
00076 virtual OP_DATA_TYPE getCookedDataType() const;
00077 virtual void *getCookedData(OP_Context &);
00078 virtual void deleteCookedData();
00079 virtual int saveCookedData(const char *, OP_Context &);
00080 virtual int saveCookedData(ostream &os, OP_Context &, int binary = 0);
00081 int aliasMatch(const char *name) const;
00082
00083 virtual const char *getFileExtension(int binary) const;
00084
00085 virtual void childFlagChange(OP_Node *);
00086
00087 private:
00088 void buildObjTable(const char *);
00089 void buildIceTable(const char *);
00090 void buildRopTable(const char *);
00091 void buildPartTable(const char *);
00092 void buildChopTable(const char *);
00093 void buildShopTable(const char *);
00094 void buildCopTable(const char *);
00095 void buildVopNetTable(const char *);
00096 void buildDopTable(const char *);
00097
00098
00099 void addManagementOps(OP_OperatorTable *table);
00100
00101
00102
00103 void buildOpZTables();
00104
00105 const char **myAliases;
00106 MGR_MANAGER_TYPE myType;
00107
00108
00109
00110
00111 friend class MOT_Director;
00112 };
00113
00114 #endif