1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00
OpenMW/apps/opencs/model/prefs/category.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
739 B
C++
Raw Normal View History

2015-12-08 17:21:58 +01:00
#ifndef CSM_PREFS_CATEGORY_H
2015-12-06 12:06:28 +01:00
#define CSM_PREFS_CATEGORY_H
2022-10-10 13:41:36 +02:00
#include <algorithm>
2015-12-08 12:09:53 +01:00
#include <string>
2015-12-08 17:21:58 +01:00
#include <vector>
2015-12-06 12:06:28 +01:00
namespace CSMPrefs
{
class State;
2015-12-08 17:21:58 +01:00
class Setting;
2015-12-06 12:06:28 +01:00
class Category
{
2015-12-08 17:21:58 +01:00
public:
typedef std::vector<Setting*> Container;
typedef Container::iterator Iterator;
2022-09-22 21:26:05 +03:00
private:
2015-12-06 12:06:28 +01:00
State* mParent;
2015-12-08 17:21:58 +01:00
std::string mKey;
Container mSettings;
public:
Category(State* parent, const std::string& key);
2015-12-06 12:06:28 +01:00
const std::string& getKey() const;
2015-12-08 17:21:58 +01:00
State* getState() const;
2015-12-06 12:06:28 +01:00
2015-12-08 09:56:42 +01:00
void addSetting(Setting* setting);
2015-12-06 12:06:28 +01:00
Iterator begin();
2015-12-08 17:21:58 +01:00
Iterator end();
Setting& operator[](const std::string& key);
2015-12-12 11:58:53 +01:00
void update();
2015-12-06 12:06:28 +01:00
};
}
#endif