roadrunner  2.6.0
Fast simulator for SBML models
rrIniSection.h
1 #ifndef rrIniSectionH
2 #define rrIniSectionH
3 #include <vector>
4 #include <string>
5 #include "rrExporter.h"
6 #include "rrIniKey.h"
7 
8 namespace rr
9 {
10 
11 class IniKey;
12 typedef std::vector<IniKey*> KeyList;
13 typedef KeyList::iterator KeyItor;
14 typedef std::vector<std::string> NonKeyList;
15 typedef NonKeyList::iterator NonKeyItor;
16 
17 
23 class RR_DECLSPEC IniSection
24 {
25  private:
26  bool mIsDirty;
27 
28  public:
29  bool mIsUsed;
30  std::string mName;
31  std::string mComment;
32  KeyList mKeys; //std::vector of pointers to keys
33  NonKeyList mNonKeys; //std::vector of pointers to non_keys
34 
35  IniSection();
36  IniSection(const std::string& nameValueString, const char& sep);
37  ~IniSection();
38  IniKey* CreateKey(const std::string& _keyName, const std::string& Value = "", const std::string& Comment = "");
39  IniKey* GetKey(const int& i);
40  IniKey* GetKey(const std::string& keyName, bool create = false);
41  size_t KeyCount(){return mKeys.size();}
42  size_t NonKeyCount(){return mNonKeys.size();}
43  void Clear(){mKeys.clear(); mNonKeys.clear();}
44  std::string GetNonKeysAsString();
45  std::string AsString();
46 };
48 }
49 #endif