MeVisLab Toolbox Reference
mlCountProfile.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2009, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13// Class for collecting counting profiling information.
14
15#ifndef ML_COUNT_PROFILE_H
16#define ML_COUNT_PROFILE_H
17
19#include <string>
20
21
22typedef unsigned int MLProfilingCountType;
23
25{
26public:
27 MLCountProfile(const std::string& shortDescription_) : _shortDescription(shortDescription_) { reset(); }
28 void reset() { _value = 0; }
29 void increment() { ++_value; }
30 MLProfilingCountType value() const { return _value; }
31
32 const std::string& shortDescription() const { return _shortDescription; }
33 const std::string& description() const { return _description; }
34 void setDescription(const std::string& description_) { _description = description_; }
35
36private:
38 std::string _description;
39 std::string _shortDescription;
40};
41
42#endif // _ML_COUNT_PROFILE_H_
MLCountProfile(const std::string &shortDescription_)
const std::string & description() const
MLProfilingCountType value() const
const std::string & shortDescription() const
void setDescription(const std::string &description_)
unsigned int MLProfilingCountType
#define MLPROFILINGMANAGER_EXPORT
Target mlrange_cast(Source arg)
Generic version of checked ML casts.