nomlib
Toggle main menu visibility
Loading...
Searching...
No Matches
include
nomlib
system
init.hpp
1
/******************************************************************************
2
3
nomlib - C++11 cross-platform game engine
4
5
Copyright (c) 2013, 2014 Jeffrey Carpenter <i8degrees@gmail.com>
6
All rights reserved.
7
8
Redistribution and use in source and binary forms, with or without
9
modification, are permitted provided that the following conditions are met:
10
11
1. Redistributions of source code must retain the above copyright notice, this
12
list of conditions and the following disclaimer.
13
2. Redistributions in binary form must reproduce the above copyright notice,
14
this list of conditions and the following disclaimer in the documentation
15
and/or other materials provided with the distribution.
16
17
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28
******************************************************************************/
29
#ifndef NOMLIB_SYSTEM_INIT_HPP
30
#define NOMLIB_SYSTEM_INIT_HPP
31
32
#include <iostream>
33
34
#include "export.hpp"
35
#include "nomlib/config.hpp"
36
37
namespace
nom {
38
39
// Forward declarations
40
class
ColorDatabase
;
41
46
class
NOM_EXPORT
SystemColors
47
{
48
public
:
50
static
bool
initialized
(
void
);
51
53
static
void
initialize
(
void
);
54
61
static
ColorDatabase
&
colors
(
void
);
62
64
static
void
shutdown
(
void
);
65
66
private
:
68
static
std::unique_ptr<ColorDatabase>
colors_
;
69
71
static
bool
initialized_
;
72
};
73
77
enum
InitHints
78
{
79
SDL2 = 0x1,
80
SDL2_IMAGE = 0x2,
81
SDL2_TTF = 0x4,
82
84
DefaultInit = 0
85
};
86
97
NOM_EXPORT
bool
init_third_party( uint32 flags );
98
110
NOM_EXPORT
bool
init(
int
argc,
char
* argv[] );
111
126
NOM_EXPORT
void
quit(
void
);
127
128
}
// namespace nom
129
130
#endif
// include guard defined
nom::ColorDatabase
Container for accessing colors by name (string).
Definition
ColorDatabase.hpp:45
nom::SystemColors
Class interface for accessing global color resources.
Definition
init.hpp:47
nom::SystemColors::colors
static ColorDatabase & colors(void)
Get an object reference to the global color database.
nom::SystemColors::initialize
static void initialize(void)
Create the global color database.
nom::SystemColors::shutdown
static void shutdown(void)
Destructor.
nom::SystemColors::initialized
static bool initialized(void)
Get the status of the global color database.
nom::SystemColors::colors_
static std::unique_ptr< ColorDatabase > colors_
The global color database for use by the engine and end-user.
Definition
init.hpp:68
nom::SystemColors::initialized_
static bool initialized_
Track object's state in order to ensure one-time initialization.
Definition
init.hpp:71
Generated on
for nomlib by
1.18.0