msvc_tools_implement.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:23k
源码类别:

生物技术

开发平台:

C/C++

  1. /*
  2.  * ===========================================================================
  3.  * PRODUCTION $Log: msvc_tools_implement.hpp,v $
  4.  * PRODUCTION Revision 1000.2  2004/06/16 17:05:10  gouriano
  5.  * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.14
  6.  * PRODUCTION
  7.  * ===========================================================================
  8.  */
  9. #ifndef PROJECT_TREE_BUILDER__TOOLS_IMPLEMENT__HPP
  10. #define PROJECT_TREE_BUILDER__TOOLS_IMPLEMENT__HPP
  11. /* $Id: msvc_tools_implement.hpp,v 1000.2 2004/06/16 17:05:10 gouriano Exp $
  12.  * ===========================================================================
  13.  *
  14.  *                            PUBLIC DOMAIN NOTICE
  15.  *               National Center for Biotechnology Information
  16.  *
  17.  *  This software/database is a "United States Government Work" under the
  18.  *  terms of the United States Copyright Act.  It was written as part of
  19.  *  the author's official duties as a United States Government employee and
  20.  *  thus cannot be copyrighted.  This software/database is freely available
  21.  *  to the public for use. The National Library of Medicine and the U.S.
  22.  *  Government have not placed any restriction on its use or reproduction.
  23.  *
  24.  *  Although all reasonable efforts have been taken to ensure the accuracy
  25.  *  and reliability of the software and data, the NLM and the U.S.
  26.  *  Government do not and cannot warrant the performance or results that
  27.  *  may be obtained by using this software or data. The NLM and the U.S.
  28.  *  Government disclaim all warranties, express or implied, including
  29.  *  warranties of performance, merchantability or fitness for any particular
  30.  *  purpose.
  31.  *
  32.  *  Please cite the author in any work or product based on this material.
  33.  *
  34.  * ===========================================================================
  35.  *
  36.  * Author:  Viatcheslav Gorelenkov
  37.  *
  38.  */
  39. #include <string>
  40. #include <app/project_tree_builder/msvc_project_context.hpp>
  41. #include <app/project_tree_builder/msvc_traits.hpp>
  42. #include <app/project_tree_builder/msvc_prj_utils.hpp>
  43. #include <corelib/ncbienv.hpp>
  44. BEGIN_NCBI_SCOPE
  45. /////////////////////////////////////////////////////////////////////////////
  46. ///
  47. /// CConfigurationImpl --
  48. ///
  49. /// Implementation of IConfiguration interface.
  50. ///
  51. /// Accepts trait class as a template parameter.
  52. template <class ConfTrait> 
  53. class CConfigurationImpl : public IConfiguration
  54. {
  55. public:
  56.     CConfigurationImpl( const string& output_directory, 
  57.                         const string& configuration_name )
  58.                         :m_OutputDirectory  (output_directory),
  59.                          m_ConfigurationName(configuration_name)
  60.     {
  61.     }
  62.     virtual string Name(void) const
  63.     {
  64.     return ConfigName(m_ConfigurationName);
  65.     }
  66.     virtual string OutputDirectory(void) const
  67.     {
  68.     return m_OutputDirectory;
  69.     }
  70.     virtual string IntermediateDirectory(void) const
  71.     {
  72.     return m_ConfigurationName;
  73.     }
  74.     virtual string ConfigurationType(void) const
  75.     {
  76.     return ConfTrait::ConfigurationType();
  77.     }
  78.     virtual string CharacterSet(void) const
  79.     {
  80.     return "2";
  81.     }
  82. private:
  83.     string m_OutputDirectory;
  84.     string m_ConfigurationName;
  85.     CConfigurationImpl(void);
  86.     CConfigurationImpl(const CConfigurationImpl&);
  87.     CConfigurationImpl& operator= (const CConfigurationImpl&);
  88. };
  89. static string s_GetDefaultPreprocessorDefinitions
  90.                             (const SConfigInfo&                   config, 
  91.                              CMsvcPrjGeneralContext::TTargetType  target_type)
  92. {
  93.     string defines = config.m_Debug ? "_DEBUG;" : "NDEBUG;" ;
  94.     switch (target_type) {
  95.     case CMsvcPrjGeneralContext::eLib:
  96.         defines +=  "WIN32;_LIB;";
  97.         break;
  98.     case CMsvcPrjGeneralContext::eExe:
  99.         defines += "WIN32;_CONSOLE;";
  100.         break;
  101.     case CMsvcPrjGeneralContext::eDll:
  102.         defines += "WIN32;_WINDOWS;_USRDLL;";
  103.         break;
  104.     }
  105.     return defines;
  106. }
  107. /////////////////////////////////////////////////////////////////////////////
  108. ///
  109. /// CCompilerToolImpl --
  110. ///
  111. /// Implementation of ICompilerTool interface.
  112. ///
  113. /// Uses msvc makefiles information
  114. class CCompilerToolImpl : public ICompilerTool
  115. {
  116. public:
  117.     typedef CMsvcPrjGeneralContext::TTargetType TTargetType;
  118.     CCompilerToolImpl(const string&            additional_include_dirs,
  119.                       const IMsvcMetaMakefile& project_makefile,
  120.                       const string&            runtimeLibraryOption,
  121.                       const IMsvcMetaMakefile& meta_makefile,
  122.                       const SConfigInfo&       config,
  123.                       TTargetType              target_type,
  124.                       const list<string>&      defines)
  125.     :m_AdditionalIncludeDirectories(additional_include_dirs),
  126.          m_MsvcProjectMakefile         (project_makefile),
  127.          m_RuntimeLibraryOption        (runtimeLibraryOption),
  128.          m_MsvcMetaMakefile            (meta_makefile),
  129.          m_Config                      (config),
  130.          m_TargetType                  (target_type),
  131.          m_Defines                     (defines)
  132.     {
  133.     }
  134.     virtual string Name(void) const
  135.     {
  136.     return "VCCLCompilerTool";
  137.     }
  138. #define SUPPORT_COMPILER_OPTION(opt) 
  139.     virtual string opt(void) const 
  140.     { 
  141.         return GetCompilerOpt(m_MsvcMetaMakefile, 
  142.                               m_MsvcProjectMakefile, 
  143.                               #opt, 
  144.                               m_Config ); 
  145.     }
  146.     SUPPORT_COMPILER_OPTION(Optimization)
  147.     virtual string AdditionalIncludeDirectories(void) const
  148.     {
  149.     return m_AdditionalIncludeDirectories;
  150.     }
  151.     //SUPPORT_COMPILER_OPTION(PreprocessorDefinitions)
  152.     virtual string PreprocessorDefinitions(void) const
  153.     {
  154.         string defines = 
  155.             s_GetDefaultPreprocessorDefinitions(m_Config, m_TargetType);
  156.         ITERATE(list<string>, p, m_Defines) {
  157.             const string& define = *p;
  158.             defines += define;
  159.             defines += ';';
  160.         }
  161.         defines += GetCompilerOpt(m_MsvcMetaMakefile,
  162.                                   m_MsvcProjectMakefile,
  163.                                   "PreprocessorDefinitions",
  164.                                   m_Config );
  165.         return defines;
  166.     }
  167.     SUPPORT_COMPILER_OPTION(MinimalRebuild)
  168.     SUPPORT_COMPILER_OPTION(BasicRuntimeChecks)
  169.     virtual string RuntimeLibrary(void) const
  170.     {
  171.     return m_RuntimeLibraryOption;
  172.     }
  173.     SUPPORT_COMPILER_OPTION(RuntimeTypeInfo)
  174.     SUPPORT_COMPILER_OPTION(UsePrecompiledHeader)
  175.     SUPPORT_COMPILER_OPTION(WarningLevel)
  176.     SUPPORT_COMPILER_OPTION(Detect64BitPortabilityProblems)
  177.     SUPPORT_COMPILER_OPTION(DebugInformationFormat)
  178.     SUPPORT_COMPILER_OPTION(CompileAs)
  179.     SUPPORT_COMPILER_OPTION(InlineFunctionExpansion)
  180.     SUPPORT_COMPILER_OPTION(OmitFramePointers)
  181.     SUPPORT_COMPILER_OPTION(StringPooling)
  182.     SUPPORT_COMPILER_OPTION(EnableFunctionLevelLinking)
  183.     //Latest additions
  184.     SUPPORT_COMPILER_OPTION(OptimizeForProcessor)
  185.     SUPPORT_COMPILER_OPTION(StructMemberAlignment)
  186.     SUPPORT_COMPILER_OPTION(CallingConvention)
  187.     SUPPORT_COMPILER_OPTION(IgnoreStandardIncludePath)
  188.     SUPPORT_COMPILER_OPTION(ExceptionHandling)
  189.     SUPPORT_COMPILER_OPTION(BufferSecurityCheck)
  190.     SUPPORT_COMPILER_OPTION(DisableSpecificWarnings)
  191.     SUPPORT_COMPILER_OPTION(UndefinePreprocessorDefinitions)
  192.     SUPPORT_COMPILER_OPTION(AdditionalOptions)
  193.     SUPPORT_COMPILER_OPTION(GlobalOptimizations)
  194.     SUPPORT_COMPILER_OPTION(FavorSizeOrSpeed)
  195.     SUPPORT_COMPILER_OPTION(BrowseInformation)
  196. private:
  197.     string                   m_AdditionalIncludeDirectories;
  198.     const IMsvcMetaMakefile& m_MsvcProjectMakefile;
  199.     string                   m_RuntimeLibraryOption;
  200.     const IMsvcMetaMakefile& m_MsvcMetaMakefile;
  201.     SConfigInfo              m_Config;
  202.     list<string>             m_Defines;
  203.     TTargetType              m_TargetType;
  204.     // No value-type semantics
  205.     CCompilerToolImpl(void);
  206.     CCompilerToolImpl(const CCompilerToolImpl&);
  207.     CCompilerToolImpl& operator= (const CCompilerToolImpl&);
  208. };
  209. /////////////////////////////////////////////////////////////////////////////
  210. ///
  211. /// CLinkerToolImpl --
  212. ///
  213. /// Implementation of ILinkerTool interface.
  214. ///
  215. /// Accepts trait classes as a template parameters.
  216. template <class ConfTrait > 
  217. class CLinkerToolImpl : public ILinkerTool
  218. {
  219. public:
  220.     CLinkerToolImpl(const string&            additional_options,
  221.                     const string&            additional_library_directories,
  222.                     const string&            project_id,
  223.                     const IMsvcMetaMakefile& project_makefile,
  224.                     const IMsvcMetaMakefile& meta_makefile,
  225.                     const SConfigInfo&       config)
  226.     :m_AdditionalOptions    (additional_options),
  227.          m_AdditionalLibraryDirectories(additional_library_directories),
  228.  m_ProjectId            (project_id),
  229.          m_MsvcProjectMakefile  (project_makefile),
  230.          m_MsvcMetaMakefile     (meta_makefile),
  231.          m_Config               (config)
  232.     {
  233.     }
  234.     virtual string Name(void) const
  235.     {
  236.     return "VCLinkerTool";
  237.     }
  238.     virtual string AdditionalOptions(void) const
  239.     {
  240.     return m_AdditionalOptions + " " +
  241.                GetLinkerOpt(m_MsvcMetaMakefile,
  242.                             m_MsvcProjectMakefile,
  243.                             "AdditionalOptions", 
  244.                             m_Config );
  245.     }
  246.     virtual string OutputFile(void) const
  247.     {
  248.         string output_file = 
  249.             GetLinkerOpt(m_MsvcMetaMakefile,
  250.                          m_MsvcProjectMakefile,
  251.                          "OutputFile", 
  252.                          m_Config );
  253.         if( !output_file.empty() )
  254.             return output_file;
  255.     return string("$(OutDir)/") + m_ProjectId + ConfTrait::TargetExtension();
  256.     }
  257. #define SUPPORT_LINKER_OPTION(opt) 
  258.     virtual string opt(void) const 
  259.     { 
  260.         return GetLinkerOpt(m_MsvcMetaMakefile, 
  261.                             m_MsvcProjectMakefile, 
  262.                             #opt, 
  263.                             m_Config ); 
  264.     }
  265.     
  266.     SUPPORT_LINKER_OPTION(LinkIncremental)
  267.     SUPPORT_LINKER_OPTION(GenerateDebugInformation)
  268.     virtual string ProgramDatabaseFile(void) const
  269.     {
  270.     return string("$(OutDir)/") + m_ProjectId + ".pdb";
  271.     }
  272.     SUPPORT_LINKER_OPTION(SubSystem)
  273.     
  274.     virtual string ImportLibrary(void) const
  275.     {
  276.     return string("$(OutDir)/") + m_ProjectId + ".lib";
  277.     }
  278.     SUPPORT_LINKER_OPTION(TargetMachine)
  279.     SUPPORT_LINKER_OPTION(OptimizeReferences)
  280.     SUPPORT_LINKER_OPTION(EnableCOMDATFolding)
  281.     SUPPORT_LINKER_OPTION(IgnoreAllDefaultLibraries)
  282.     SUPPORT_LINKER_OPTION(IgnoreDefaultLibraryNames)
  283.     virtual string AdditionalLibraryDirectories(void) const
  284.     {
  285.     return m_AdditionalLibraryDirectories;
  286.     }
  287. private:
  288.     string      m_AdditionalOptions;
  289.     string      m_AdditionalLibraryDirectories;
  290.     string      m_ProjectId;
  291.     SConfigInfo m_Config;
  292.     const IMsvcMetaMakefile& m_MsvcProjectMakefile;
  293.     const IMsvcMetaMakefile&            m_MsvcMetaMakefile;
  294.     CLinkerToolImpl(void);
  295.     CLinkerToolImpl(const CLinkerToolImpl&);
  296.     CLinkerToolImpl& operator= (const CLinkerToolImpl&);
  297. };
  298. #define SUPPORT_DUMMY_OPTION(opt) 
  299.     virtual string opt(void) const 
  300.     { 
  301.         return ""; 
  302.     }
  303. /////////////////////////////////////////////////////////////////////////////
  304. ///
  305. /// CLinkerToolDummyImpl --
  306. ///
  307. /// Implementation of ILinkerTool interface.
  308. ///
  309. /// Dummy (name-only) implementation.
  310. class CLinkerToolDummyImpl : public ILinkerTool // for LIB targets:
  311. {
  312. public:
  313.     CLinkerToolDummyImpl()
  314.     {
  315.     }
  316.     virtual string Name(void) const
  317.     {
  318.     return "VCLinkerTool";
  319.     }
  320.     SUPPORT_DUMMY_OPTION(AdditionalOptions)
  321.     SUPPORT_DUMMY_OPTION(OutputFile)
  322.     SUPPORT_DUMMY_OPTION(LinkIncremental)
  323.     SUPPORT_DUMMY_OPTION(GenerateDebugInformation)
  324.     SUPPORT_DUMMY_OPTION(ProgramDatabaseFile)
  325.     SUPPORT_DUMMY_OPTION(SubSystem)
  326.     SUPPORT_DUMMY_OPTION(ImportLibrary)
  327.     SUPPORT_DUMMY_OPTION(TargetMachine)
  328.     SUPPORT_DUMMY_OPTION(OptimizeReferences)
  329.     SUPPORT_DUMMY_OPTION(EnableCOMDATFolding)
  330.     virtual string IgnoreAllDefaultLibraries(void) const
  331.     {
  332.         return "FALSE";
  333.     }
  334.     virtual string IgnoreDefaultLibraryNames(void) const
  335.     {
  336.         return "FALSE";
  337.     }
  338.     SUPPORT_DUMMY_OPTION(AdditionalLibraryDirectories)
  339. private:
  340.     CLinkerToolDummyImpl(const CLinkerToolDummyImpl&);
  341.     CLinkerToolDummyImpl& operator= (const CLinkerToolDummyImpl&);
  342. };
  343. /////////////////////////////////////////////////////////////////////////////
  344. ///
  345. /// CLibrarianToolImpl --
  346. ///
  347. /// Implementation of ILibrarianTool interface.
  348. ///
  349. /// Implementation for LIB targets.
  350. class CLibrarianToolImpl : public ILibrarianTool
  351. {
  352. public:
  353.     CLibrarianToolImpl( const string&            project_id,
  354.                         const IMsvcMetaMakefile& project_makefile,
  355.                         const IMsvcMetaMakefile& meta_makefile,
  356.                         const SConfigInfo&       config)
  357.         :m_ProjectId            (project_id),
  358.          m_MsvcProjectMakefile  (project_makefile),
  359.          m_MsvcMetaMakefile     (meta_makefile),
  360.          m_Config               (config)
  361.     {
  362.     }
  363.     virtual string Name(void) const
  364.     {
  365.     return "VCLibrarianTool";
  366.     }
  367.     virtual string OutputFile(void) const
  368.     {
  369.     return string("$(OutDir)/") + m_ProjectId + ".lib";
  370.     }
  371. #define SUPPORT_LIBRARIAN_OPTION(opt) 
  372.     virtual string opt(void) const 
  373.     { 
  374.         return GetLinkerOpt(m_MsvcMetaMakefile, 
  375.                             m_MsvcProjectMakefile, 
  376.                             #opt, 
  377.                             m_Config ); 
  378.     }
  379.     SUPPORT_LIBRARIAN_OPTION(AdditionalOptions)
  380.     SUPPORT_LIBRARIAN_OPTION(AdditionalLibraryDirectories)
  381.     SUPPORT_LIBRARIAN_OPTION(IgnoreAllDefaultLibraries)
  382.     SUPPORT_LIBRARIAN_OPTION(IgnoreDefaultLibraryNames)
  383. private:
  384.     string      m_ProjectId;
  385.     SConfigInfo m_Config;
  386.    
  387.     const IMsvcMetaMakefile& m_MsvcProjectMakefile;
  388.     const IMsvcMetaMakefile& m_MsvcMetaMakefile;
  389.     CLibrarianToolImpl(void);
  390.     CLibrarianToolImpl(const CLibrarianToolImpl&);
  391.     CLibrarianToolImpl& operator= (const CLibrarianToolImpl&);
  392. };
  393. /////////////////////////////////////////////////////////////////////////////
  394. ///
  395. /// CLibrarianToolDummyImpl --
  396. ///
  397. /// Implementation of ILibrarianTool interface.
  398. ///
  399. /// Dummy (name-only) implementation for APP and DLL targets.
  400. class CLibrarianToolDummyImpl : public ILibrarianTool // for APP and DLL
  401. {
  402. public:
  403.     CLibrarianToolDummyImpl(void)
  404.     {
  405.     }
  406.     virtual string Name(void) const
  407.     {
  408.     return "VCLibrarianTool";
  409.     }
  410.     SUPPORT_DUMMY_OPTION(AdditionalOptions)
  411.     SUPPORT_DUMMY_OPTION(OutputFile)
  412.     SUPPORT_DUMMY_OPTION(IgnoreAllDefaultLibraries)
  413.     SUPPORT_DUMMY_OPTION(IgnoreDefaultLibraryNames)
  414.     SUPPORT_DUMMY_OPTION(AdditionalLibraryDirectories)
  415. private:
  416. CLibrarianToolDummyImpl(const CLibrarianToolDummyImpl&);
  417. CLibrarianToolDummyImpl& operator= (const CLibrarianToolDummyImpl&);
  418. };
  419. class CPreBuildEventToolDummyImpl : public IPreBuildEventTool // for APP and DLL
  420. {
  421. public:
  422.     CPreBuildEventToolDummyImpl(void)
  423.     {
  424.     }
  425.     virtual string Name(void) const
  426.     {
  427.     return "VCPreBuildEventTool";
  428.     }
  429.     SUPPORT_DUMMY_OPTION(CommandLine)
  430. private:
  431. CPreBuildEventToolDummyImpl(const CPreBuildEventToolDummyImpl&);
  432. CPreBuildEventToolDummyImpl& operator= (const CPreBuildEventToolDummyImpl&);
  433. };
  434. class CPreBuildEventToolLibImpl : public IPreBuildEventTool // for LIB
  435. {
  436. public:
  437.     CPreBuildEventToolLibImpl(const list<string>& lib_depends)
  438.         :m_LibDepends(lib_depends)
  439.     {
  440.     }
  441.     virtual string Name(void) const
  442.     {
  443.     return "VCPreBuildEventTool";
  444.     }
  445.     virtual string CommandLine(void) const
  446.     {
  447.         string command_line;
  448.         if ( !m_LibDepends.empty() ) {
  449.             command_line += "@echo onn";
  450.         }
  451.         ITERATE(list<string>, p, m_LibDepends)
  452.         {
  453.             const string& lib = *p;
  454.             
  455.             command_line += "IF EXIST $(OutDir)\" + lib;
  456.             command_line += " GOTO HAVE_" + lib + "n";
  457.             command_line += "devenv /build $(ConfigurationName) /project ";
  458.             command_line += lib;
  459.             command_line += " "$(SolutionPath)"n";
  460.             command_line += ":HAVE_" + lib + "n";
  461.         }
  462.         return command_line;
  463.     }
  464. private:
  465.     list<string> m_LibDepends;
  466. CPreBuildEventToolLibImpl(const CPreBuildEventToolLibImpl&);
  467. CPreBuildEventToolLibImpl& operator= (const CPreBuildEventToolLibImpl&);
  468. };
  469. /// Dummy (name-only) tool implementations.
  470. #define DEFINE_NAME_ONLY_DUMMY_TOOL(C,I,N)
  471. class C : public I
  472. {
  473. public:
  474.     C()
  475.     {
  476.     }
  477.     virtual string Name(void) const
  478.     {
  479.     return N;
  480.     }
  481. private:
  482.     C(const C&);
  483.     C& operator= (const C&);
  484. };
  485. DEFINE_NAME_ONLY_DUMMY_TOOL(CCustomBuildToolDummyImpl,
  486.                             ICustomBuildTool, 
  487.                             "VCCustomBuildTool"); 
  488. DEFINE_NAME_ONLY_DUMMY_TOOL(CMIDLToolDummyImpl, 
  489.                             IMIDLTool, 
  490.                             "VCMIDLTool"); 
  491. DEFINE_NAME_ONLY_DUMMY_TOOL(CPostBuildEventToolDummyImpl,
  492.                             IPostBuildEventTool, 
  493.                             "VCPostBuildEventTool"); 
  494. #if 0
  495. DEFINE_NAME_ONLY_DUMMY_TOOL(CPreBuildEventToolDummyImpl,
  496.                             IPreBuildEventTool, 
  497.                             "VCPreBuildEventTool"); 
  498. #endif
  499. DEFINE_NAME_ONLY_DUMMY_TOOL(CPreLinkEventToolDummyImpl,
  500.                             IPreLinkEventTool, 
  501.                             "VCPreLinkEventTool");
  502. /////////////////////////////////////////////////////////////////////////////
  503. ///
  504. /// CResourceCompilerToolImpl --
  505. ///
  506. /// Implementation of IResourceCompilerTool interface.
  507. ///
  508. /// Accepts traits as a template parameter.
  509. template <class DebugReleaseTrait>
  510. class CResourceCompilerToolImpl : public IResourceCompilerTool
  511. {
  512. public:
  513.     CResourceCompilerToolImpl(const string&            additional_include_dirs,
  514.                               const IMsvcMetaMakefile& project_makefile,
  515.                               const IMsvcMetaMakefile& meta_makefile,
  516.                               const SConfigInfo&       config)
  517.       :m_AdditionalIncludeDirectories(additional_include_dirs),
  518.        m_MsvcProjectMakefile(project_makefile),
  519.        m_MsvcMetaMakefile   (meta_makefile),
  520.        m_Config             (config)
  521.     {
  522.     }
  523.     virtual string Name(void) const
  524.     {
  525.     return "VCResourceCompilerTool";
  526.     }
  527.     virtual string AdditionalIncludeDirectories(void) const
  528.     {
  529.     return m_AdditionalIncludeDirectories;
  530.     }
  531. #define SUPPORT_RESOURCE_COMPILER_OPTION(opt) 
  532.     virtual string opt(void) const 
  533.     { 
  534.         return GetResourceCompilerOpt(m_MsvcMetaMakefile, 
  535.                                       m_MsvcProjectMakefile, 
  536.                                       #opt, 
  537.                                       m_Config ); 
  538.     }
  539.     
  540.     SUPPORT_RESOURCE_COMPILER_OPTION(AdditionalOptions)
  541.     SUPPORT_RESOURCE_COMPILER_OPTION(Culture)
  542.     virtual string PreprocessorDefinitions(void) const
  543.     {
  544.     return DebugReleaseTrait::PreprocessorDefinitions();
  545.     }
  546. private:
  547.     string                   m_AdditionalIncludeDirectories;
  548.     const IMsvcMetaMakefile& m_MsvcProjectMakefile;
  549.     const IMsvcMetaMakefile& m_MsvcMetaMakefile;
  550.     const SConfigInfo&       m_Config;
  551.     CResourceCompilerToolImpl(const CResourceCompilerToolImpl&);
  552.     CResourceCompilerToolImpl& operator= (const CResourceCompilerToolImpl&);
  553. };
  554. /////////////////////////////////////////////////////////////////////////////
  555. ///
  556. /// CResourceCompilerToolImpl --
  557. ///
  558. /// Implementation of IResourceCompilerTool interface.
  559. ///
  560. /// Dummy (name-only) implementation.
  561. class CResourceCompilerToolDummyImpl : public IResourceCompilerTool //no resources
  562. {
  563. public:
  564.     CResourceCompilerToolDummyImpl()
  565.     {
  566.     }
  567.     virtual string Name(void) const
  568.     {
  569.         return "VCResourceCompilerTool";
  570.     }
  571.     SUPPORT_DUMMY_OPTION(AdditionalIncludeDirectories)
  572.     SUPPORT_DUMMY_OPTION(AdditionalOptions)
  573.     SUPPORT_DUMMY_OPTION(Culture)
  574.     SUPPORT_DUMMY_OPTION(PreprocessorDefinitions)
  575. private:
  576.     CResourceCompilerToolDummyImpl
  577.         (const CResourceCompilerToolDummyImpl&);
  578.     CResourceCompilerToolDummyImpl& operator= 
  579.         (const CResourceCompilerToolDummyImpl&);
  580. };
  581. /// Dummy (name-only) tool implementations.
  582. DEFINE_NAME_ONLY_DUMMY_TOOL(CWebServiceProxyGeneratorToolDummyImpl,
  583.                             IWebServiceProxyGeneratorTool, 
  584.                             "VCWebServiceProxyGeneratorTool");
  585. DEFINE_NAME_ONLY_DUMMY_TOOL(CXMLDataGeneratorToolDummyImpl,
  586.                             IXMLDataGeneratorTool, 
  587.                             "VCXMLDataGeneratorTool");
  588. DEFINE_NAME_ONLY_DUMMY_TOOL(CManagedWrapperGeneratorToolDummyImpl,
  589.                             IManagedWrapperGeneratorTool, 
  590.                             "VCManagedWrapperGeneratorTool");
  591. DEFINE_NAME_ONLY_DUMMY_TOOL(CAuxiliaryManagedWrapperGeneratorToolDummyImpl,
  592.                             IAuxiliaryManagedWrapperGeneratorTool, 
  593.                             "VCAuxiliaryManagedWrapperGeneratorTool");
  594. END_NCBI_SCOPE
  595. /*
  596.  * ===========================================================================
  597.  * $Log: msvc_tools_implement.hpp,v $
  598.  * Revision 1000.2  2004/06/16 17:05:10  gouriano
  599.  * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.14
  600.  *
  601.  * Revision 1.14  2004/06/10 15:12:55  gorelenk
  602.  * Added newline at the file end to avoid GCC warning.
  603.  *
  604.  * Revision 1.13  2004/06/07 13:54:52  gorelenk
  605.  * Classes *ToolImpl, switched to using interface IMsvcMetaMakefile.
  606.  *
  607.  * Revision 1.12  2004/05/21 13:45:41  gorelenk
  608.  * Changed implementation of class CLinkerToolImpl method OutputFile -
  609.  * allow to override linker Output File settings in user .msvc makefile.
  610.  *
  611.  * Revision 1.11  2004/03/22 14:47:34  gorelenk
  612.  * Changed definition of class CLibrarianToolImpl.
  613.  *
  614.  * Revision 1.10  2004/03/10 16:47:01  gorelenk
  615.  * Changed definitions of classes CCompilerToolImpl and CLinkerToolImpl.
  616.  *
  617.  * Revision 1.9  2004/03/08 23:30:29  gorelenk
  618.  * Added static helper function s_GetLibsPrefixesPreprocessorDefinitions.
  619.  * Changed declaration of class CCompilerToolImpl.
  620.  *
  621.  * Revision 1.8  2004/02/23 20:43:43  gorelenk
  622.  * Added support of MSVC ResourceCompiler tool.
  623.  *
  624.  * Revision 1.7  2004/02/20 22:54:46  gorelenk
  625.  * Added analysis of ASN projects depends.
  626.  *
  627.  * Revision 1.6  2004/02/06 23:15:40  gorelenk
  628.  * Implemented support of ASN projects, semi-auto configure,
  629.  * CPPFLAGS support. Second working version.
  630.  *
  631.  * Revision 1.5  2004/01/28 17:55:06  gorelenk
  632.  * += For msvc makefile support of :
  633.  *                 Requires tag, ExcludeProject tag,
  634.  *                 AddToProject section (SourceFiles and IncludeDirs),
  635.  *                 CustomBuild section.
  636.  * += For support of user local site.
  637.  *
  638.  * Revision 1.4  2004/01/26 19:25:42  gorelenk
  639.  * += MSVC meta makefile support
  640.  * += MSVC project makefile support
  641.  *
  642.  * Revision 1.3  2004/01/22 17:57:09  gorelenk
  643.  * first version
  644.  *
  645.  * ===========================================================================
  646.  */
  647. #endif //PROJECT_TREE_BUILDER__TOOLS_IMPLEMENT__HPP