MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //------------------------------------------------------------------------- 00005 00010 //------------------------------------------------------------------------- 00011 00012 #ifndef __mlObjMgrBase_H 00013 #define __mlObjMgrBase_H 00014 00015 #ifndef __MLObjMgrSystem_H 00016 #include "MLObjMgrSystem.h" 00017 #endif 00018 #ifndef __mlObjMgrConnection_H 00019 #include "mlObjMgrConnection.h" 00020 #endif 00021 00022 // Include most ml specific things. 00023 #ifndef __mlOperatorIncludes_H 00024 #include <mlOperatorIncludes.h> 00025 #endif 00026 00027 // Macros to be used when calling notifySensorsAndConnectedClients() 00028 #define DONT_FIRE_SENSORS false 00029 #define FIRE_SENSORS true 00030 00031 ML_START_NAMESPACE 00032 00033 class ObjMgr; 00034 class ObjMgrClient; 00035 00038 class ObjMgrBase : public BaseOp 00039 { 00040 friend class ObjMgrClient; 00041 00042 typedef BaseOp inherited; 00043 00045 ML_ABSTRACT_CLASS_HEADER(ObjMgrBase) 00046 00047 public: 00048 00050 ~ObjMgrBase(); 00051 00054 BaseField *objectsOutFld; 00055 00056 protected: 00057 00059 ObjMgrBase(int inputNum, int outputNum); 00060 00062 omObjMgrConnection _connection; 00063 00065 std::set<ObjMgrBase *> _connectedModules; 00066 00068 void notifySensorsAndConnectedClients(bool fireOutputSensors); 00069 00071 void configureNetwork(); 00072 00074 virtual std::string getDebugComment() const = 0; 00075 00079 void buildGraph(std::multimap<ObjMgrBase *, ObjMgrBase *> &graph); 00080 00081 private: 00083 ObjMgrBase(const ObjMgrBase &) : BaseOp(0,0){ 00084 ML_PRINT_FATAL_ERROR("ObjMgrBase::ObjMgrBase(const ObjMgrBase&)", 00085 ML_PROGRAMMING_ERROR, 00086 "Invalid usage of copy constructor"); 00087 } 00088 00090 ObjMgrBase &operator=(const ObjMgrBase &){ 00091 ML_PRINT_FATAL_ERROR("ObjMgrBase::operator=", 00092 ML_PROGRAMMING_ERROR, 00093 "Invalid usage of assignment operator"); 00094 return *this; 00095 } 00096 }; 00097 00098 ML_END_NAMESPACE 00099 00100 #endif // __mlObjMgrBase_H