Eris  1.4.0
ActiveMarker.h
1 /*
2  Copyright (C) 2017 Erik Ogenvik
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software Foundation,
16  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef ERIS_ACTIVEMARKER_H
20 #define ERIS_ACTIVEMARKER_H
21 
22 #include <boost/noncopyable.hpp>
23 #include <memory>
24 
25 namespace Eris {
33 class ActiveMarker : private boost::noncopyable {
34 public:
38  ActiveMarker();
39 
43  ~ActiveMarker();
44 
49  operator std::shared_ptr<bool>();
50 
51  const std::shared_ptr<bool> getMarker() const;
52 
53  ActiveMarker& operator=(ActiveMarker&& rhs);
54 
55 private:
56  std::shared_ptr<bool> m_marker;
57 };
58 
59 }
60 
61 #endif //ERIS_ACTIVEMARKER_H
ActiveMarker()
Ctor.
Definition: ActiveMarker.cpp:23
~ActiveMarker()
Dtor.
Definition: ActiveMarker.cpp:27
Every Eris class and type lives inside the Eris namespace; certain utility functions live in the Util...
Definition: Account.cpp:34
To be used with EventService::runOnMainThread.
Definition: ActiveMarker.h:33