summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-12 14:49:05 (GMT)
committerBrad King <brad.king@kitware.com>2009-03-12 14:49:05 (GMT)
commit1b43bea91c9b6dd4d83b55631273db648766463d (patch)
tree83dca246e9319af44da5b60b8543c444abad713d /Source/cmCacheManager.h
parent0460e31e67a09091fa92d3b7a2ecde14cc81eaee (diff)
downloadCMake-1b43bea91c9b6dd4d83b55631273db648766463d.zip
CMake-1b43bea91c9b6dd4d83b55631273db648766463d.tar.gz
CMake-1b43bea91c9b6dd4d83b55631273db648766463d.tar.bz2
ENH: Refactor cache entry writing and reading
This factors out duplicated code into reusable methods, thus simplifying writing and reading of cache entry help strings, keys, values, and properties.
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r--Source/cmCacheManager.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index 4bcb982..4d7254d 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -176,8 +176,15 @@ protected:
unsigned int CacheMinorVersion;
private:
typedef std::map<cmStdString, CacheEntry> CacheEntryMap;
- static void OutputHelpString(std::ofstream& fout,
+ static void OutputHelpString(std::ostream& fout,
const std::string& helpString);
+ static void OutputKey(std::ostream& fout, std::string const& key);
+ static void OutputValue(std::ostream& fout, std::string const& value);
+
+ static const char* PersistentProperties[];
+ bool ReadPropertyEntry(std::string const& key, CacheEntry& e);
+ void WritePropertyEntries(std::ostream& os, CacheIterator const& i);
+
CacheEntryMap Cache;
// Only cmake and cmMakefile should be able to add cache values
// the commands should never use the cmCacheManager directly