Began refactoring the source properly this time 'round.
[aesalon.git] / include / config / Vault.h
blob7cca9496a64c1839caf01bcefe47051665441573
1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file include/config/Vault.h
8 */
10 #ifndef AesalonConfig_Vault_H
11 #define AesalonConfig_Vault_H
13 #include <map>
14 #include <string>
15 #include <vector>
17 namespace Config {
19 class Vault {
20 public:
21 typedef std::pair<std::string, std::string> KeyPair;
22 private:
23 typedef std::multimap<std::string, std::string> DataMap;
24 DataMap m_dataMap;
25 public:
26 Vault();
28 void clear(const std::string &key);
29 void set(const std::string &key, const std::string &value);
31 std::string get(const std::string &key);
33 void get(const std::string &key, std::vector<std::string> &values);
35 void match(const std::string &pattern, std::vector<KeyPair> &values);
36 private:
37 bool matches(const std::string &string, const std::string &pattern);
40 } // namespace Config
42 #endif