MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
mlMetaProfilePtr.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2010, 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#ifndef ML_META_PROFILE_PTR_H
14#define ML_META_PROFILE_PTR_H
15
16#include <string>
18
19class MLMetaProfile;
20
21
24{
25public:
28
29 void createMetaProfile(const std::string& description);
30
32 {
33 return _metaProfile;
34 }
36 {
37 return *_metaProfile;
38 }
39 const MLMetaProfile& operator*() const
40 {
41 return *_metaProfile;
42 }
43
45 {
46 return _metaProfile;
47 }
48
49 operator bool() const
50 {
51 return _metaProfile != nullptr;
52 }
53
54private:
55 // disallow copying of the metaprofile pointer, because the metaprofile
56 // supports only one callback.
58 MLMetaProfilePtr& operator=(const MLMetaProfilePtr&);
59
60 void metaProfileIsDestroyed();
61
62private:
63 MLMetaProfile* _metaProfile;
64
65 friend class MLMetaProfile;
66};
67
68#endif // _ML_META_PROFILE_PTR_H_
The pointer is automatically reset when the metaprofile is destroyed.
MLMetaProfile * operator->() const
const MLMetaProfile & operator*() const
void createMetaProfile(const std::string &description)
MLMetaProfile * get() const
MLMetaProfile & operator*()
#define MLPROFILINGMANAGER_EXPORT
Target mlrange_cast(Source arg)
Generic version of checked ML casts.