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


C++ Document::Cleanup方法代码示例

本文整理汇总了C++中Document::Cleanup方法的典型用法代码示例。如果您正苦于以下问题:C++ Document::Cleanup方法的具体用法?C++ Document::Cleanup怎么用?C++ Document::Cleanup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Document的用法示例。


在下文中一共展示了Document::Cleanup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sMain


//.........这里部分代码省略.........
    path.PrintF(L"%p",sCONFIG_CODEROOT);
  

  const sChar *depPattern = sGetShellParameter(L"D",0);

  projbuffer = path;
  projbuffer.AddPath(sCONFIG_MP_TEMPLATES);
  proj = projbuffer;

  Doc.RootPath.RootPath[OmniPath::PT_SYSTEM]    = path;
  Doc.RootPath.RootPath[OmniPath::PT_SOLUTION]  = path; // was sCONFIG_CODEROOT_WINDOWS, which was sCONFIG_CODEROOT, but doesn't work -r param
  SetTildeExpand(Doc.RootPath.RootPath[OmniPath::PT_MAKEFILE],path);

  configbuffer = path;
  configbuffer.AddPath(sCONFIG_CONFIGFILE);
  Doc.ConfigFile.Scan(configbuffer);
  Doc.ConfigFile.DPrint();

  if(sCmpString(Doc.ConfigFile.VSVersion,L"2008")>=0)
  {
    Doc.VS_Version = 9;
    Doc.VS_ProjectVersion  = 9;
    Doc.VS_SolutionVersion = 10; 
  }

  if(sCmpString(Doc.ConfigFile.VSVersion,L"2010")>=0)
  {
    Doc.VS_ProjExtension = L".vcxproj";
    Doc.VS_Version = 10;
    Doc.VS_ProjectVersion  = 10;
    Doc.VS_SolutionVersion = 11; 
  }

	if(sCmpString(Doc.ConfigFile.VSVersion,L"2012")>=0)
  {
    Doc.VS_ProjExtension = L".vcxproj";
    Doc.VS_Version = 11;
    Doc.VS_ProjectVersion  = 10;
    Doc.VS_SolutionVersion = 11; 
  }

  Doc.IntermediatePath.RootPath[OmniPath::PT_SYSTEM] = Doc.ConfigFile.IntermediateRoot;
  Doc.IntermediatePath.RootPath[OmniPath::PT_SOLUTION] = Doc.ConfigFile.IntermediateRoot;
  SetTildeExpand(Doc.IntermediatePath.RootPath[OmniPath::PT_MAKEFILE],Doc.ConfigFile.IntermediateRoot);

  Doc.OutputPath.RootPath[OmniPath::PT_SYSTEM] = Doc.ConfigFile.OutputRoot;
  Doc.OutputPath.RootPath[OmniPath::PT_SOLUTION] = Doc.ConfigFile.OutputRoot;
  SetTildeExpand(Doc.OutputPath.RootPath[OmniPath::PT_MAKEFILE],Doc.ConfigFile.OutputRoot);

  Doc.VSPlatformMask = 0;
  if(Doc.ConfigFile.Solution & sSLN_WIN32)    Doc.VSPlatformMask |= sVSPLAT_WIN32;
  if(Doc.ConfigFile.Solution & sSLN_WIN64)    Doc.VSPlatformMask |= sVSPLAT_WIN64;
  Doc.ConfMakefile = Document::MF_NONE;
  if(Doc.ConfigFile.Makefile==sMAKE_MINGW)    Doc.ConfMakefile = Document::MF_MINGW;
  if(Doc.ConfigFile.Makefile==sMAKE_LINUX)    Doc.ConfMakefile = Document::MF_LINUX;


  sPrintF(L"makeproject v%d.%d\n",VERSION,REVISION);

  if(sGetShellSwitch(L"vs"))
  {
    sPrint(L"the '-vs' option is obsolete. please use 'altona_config.hpp'\n");
  }
  else if(sGetShellSwitch(L"h")||sGetShellSwitch(L"-help"))
  {
    sPrint(L"makeproject [options]\n");
    sPrint(L"-r path       root (default c:/svn2)\n");
    sPrint(L"-h --help     print this text\n");
    sPrint(L"-p --pretend  don't write destination files\n");
    sPrint(L"-t --test     write to .vsproj.txt\n");
    sPrint(L"-d --debug    output parser tree\n");
    sPrint(L"-v --verbose  more output\n");
    sPrint(L"-l --license  check and fix license header in all sources\n");
    sPrint(L"-c --create   create new files.\n");
    sPrint(L"-D pattern    write dependency graph of matching solutions.\n");
  }
  else if(path)
  {
    if(Doc.ParseGlobal(proj))
    {
      sPrintF(L"Scan for projects...\n");
      if (Doc.ScanForSolutions(&Doc.RootPath))
      {
        if(Doc.WriteFlag)
          sPrintF(L"Write Projects...\n");

        Doc.WriteProjectsAndSolutions();

        if(depPattern)
        {
          sPrintF(L"Write dependency graphs....\n");
          Doc.WriteDependencyGraphs(depPattern);
        }
        
        sPrintF(L"%d Configurations.\n",Doc.GetConfigCount());
        Doc.Cleanup();
      }
    }
  }
}
开发者ID:Ambrevar,项目名称:fr_public,代码行数:101,代码来源:main.cpp


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