summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-11 18:05:45 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-11 18:05:45 (GMT)
commitbef93dc5c1cd7985013c9df096efbaa9b79dd7ac (patch)
tree4c028cecff3e8b237edf794b93852e42fefa2e1b /Source/CursesDialog/cmCursesCacheEntryComposite.cxx
parentbfdf8f7dcdbefe408adecd903fd669f62ad4815b (diff)
downloadCMake-bef93dc5c1cd7985013c9df096efbaa9b79dd7ac.zip
CMake-bef93dc5c1cd7985013c9df096efbaa9b79dd7ac.tar.gz
CMake-bef93dc5c1cd7985013c9df096efbaa9b79dd7ac.tar.bz2
Couple of changes: cache variables now have a map of properties. ADVANCED and HELPSTRING are now properties of cache variable, IsAdvanced is gone, so is GetCacheEntry, since cache entries are now all private. To access them, you use the iterator. -ADVANCED cache entries are gone and are replaced by the property of cache variables. The cache file still looks the same, but the -ADVANCED cache entries are created when writing file. MarkAsAdvanced and VariableRequires are fixed. So are curses gui and wizard
Diffstat (limited to 'Source/CursesDialog/cmCursesCacheEntryComposite.cxx')
-rw-r--r--Source/CursesDialog/cmCursesCacheEntryComposite.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
index 8c11aee..8804a03 100644
--- a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
+++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx
@@ -34,7 +34,7 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key,
}
cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
- const char* key, const cmCacheManager::CacheEntry& value, bool isNew,
+ const char* key, const cmCacheManager::CacheIterator& it, bool isNew,
int labelwidth, int entrywidth)
: m_Key(key), m_LabelWidth(labelwidth), m_EntryWidth(entrywidth)
{
@@ -49,11 +49,11 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
}
m_Entry = 0;
- switch ( value.m_Type )
+ switch ( it.GetType() )
{
case cmCacheManager::BOOL:
m_Entry = new cmCursesBoolWidget(m_EntryWidth, 1, 1, 1);
- if (cmSystemTools::IsOn(value.m_Value.c_str()))
+ if (cmSystemTools::IsOn(it.GetValue()))
{
static_cast<cmCursesBoolWidget*>(m_Entry)->SetValueAsBool(true);
}
@@ -65,17 +65,20 @@ cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(
case cmCacheManager::PATH:
m_Entry = new cmCursesPathWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesPathWidget*>(m_Entry)->SetString(
- value.m_Value.c_str());
+ it.GetValue());
break;
case cmCacheManager::FILEPATH:
m_Entry = new cmCursesFilePathWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesFilePathWidget*>(m_Entry)->SetString(
- value.m_Value.c_str());
+ it.GetValue());
break;
case cmCacheManager::STRING:
m_Entry = new cmCursesStringWidget(m_EntryWidth, 1, 1, 1);
static_cast<cmCursesStringWidget*>(m_Entry)->SetString(
- value.m_Value.c_str());
+ it.GetValue());
+ break;
+ case cmCacheManager::UNINITIALIZED:
+ cmSystemTools::Error("Found an undefined variable: ", it.GetName());
break;
default:
// TODO : put warning message here