MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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:
28 : _shortDescription(shortDescription_)
29 {
30 reset();
31 }
32 void reset()
33 {
34 _value = 0;
35 }
36 void increment()
37 {
38 ++_value;
39 }
41 {
42 return _value;
43 }
44
45 const std::string& shortDescription() const
46 {
47 return _shortDescription;
48 }
49 const std::string& description() const
50 {
51 return _description;
52 }
53 void setDescription(const std::string& description_)
54 {
55 _description = description_;
56 }
57
58private:
60 std::string _description;
61 std::string _shortDescription;
62};
63
64#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.