当前位置: 首页>>代码示例>>C++>>正文


C++ CStringList::RemoveEmpty方法代码示例

本文整理汇总了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;
}
开发者ID:joobog,项目名称:ppsim,代码行数:101,代码来源:cbp2make.cpp


注:本文中的CStringList::RemoveEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。