diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-23 20:40:29 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-23 20:40:29 (GMT) |
commit | 90e56122989f4021e9fbabd3299ea783b80a2c61 (patch) | |
tree | 4180b9c4c858bee3bdea327b301cea187adbf38c /Source/cmCacheManager.h | |
parent | 619dd8c4791850f3fe4d564d32f8285cb027b4fc (diff) | |
download | CMake-90e56122989f4021e9fbabd3299ea783b80a2c61.zip CMake-90e56122989f4021e9fbabd3299ea783b80a2c61.tar.gz CMake-90e56122989f4021e9fbabd3299ea783b80a2c61.tar.bz2 |
ENH: new GUI editor for cmake cache file
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r-- | Source/cmCacheManager.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 11cd592..f5ded99 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 |