MeVisLabToolboxReference
MeVis/Foundation/Sources/MLProfilingManager/Include/mlAccumulatedProfile.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00003 // The accumulated profile.
00004 //
00005 // \file    mlAccumulatedProfile.h
00006 // \author  Marcus Barann
00007 // \date    7/2009
00008 //
00009 //----------------------------------------------------------------------------------
00010 #ifndef _ML_ACCUMULATED_PROFILE_H_
00011 #define _ML_ACCUMULATED_PROFILE_H_
00012 
00013 #include "mlProfilingManagerDllExport.h"
00014 #include "mlMemoryProfile.h"
00015 #include "mlTimeProfile.h"
00016 
00017 class MLMetaProfile;
00018 
00019 
00020 //----------------------------------------------------------------------------------
00021 
00022 class MLPROFILINGMANAGER_EXPORT MLAccumulatedProfile
00023 {
00024 public:
00025   MLAccumulatedProfile() { reset(); }
00026 
00028   void reset();
00029 
00031   void feed(const MLMetaProfile& profile);
00032 
00034   void feed(const MLAccumulatedProfile& profile);
00035 
00037   MLProfilingMemoryType getTotalMemory() const { return _totalMemory; }
00038 
00040   MLProfilingMemoryType getCurrentlyUsedMemory() const { return _currentMemory; }
00041 
00043   MLProfilingTimeType getConsumedTime() const { return _consumedTime; }
00044 
00046   MLAccumulatedProfile& operator+=(const MLAccumulatedProfile& other) { feed(other); return *this; }
00047 
00048 private:
00049   MLProfilingMemoryType _totalMemory;
00050   MLProfilingMemoryType _currentMemory;
00051   MLProfilingTimeType   _consumedTime;
00052 };
00053 
00054 
00055 #endif // _ML_ACCUMULATED_PROFILE_H_