ENH: Get accessor for cache value as boolean
This commit is contained in:
parent
103f115f25
commit
91065673d6
@ -743,6 +743,11 @@ void cmCacheManager::CacheIterator::SetProperty(const char* p, const char* v)
|
|||||||
ent->m_Properties[p] = v;
|
ent->m_Properties[p] = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmCacheManager::CacheIterator::GetValueAsBool() const
|
||||||
|
{
|
||||||
|
return cmSystemTools::IsOn(this->GetEntry().m_Value.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
bool cmCacheManager::CacheIterator::GetPropertyAsBool(const char* property) const
|
bool cmCacheManager::CacheIterator::GetPropertyAsBool(const char* property) const
|
||||||
{
|
{
|
||||||
// make sure it is not at the end
|
// make sure it is not at the end
|
||||||
|
@ -60,6 +60,7 @@ public:
|
|||||||
void SetProperty(const char* property, const char* value);
|
void SetProperty(const char* property, const char* value);
|
||||||
void SetProperty(const char* property, bool value);
|
void SetProperty(const char* property, bool value);
|
||||||
const char* GetValue() const { return this->GetEntry().m_Value.c_str(); }
|
const char* GetValue() const { return this->GetEntry().m_Value.c_str(); }
|
||||||
|
bool GetValueAsBool() const;
|
||||||
void SetValue(const char*);
|
void SetValue(const char*);
|
||||||
CacheEntryType GetType() const { return this->GetEntry().m_Type; }
|
CacheEntryType GetType() const { return this->GetEntry().m_Type; }
|
||||||
bool Initialized() { return this->GetEntry().m_Initialized; }
|
bool Initialized() { return this->GetEntry().m_Initialized; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user