diff options
author | Brad King <brad.king@kitware.com> | 2015-04-07 21:14:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-07 21:15:04 (GMT) |
commit | 3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94 (patch) | |
tree | d0372265c5b1f07f9b1a8a6cc9bedf96bed2dbcb /Source/cmCacheManager.h | |
parent | 9410e24a4ad3a21b2c27d057798f723e88d14d45 (diff) | |
download | CMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.zip CMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.tar.gz CMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.tar.bz2 |
Revert topic 'refactor-cache-api'
This topic was never tested without some follow-up commits. The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
Diffstat (limited to 'Source/cmCacheManager.h')
-rw-r--r-- | Source/cmCacheManager.h | 77 |
1 files changed, 1 insertions, 76 deletions
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index 2d3f6e5..f7f8776 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -137,82 +137,7 @@ public: CacheEntryType& type); ///! Get a value from the cache given a key - const char* GetInitializedCacheValue(const std::string& key) const; - - const char* GetCacheEntryValue(const std::string& key) - { - cmCacheManager::CacheIterator it = this->GetCacheIterator(key.c_str()); - if (it.IsAtEnd()) - { - return 0; - } - return it.GetValue().c_str(); - } - - const char* GetCacheEntryProperty(std::string const& key, - std::string const& propName) - { - return this->GetCacheIterator(key.c_str()).GetProperty(propName); - } - - CacheEntryType GetCacheEntryType(std::string const& key) - { - return this->GetCacheIterator(key.c_str()).GetType(); - } - - bool GetCacheEntryPropertyAsBool(std::string const& key, - std::string const& propName) - { - return this->GetCacheIterator(key.c_str()).GetPropertyAsBool(propName); - } - - void SetCacheEntryProperty(std::string const& key, - std::string const& propName, - std::string const& value) - { - this->GetCacheIterator(key.c_str()).SetProperty(propName, value.c_str()); - } - - void SetCacheEntryBoolProperty(std::string const& key, - std::string const& propName, - bool value) - { - this->GetCacheIterator(key.c_str()).SetProperty(propName, value); - } - - void SetCacheEntryValue(std::string const& key, - std::string const& value) - { - this->GetCacheIterator(key.c_str()).SetValue(value.c_str()); - } - - void RemoveCacheEntryProperty(std::string const& key, - std::string const& propName) - { - this->GetCacheIterator(key.c_str()).SetProperty(propName, (void*)0); - } - - void AppendCacheEntryProperty(std::string const& key, - std::string const& propName, - std::string const& value, - bool asString = false) - { - this->GetCacheIterator(key.c_str()).AppendProperty(propName, - value.c_str(), - asString); - } - - std::vector<std::string> GetCacheEntryKeys() - { - std::vector<std::string> definitions; - definitions.reserve(this->GetSize()); - cmCacheManager::CacheIterator cit = this->GetCacheIterator(); - for ( cit.Begin(); !cit.IsAtEnd(); cit.Next() ) - { - definitions.push_back(cit.GetName()); - } - return definitions; - } + const char* GetCacheValue(const std::string& key) const; /** Get the version of CMake that wrote the cache. */ unsigned int GetCacheMajorVersion() const |