MeVisLabToolboxReference
MeVis/Foundation/Sources/MLProfilingManager/Include/mlCountProfile.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00003 // Class for collecting counting profiling information.
00004 //
00005 // \file    mlCountProfile.h
00006 // \author  Marcus Barann
00007 // \date    7/2009
00008 //
00009 //----------------------------------------------------------------------------------
00010 #ifndef _ML_COUNT_PROFILE_H_
00011 #define _ML_COUNT_PROFILE_H_
00012 
00013 #include "mlProfilingManagerDllExport.h"
00014 #include <string>
00015 
00016 
00017 typedef unsigned int MLProfilingCountType;
00018 
00019 class MLPROFILINGMANAGER_EXPORT MLCountProfile
00020 {
00021 public:
00022   MLCountProfile(const std::string& shortDescription_) : _shortDescription(shortDescription_) { reset(); }
00023   void reset() { _value = 0; }
00024   void increment() { ++_value; }
00025   MLProfilingCountType value() const { return _value; }
00026   
00027   const std::string& shortDescription() const { return _shortDescription; }
00028   const std::string& description() const { return _description; }
00029   void setDescription(const std::string& description_) { _description = description_; }
00030   
00031 private:
00032   MLProfilingCountType _value;
00033   std::string          _description;
00034   std::string          _shortDescription;
00035 };
00036 
00037 #endif // _ML_COUNT_PROFILE_H_