1 /*
2  * Copyright (C) 2007-2015 Paul Davis <paul@linuxaudiosystems.com>
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 along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_profile_h__
20 #define __ardour_profile_h__
21 
22 #include <boost/dynamic_bitset.hpp>
23 #include <stdint.h>
24 
25 #include "ardour/libardour_visibility.h"
26 
27 namespace ARDOUR {
28 
29 class LIBARDOUR_API RuntimeProfile {
30 public:
31 	enum Element {
32 		SmallScreen,
33 		SinglePackage,
34 		Mixbus,
35 		LastElement,
36 	};
37 
RuntimeProfile()38     RuntimeProfile() { bits.resize (LastElement); }
~RuntimeProfile()39     ~RuntimeProfile() {}
40 
set_small_screen()41     void set_small_screen() { bits[SmallScreen] = true; }
get_small_screen()42     bool get_small_screen() const { return bits[SmallScreen]; }
43 
get_mixbus()44     bool get_mixbus() const { return bits[Mixbus]; }
set_mixbus()45     void set_mixbus() { bits[Mixbus] = true; }
46 
set_single_package()47     void set_single_package () { bits[SinglePackage] = true; }
get_single_package()48     bool get_single_package () const { return bits[SinglePackage]; }
49 
50 private:
51     boost::dynamic_bitset<uint64_t> bits;
52 
53 };
54 
55 LIBARDOUR_API extern RuntimeProfile* Profile;
56 
57 }; // namespace ARDOUR
58 
59 #endif /* __ardour_profile_h__ */
60