V-Gears 0
Free Final Fantasy VII engine.
ConfigVarHandler.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <OgreSingleton.h>
19#include <vector>
20#include "ConfigVar.h"
21
25class ConfigVarHandler : public Ogre::Singleton<ConfigVarHandler>{
26
27 public:
28
33
40 ConfigVar* Find(const Ogre::String& name) const;
41
47 unsigned int GetConfigVarNumber() const;
48
55 ConfigVar* GetConfigVar(const unsigned int i) const;
56
57 private:
58
62 std::vector<ConfigVar*> config_vars_;
63};
Configuration variable hanlder.
Definition: ConfigVarHandler.h:25
ConfigVarHandler()
Constructor.
Definition: ConfigVarHandler.cpp:23
ConfigVar * GetConfigVar(const unsigned int i) const
Retrieves a configuration variable by index.
Definition: ConfigVarHandler.cpp:41
std::vector< ConfigVar * > config_vars_
List of configuration variables.
Definition: ConfigVarHandler.h:62
unsigned int GetConfigVarNumber() const
Counts the configuration variables.
Definition: ConfigVarHandler.cpp:39
ConfigVar * Find(const Ogre::String &name) const
Finds a variable by name.
Definition: ConfigVarHandler.cpp:33
A configuration variable.
Definition: ConfigVar.h:25
Ogre::String String
Definition: TypeDefine.h:37