From 6eee24634bc1791a64f8146c0f79c769eb9dfb83 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 10 Jun 2016 09:34:49 +0200 Subject: [PATCH] cmCacheEntry: Retrieve all properties of cache entries --- Source/cmCacheManager.cxx | 10 ++++++++++ Source/cmCacheManager.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 676e84a2a..233d9cae7 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -539,6 +539,11 @@ void cmCacheManager::CacheIterator::Next() } } +std::vector cmCacheManager::CacheIterator::GetPropertyList() const +{ + return this->GetEntry().GetPropertyList(); +} + void cmCacheManager::CacheIterator::SetValue(const char* value) { if (this->IsAtEnd()) { @@ -558,6 +563,11 @@ bool cmCacheManager::CacheIterator::GetValueAsBool() const return cmSystemTools::IsOn(this->GetEntry().Value.c_str()); } +std::vector cmCacheManager::CacheEntry::GetPropertyList() const +{ + return this->Properties.GetPropertyList(); +} + const char* cmCacheManager::CacheEntry::GetProperty( const std::string& prop) const { diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index e9b80cb6f..153e9575c 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -38,6 +38,7 @@ private: std::string Value; cmState::CacheEntryType Type; cmPropertyMap Properties; + std::vector GetPropertyList() const; const char* GetProperty(const std::string&) const; void SetProperty(const std::string& property, const char* value); void AppendProperty(const std::string& property, const char* value, @@ -60,6 +61,7 @@ public: bool IsAtEnd() const; void Next(); std::string GetName() const { return this->Position->first; } + std::vector GetPropertyList() const; const char* GetProperty(const std::string&) const; bool GetPropertyAsBool(const std::string&) const; bool PropertyExists(const std::string&) const;