MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00003 // 00004 // \file mlMetaProfilePtr.h 00005 // \author Marcus Barann 00006 // \date 8/2010 00007 // 00008 //---------------------------------------------------------------------------------- 00009 #ifndef _ML_META_PROFILE_PTR_H_ 00010 #define _ML_META_PROFILE_PTR_H_ 00011 00012 #include "mlProfilingManagerDllExport.h" 00013 00014 class MLMetaProfile; 00015 00016 00018 class MLPROFILINGMANAGER_EXPORT MLMetaProfilePtr 00019 { 00020 public: 00021 MLMetaProfilePtr(); 00022 ~MLMetaProfilePtr(); 00023 00024 void createMetaProfile(const std::string& description); 00025 00026 MLMetaProfile* operator->() const { return _metaProfile; } 00027 MLMetaProfile& operator*() { return *_metaProfile; } 00028 const MLMetaProfile& operator*() const { return *_metaProfile; } 00029 00030 MLMetaProfile* get() const { return _metaProfile; } 00031 00032 operator bool() const { return _metaProfile != NULL; } 00033 00034 private: 00035 // disallow copying of the meta profile pointer, because the meta profile 00036 // supports only one callback. 00037 MLMetaProfilePtr(const MLMetaProfilePtr&); 00038 MLMetaProfilePtr& operator=(const MLMetaProfilePtr&); 00039 00040 void metaProfileIsDestroyed(); 00041 00042 private: 00043 MLMetaProfile* _metaProfile; 00044 00045 friend class MLMetaProfile; 00046 }; 00047 00048 #endif // _ML_META_PROFILE_PTR_H_