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

46 lines
789 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
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;
private:
2015-12-06 12:06:28 +01:00
State *mParent;
std::string mKey;
2015-12-08 17:21:58 +01:00
Container mSettings;
2015-12-06 12:06:28 +01:00
public:
2015-12-08 09:56:42 +01:00
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;
void addSetting (Setting *setting);
Iterator begin();
Iterator end();
2015-12-11 11:50:06 +01:00
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