summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.h
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-04-24 20:49:12 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-04-24 20:49:12 (GMT)
commit73f04d1409ec4dfcb3b8db3e104da2a894d019a2 (patch)
treee1578688252c8a50fb307d60045379a53a02d646 /Source/cmCacheManager.h
parentb5746484e4c396489b707e0f8b4d1f539e62a965 (diff)
downloadCMake-73f04d1409ec4dfcb3b8db3e104da2a894d019a2.zip
CMake-73f04d1409ec4dfcb3b8db3e104da2a894d019a2.tar.gz
CMake-73f04d1409ec4dfcb3b8db3e104da2a894d019a2.tar.bz2
many fixes and cleanup and features
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r--Source/cmCacheManager.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index 2da1817..01bf98b 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -35,8 +35,8 @@ public:
std::string m_Value;
CacheEntryType m_Type;
};
- typedef std::map<std::string, CacheEntry> CacheEntryMap;
public:
+ typedef std::map<std::string, CacheEntry> CacheEntryMap;
/**
* Types for the cache entries. These are useful as
* hints for a cache editor program. Path should bring
@@ -53,7 +53,7 @@ public:
bool LoadCache(cmMakefile*);
//! Save cache for given makefile. Saves to ouput home CMakeCache.txt
- bool SaveCache(cmMakefile*);
+ bool SaveCache(cmMakefile*) const;
//! Add an entry into the cache
void AddCacheEntry(const char* key, const char* value, CacheEntryType type);
@@ -64,18 +64,22 @@ public:
//! Remove an entry from the cache
void RemoveCacheEntry(const char* key);
+ //! Print the cache to a stream
+ CacheEntry *GetCacheEntry(const char *key);
+
//! Get a value from the cache given a key
- const char* GetCacheValue(const char* key);
+ const char* GetCacheValue(const char* key) const;
+
//! Test a boolean cache entry to see if it is true or false, returns false
// if no entry.
- bool IsOn(const char*);
+ bool IsOn(const char*) const;
//! Print the cache to a stream
- void PrintCache(std::ostream&);
-
+ void PrintCache(std::ostream&) const;
+
//! Get the cache map ivar.
- CacheEntryMap GetCacheMap() { return m_Cache; }
-
+ const CacheEntryMap &GetCacheMap() const { return m_Cache; }
+
private:
static cmCacheManager* s_Instance;
CacheEntryMap m_Cache;