Add method to get the local scope variables
This commit is contained in:
parent
f794d589a4
commit
52f9637174
@ -84,6 +84,19 @@ const char* cmDefinitions::Set(const char* key, const char* value)
|
|||||||
return def.Exists? def.c_str() : 0;
|
return def.Exists? def.c_str() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
std::set<cmStdString> cmDefinitions::LocalKeys() const
|
||||||
|
{
|
||||||
|
std::set<cmStdString> keys;
|
||||||
|
// Consider local definitions.
|
||||||
|
for(MapType::const_iterator mi = this->Map.begin();
|
||||||
|
mi != this->Map.end(); ++mi)
|
||||||
|
{
|
||||||
|
keys.insert(mi->first);
|
||||||
|
}
|
||||||
|
return keys;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmDefinitions cmDefinitions::Closure() const
|
cmDefinitions cmDefinitions::Closure() const
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,9 @@ public:
|
|||||||
/** Set (or unset if null) a value associated with a key. */
|
/** Set (or unset if null) a value associated with a key. */
|
||||||
const char* Set(const char* key, const char* value);
|
const char* Set(const char* key, const char* value);
|
||||||
|
|
||||||
|
/** Get the set of all local keys. */
|
||||||
|
std::set<cmStdString> LocalKeys() const;
|
||||||
|
|
||||||
/** Compute the closure of all defined keys with values.
|
/** Compute the closure of all defined keys with values.
|
||||||
This flattens the scope. The result has no parent. */
|
This flattens the scope. The result has no parent. */
|
||||||
cmDefinitions Closure() const;
|
cmDefinitions Closure() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user