TrueReality  v0.1.1912
SystemControls.cpp
Go to the documentation of this file.
1 /*
2 * True Reality Open Source Game and Simulation Engine
3 * Copyright © 2021 Acid Rain Studios LLC
4 *
5 * This library is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License as published by the Free
7 * Software Foundation; either version 3.0 of the License, or (at your option)
8 * any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * @author Maxim Serebrennik
20 */
21 
22 #include <trCore/SystemControls.h>
23 
24 namespace trCore
25 {
26  IMPLEMENT_ENUM(SystemControls)
27 
28 
29  SystemControls::SystemControls(const std::string& name, unsigned int id) : EnumerationNumeric(name, id)
30  {
31  AddInstance(this);
32  }
33 
35  const SystemControls SystemControls::PAUSE("PAUSE", 1);
36  const SystemControls SystemControls::UNPAUSE("UNPAUSE", 2);
37  const SystemControls SystemControls::SPEED_UP("SPEED_UP", 3);
38  const SystemControls SystemControls::SPEED_DOWN("SPEED_DOWN", 4);
39  const SystemControls SystemControls::SET_TIME_SCALE("SET_TIME_SCALE", 5);
40  const SystemControls SystemControls::SHUT_DOWN("SHUT_DOWN", 6);
42 }
static const SystemControls PAUSE
Pauses the system.
static const SystemControls UNPAUSE
Unpauses the system.
static const SystemControls SPEED_UP
Speeds up the system.
#define IMPLEMENT_ENUM(EnumType)
A macro that defines implement enum.
ENUM specifying various system control states.
static const SystemControls SPEED_DOWN
Slows down the system.
static const SystemControls SET_TIME_SCALE
The set speed of the system.
static const SystemControls SHUT_DOWN
Shuts down the system loop and exits the program.