OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
category.hpp
Go to the documentation of this file.
1 #ifndef CSM_PREFS_CATEGORY_H
2 #define CSM_PREFS_CATEGORY_H
3 
4 #include <string>
5 #include <vector>
6 
7 namespace CSMPrefs
8 {
9  class State;
10  class Setting;
11 
12  class Category
13  {
14  public:
15 
16  typedef std::vector<Setting *> Container;
17  typedef Container::iterator Iterator;
18 
19  private:
20 
22  std::string mKey;
24 
25  public:
26 
27  Category (State *parent, const std::string& key);
28 
29  const std::string& getKey() const;
30 
31  State *getState() const;
32 
33  void addSetting (Setting *setting);
34 
35  Iterator begin();
36 
37  Iterator end();
38 
39  Setting& operator[] (const std::string& key);
40 
41  void update();
42  };
43 }
44 
45 #endif
Container mSettings
Definition: category.hpp:23
void update()
Definition: category.cpp:47
State * mParent
Definition: category.hpp:21
Definition: category.hpp:12
Container::iterator Iterator
Definition: category.hpp:17
std::vector< Setting * > Container
Definition: category.hpp:16
Iterator end()
Definition: category.cpp:33
Category(State *parent, const std::string &key)
Definition: category.cpp:9
Iterator begin()
Definition: category.cpp:28
User settings state.
Definition: state.hpp:36
Setting & operator[](const std::string &key)
Definition: category.cpp:38
Definition: setting.hpp:22
void addSetting(Setting *setting)
Definition: category.cpp:23
State
Definition: state.hpp:6
const std::string & getKey() const
Definition: category.cpp:13
State * getState() const
Definition: category.cpp:18
std::string mKey
Definition: category.hpp:22