Continued refactoring, moving around code.
[aesalon.git] / include / config / Vault.h
blob38a8f650024c1bd05031a23686619b530f273f99
1 /**
2 Aesalon, a tool to visualize a program's behaviour at run-time.
3 Copyright (C) 2010, Aesalon Development Team.
5 Aesalon is distributed under the terms of the GNU GPLv3. For more
6 licensing information, see the file LICENSE included with the distribution.
8 @file include/monitor/config/Vault.h
12 #ifndef AesalonMonitor_Config_Vault_H
13 #define AesalonMonitor_Config_Vault_H
15 #include <string>
16 #include <vector>
18 namespace Monitor {
19 namespace Config {
21 class Vault {
22 public:
23 typedef std::pair<std::string, std::string> KeyPair;
24 virtual ~Vault() {}
26 /** Clears @a key to have no value.
28 virtual void clear(const std::string &key) = 0;
29 /** Sets @a key to @a value.
31 virtual void set(const std::string &key, const std::string &value) = 0;
33 /** Returns the last value that @a key maps to.
35 virtual std::string get(const std::string &key) = 0;
36 /** Stores all the values of @a key in @a values.
38 virtual void get(const std::string &key, std::vector<std::string> &values) = 0;
39 /** Places the names of all strings that match @a pattern into @a keys. Note that
40 @a keys will not be cleared.
42 virtual void match(const std::string &pattern, std::vector<KeyPair> &items) = 0;
45 } // namespace Config
46 } // namespace Monitor
48 #endif