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