Omnidome
Fulldome Mapping Software Toolkit
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
include
omni
input
Controller.h
Go to the documentation of this file.
1
/* Copyright (c) 2014-2015 "Omnidome" by cr8tr
2
* Dome Mapping Projection Software (http://omnido.me).
3
* Omnidome was created by Michael Winkelmann aka Wilston Oreo (@WilstonOreo)
4
*
5
* This file is part of Omnidome.
6
*
7
* Omnidome is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU Affero General Public License as
9
* published by the Free Software Foundation, either version 3 of the
10
* License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU Affero General Public License for more details.
16
* You should have received a copy of the GNU Affero General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef OMNI_INPUT_CONTROLLER_H_
21
#define OMNI_INPUT_CONTROLLER_H_
22
23
#include <unordered_map>
24
#include "
Interface.h
"
25
26
namespace
omni {
27
namespace
input {
28
/**@brief Input controller controls which inputs are currently active
29
@detail Implemented as a singleton
30
**/
31
class
Controller
{
32
public
:
33
static
Controller
*
instance
();
34
35
bool
isActive
(
input::Interface
*)
const
;
36
int
activeCount
(
input::Interface
*)
const
;
37
38
void
add
(
input::Interface
*);
39
40
void
remove
(
input::Interface
*);
41
42
/// Activate input
43
void
activate
(
input::Interface
*);
44
45
/// Deactivate input
46
void
deactivate
(
input::Interface
*);
47
48
private
:
49
Controller
();
50
~Controller
();
51
52
static
Controller
*
instance_
;
53
54
std::unordered_map<input::Interface *, int>
usage_
;
55
};
56
}
57
}
58
59
#endif
/* OMNI_INPUT_CONTROLLER_H_ */
omni::input::Controller::~Controller
~Controller()
Definition:
Controller.cpp:30
omni::input::Controller::activate
void activate(input::Interface *)
Activate input.
Definition:
Controller.cpp:50
omni::input::Controller::deactivate
void deactivate(input::Interface *)
Deactivate input.
Definition:
Controller.cpp:65
omni::input::Controller::Controller
Controller()
Definition:
Controller.cpp:26
omni::input::Controller
Input controller controls which inputs are currently active Implemented as a singleton.
Definition:
Controller.h:31
omni::input::Controller::activeCount
int activeCount(input::Interface *) const
Definition:
Controller.cpp:44
omni::input::Interface
Generic input interface.
Definition:
Interface.h:53
omni::input::Controller::instance
static Controller * instance()
Definition:
Controller.cpp:33
omni::input::Controller::isActive
bool isActive(input::Interface *) const
Definition:
Controller.cpp:40
omni::input::Controller::instance_
static Controller * instance_
Definition:
Controller.h:52
Interface.h
omni::input::Controller::usage_
std::unordered_map< input::Interface *, int > usage_
Definition:
Controller.h:54
omni::input::Controller::add
void add(input::Interface *)
Definition:
Controller.cpp:76
Generated on Fri May 20 2016 13:38:19 for Omnidome by
1.8.6