summaryrefslogtreecommitdiff
path: root/Source/cmCacheManager.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-04-23 16:40:29 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2001-04-23 16:40:29 -0400
commit90e56122989f4021e9fbabd3299ea783b80a2c61 (patch)
tree4180b9c4c858bee3bdea327b301cea187adbf38c /Source/cmCacheManager.h
parent619dd8c4791850f3fe4d564d32f8285cb027b4fc (diff)
downloadcmake-90e56122989f4021e9fbabd3299ea783b80a2c61.tar.gz
ENH: new GUI editor for cmake cache file
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r--Source/cmCacheManager.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index 11cd5922b6..f5ded995d7 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -28,6 +28,15 @@ class cmMakefile;
class cmCacheManager
{
public:
+ enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL };
+ class CacheEntry
+ {
+ public:
+ std::string m_Value;
+ CacheEntryType m_Type;
+ };
+ typedef std::map<std::string, CacheEntry> CacheEntryMap;
+public:
/**
* Types for the cache entries. These are useful as
* hints for a cache editor program. Path should bring
@@ -35,7 +44,6 @@ public:
* text entry box, FILEPATH is a full path to a file which
* can be different than just a path input
*/
- enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL };
static CacheEntryType StringToType(const char*);
//! Singleton pattern get instance of the cmCacheManager.
static cmCacheManager* GetInstance();
@@ -49,20 +57,21 @@ public:
//! Add an entry into the cache
void AddCacheEntry(const char* key, const char* value, CacheEntryType type);
+ //! Remove an entry from the cache
+ void RemoveCacheEntry(const char* key);
+
//! Get a value from the cache given a key
const char* GetCacheValue(const char* key);
//! Print the cache to a stream
void PrintCache(std::ostream&);
+
+ //! Get the cache map ivar.
+ CacheEntryMap GetCacheMap() { return m_Cache; }
+
private:
static cmCacheManager* s_Instance;
- class CacheEntry
- {
- public:
- std::string m_Value;
- CacheEntryType m_Type;
- };
- std::map<std::string, CacheEntry> m_Cache;
+ CacheEntryMap m_Cache;
};
#endif