本文整理汇总了C++中CStringList::RemoveEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ CStringList::RemoveEmpty方法的具体用法?C++ CStringList::RemoveEmpty怎么用?C++ CStringList::RemoveEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStringList
的用法示例。
在下文中一共展示了CStringList::RemoveEmpty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Configure
//.........这里部分代码省略.........
// if both variable and field names are defined, remove the field
var->Remove(PSC().VarNamed("-field").GetString());
}
else
{
// if variable name is defined, but field name is not, remove the variable
vset->Remove(var_name);
}
}
else
{
// if both variable and field names are not defined,
// but set name is defined, remove the entire set
if (PSC().VarDefined("-set"))
{
m_BuildManager.Config().GlobalVariables().Remove(set_name);
}
}
} // remove variable
} // config variable
if (config_item < 0) m_BuildManager.Config().Show();
std::cout<<"Saving configuration: "<<cfg_name.GetCString()<<std::endl;
m_BuildManager.Config().Save(cfg_name);
return false;
} // config
//
bool os_all = PSC().VarDefined("--all-os");
os_all = os_all || (os_unix && os_windows && os_mac);
os_unix = os_unix || os_all;
os_windows = os_windows || os_all;
os_mac = os_mac || os_all;
bool os_none = !os_all && !os_unix && !os_windows && !os_mac;
if (os_none)
{
#ifdef OS_UNIX
os_unix = true;
#endif
#ifdef OS_WIN
os_windows = true;
#endif
#ifdef OS_MAC
os_mac = true;
#endif
}
if (os_unix)
{
CPlatform *p = m_BuildManager.Config().Platforms().Find(CPlatform::OS_Unix);
if (p) p->Active() = true;
}
if (os_windows)
{
CPlatform *p = m_BuildManager.Config().Platforms().Find(CPlatform::OS_Windows);
if (p) p->Active() = true;
}
if (os_mac)
{
CPlatform *p = m_BuildManager.Config().Platforms().Find(CPlatform::OS_Mac);
if (p) p->Active() = true;
}
//
{
CString vset_name = PSC().VarNamed("-set").GetString();
CGlobalVariableSet *vset = m_BuildManager.Config().GlobalVariables().Find(vset_name);
if (0!=vset)
{
vset->Active() = true;
}
}
m_BuildManager.Config().FlatObjectNames() = PSC().VarDefined("--flat-objects");
m_BuildManager.Config().FlatObjectPaths() = PSC().VarDefined("--flat-objpath");
m_BuildManager.Config().MultilineObjects() = PSC().VarDefined("--wrap-objects");
m_BuildManager.Config().MultilineOptions() = PSC().VarDefined("--wrap-options");
m_BuildManager.Config().IncludeDependencies() = PSC().VarDefined("--with-deps");
{
CString target_case_name = PSC().VarNamed("--target-case").GetString();
m_BuildManager.Config().TargetNameCase() =
GuessStr(target_case_name,"keep lower upper",target_case_name,false);
}
{
CString macros_case_name = PSC().VarNamed("--macros-case").GetString();
m_BuildManager.Config().MacroVariableCase() =
GuessStr(macros_case_name,"keep lower upper",macros_case_name,false);
}
{
CString quote_path_name = PSC().VarNamed("--quote-path").GetString();
m_BuildManager.Config().QuotePathMode() =
GuessStr(quote_path_name,"auto never always",quote_path_name,false);
}
m_BuildManager.Config().KeepObjectDirectories() = PSC().VarDefined("--keep-objdir");
m_BuildManager.Config().KeepOutputDirectories() = PSC().VarDefined("--keep-outdir");
{
CStringList targets;
ParseStr(PSC().VarNamed("-targets").GetString(),',',targets);
targets.RemoveEmpty();
targets.RemoveDuplicates();
m_BuildManager.Config().Targets() = targets;
}
//if (BeVerbose()) PSC().Print(std::cout);
return true;
}