Aeon Engine
c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
Configuration.cpp
1
/*
2
Copyright (C) 2016,2019,2021,2022,2025 Rodrigo Jose Hernandez Cordoba
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16
17
#include <fstream>
18
#include <iostream>
19
#include <exception>
20
#include "Configuration.h"
21
#include "aeongames/Utilities.hpp"
22
#include "aeongames/Resource.hpp"
23
#include "aeongames/ProtoBufHelpers.hpp"
24
25
namespace
AeonGames
26
{
27
28
Configuration::Configuration
(
const
std::string& aFilename )
29
: mFilename ( aFilename )
30
{
31
try
32
{
33
mConfigurationMsg =
34
LoadProtoBufObject<ConfigurationMsg>
( aFilename,
"AEONCFG"
_mgk );
35
}
36
catch
(
const
std::runtime_error& e )
37
{
38
std::cout <<
"Warning: "
<< e.what() << std::endl;
39
}
40
}
41
42
Configuration::~Configuration
()
43
=
default
;
44
}
AeonGames::Configuration::Configuration
Configuration(const std::string &aFilename)
Constructs a Configuration by loading from the specified file.
Definition
Configuration.cpp:28
AeonGames::Configuration::~Configuration
~Configuration()
Destructor.
AeonGames
<- This is here just for the literals
Definition
AABB.hpp:31
AeonGames::LoadProtoBufObject
void LoadProtoBufObject(T &t, const void *aData, size_t aSize, uint64_t aMagick)
Loads a Protocol Buffer Object from a meory buffer into the provided reference.
Definition
ProtoBufHelpers.hpp:125
engine
core
Configuration.cpp
Generated by
1.16.1