msvc_tools_implement.hpp
来自「ncbi源码」· HPP 代码 · 共 759 行 · 第 1/2 页
HPP
759 行
{ return "FALSE"; } virtual string IgnoreDefaultLibraryNames(void) const { return "FALSE"; } SUPPORT_DUMMY_OPTION(AdditionalLibraryDirectories)private: CLinkerToolDummyImpl(const CLinkerToolDummyImpl&); CLinkerToolDummyImpl& operator= (const CLinkerToolDummyImpl&);};/////////////////////////////////////////////////////////////////////////////////// CLibrarianToolImpl --////// Implementation of ILibrarianTool interface.////// Implementation for LIB targets.class CLibrarianToolImpl : public ILibrarianTool{public: CLibrarianToolImpl( const string& project_id, const IMsvcMetaMakefile& project_makefile, const IMsvcMetaMakefile& meta_makefile, const SConfigInfo& config) :m_ProjectId (project_id), m_MsvcProjectMakefile (project_makefile), m_MsvcMetaMakefile (meta_makefile), m_Config (config) { } virtual string Name(void) const { return "VCLibrarianTool"; } virtual string OutputFile(void) const { return string("$(OutDir)/") + m_ProjectId + ".lib"; }#define SUPPORT_LIBRARIAN_OPTION(opt) \ virtual string opt(void) const \ { \ return GetLinkerOpt(m_MsvcMetaMakefile, \ m_MsvcProjectMakefile, \ #opt, \ m_Config ); \ } SUPPORT_LIBRARIAN_OPTION(AdditionalOptions) SUPPORT_LIBRARIAN_OPTION(AdditionalLibraryDirectories) SUPPORT_LIBRARIAN_OPTION(IgnoreAllDefaultLibraries) SUPPORT_LIBRARIAN_OPTION(IgnoreDefaultLibraryNames)private: string m_ProjectId; SConfigInfo m_Config; const IMsvcMetaMakefile& m_MsvcProjectMakefile; const IMsvcMetaMakefile& m_MsvcMetaMakefile; CLibrarianToolImpl(void); CLibrarianToolImpl(const CLibrarianToolImpl&); CLibrarianToolImpl& operator= (const CLibrarianToolImpl&);};/////////////////////////////////////////////////////////////////////////////////// CLibrarianToolDummyImpl --////// Implementation of ILibrarianTool interface.////// Dummy (name-only) implementation for APP and DLL targets.class CLibrarianToolDummyImpl : public ILibrarianTool // for APP and DLL{public: CLibrarianToolDummyImpl(void) { } virtual string Name(void) const { return "VCLibrarianTool"; } SUPPORT_DUMMY_OPTION(AdditionalOptions) SUPPORT_DUMMY_OPTION(OutputFile) SUPPORT_DUMMY_OPTION(IgnoreAllDefaultLibraries) SUPPORT_DUMMY_OPTION(IgnoreDefaultLibraryNames) SUPPORT_DUMMY_OPTION(AdditionalLibraryDirectories)private: CLibrarianToolDummyImpl(const CLibrarianToolDummyImpl&); CLibrarianToolDummyImpl& operator= (const CLibrarianToolDummyImpl&);};class CPreBuildEventToolDummyImpl : public IPreBuildEventTool // for APP and DLL{public: CPreBuildEventToolDummyImpl(void) { } virtual string Name(void) const { return "VCPreBuildEventTool"; } SUPPORT_DUMMY_OPTION(CommandLine)private: CPreBuildEventToolDummyImpl(const CPreBuildEventToolDummyImpl&); CPreBuildEventToolDummyImpl& operator= (const CPreBuildEventToolDummyImpl&);};class CPreBuildEventToolLibImpl : public IPreBuildEventTool // for LIB{public: CPreBuildEventToolLibImpl(const list<string>& lib_depends) :m_LibDepends(lib_depends) { } virtual string Name(void) const { return "VCPreBuildEventTool"; } virtual string CommandLine(void) const { string command_line; if ( !m_LibDepends.empty() ) { command_line += "@echo on\n"; } ITERATE(list<string>, p, m_LibDepends) { const string& lib = *p; command_line += "IF EXIST $(OutDir)\\" + lib; command_line += " GOTO HAVE_" + lib + "\n"; command_line += "devenv /build $(ConfigurationName) /project "; command_line += lib; command_line += " \"$(SolutionPath)\"\n"; command_line += ":HAVE_" + lib + "\n"; } return command_line; }private: list<string> m_LibDepends; CPreBuildEventToolLibImpl(const CPreBuildEventToolLibImpl&); CPreBuildEventToolLibImpl& operator= (const CPreBuildEventToolLibImpl&);};/// Dummy (name-only) tool implementations.#define DEFINE_NAME_ONLY_DUMMY_TOOL(C,I,N)\class C : public I\{\public:\ C()\ {\ }\ virtual string Name(void) const\ {\ return N;\ }\private:\ C(const C&);\ C& operator= (const C&);\};DEFINE_NAME_ONLY_DUMMY_TOOL(CCustomBuildToolDummyImpl, ICustomBuildTool, "VCCustomBuildTool"); DEFINE_NAME_ONLY_DUMMY_TOOL(CMIDLToolDummyImpl, IMIDLTool, "VCMIDLTool"); DEFINE_NAME_ONLY_DUMMY_TOOL(CPostBuildEventToolDummyImpl, IPostBuildEventTool, "VCPostBuildEventTool"); #if 0DEFINE_NAME_ONLY_DUMMY_TOOL(CPreBuildEventToolDummyImpl, IPreBuildEventTool, "VCPreBuildEventTool"); #endifDEFINE_NAME_ONLY_DUMMY_TOOL(CPreLinkEventToolDummyImpl, IPreLinkEventTool, "VCPreLinkEventTool");/////////////////////////////////////////////////////////////////////////////////// CResourceCompilerToolImpl --////// Implementation of IResourceCompilerTool interface.////// Accepts traits as a template parameter.template <class DebugReleaseTrait>class CResourceCompilerToolImpl : public IResourceCompilerTool{public: CResourceCompilerToolImpl(const string& additional_include_dirs, const IMsvcMetaMakefile& project_makefile, const IMsvcMetaMakefile& meta_makefile, const SConfigInfo& config) :m_AdditionalIncludeDirectories(additional_include_dirs), m_MsvcProjectMakefile(project_makefile), m_MsvcMetaMakefile (meta_makefile), m_Config (config) { } virtual string Name(void) const { return "VCResourceCompilerTool"; } virtual string AdditionalIncludeDirectories(void) const { return m_AdditionalIncludeDirectories; }#define SUPPORT_RESOURCE_COMPILER_OPTION(opt) \ virtual string opt(void) const \ { \ return GetResourceCompilerOpt(m_MsvcMetaMakefile, \ m_MsvcProjectMakefile, \ #opt, \ m_Config ); \ } SUPPORT_RESOURCE_COMPILER_OPTION(AdditionalOptions) SUPPORT_RESOURCE_COMPILER_OPTION(Culture) virtual string PreprocessorDefinitions(void) const { return DebugReleaseTrait::PreprocessorDefinitions(); }private: string m_AdditionalIncludeDirectories; const IMsvcMetaMakefile& m_MsvcProjectMakefile; const IMsvcMetaMakefile& m_MsvcMetaMakefile; const SConfigInfo& m_Config; CResourceCompilerToolImpl(const CResourceCompilerToolImpl&); CResourceCompilerToolImpl& operator= (const CResourceCompilerToolImpl&);};/////////////////////////////////////////////////////////////////////////////////// CResourceCompilerToolImpl --////// Implementation of IResourceCompilerTool interface.////// Dummy (name-only) implementation.class CResourceCompilerToolDummyImpl : public IResourceCompilerTool //no resources{public: CResourceCompilerToolDummyImpl() { } virtual string Name(void) const { return "VCResourceCompilerTool"; } SUPPORT_DUMMY_OPTION(AdditionalIncludeDirectories) SUPPORT_DUMMY_OPTION(AdditionalOptions) SUPPORT_DUMMY_OPTION(Culture) SUPPORT_DUMMY_OPTION(PreprocessorDefinitions)private: CResourceCompilerToolDummyImpl (const CResourceCompilerToolDummyImpl&); CResourceCompilerToolDummyImpl& operator= (const CResourceCompilerToolDummyImpl&);};/// Dummy (name-only) tool implementations.DEFINE_NAME_ONLY_DUMMY_TOOL(CWebServiceProxyGeneratorToolDummyImpl, IWebServiceProxyGeneratorTool, "VCWebServiceProxyGeneratorTool");DEFINE_NAME_ONLY_DUMMY_TOOL(CXMLDataGeneratorToolDummyImpl, IXMLDataGeneratorTool, "VCXMLDataGeneratorTool");DEFINE_NAME_ONLY_DUMMY_TOOL(CManagedWrapperGeneratorToolDummyImpl, IManagedWrapperGeneratorTool, "VCManagedWrapperGeneratorTool");DEFINE_NAME_ONLY_DUMMY_TOOL(CAuxiliaryManagedWrapperGeneratorToolDummyImpl, IAuxiliaryManagedWrapperGeneratorTool, "VCAuxiliaryManagedWrapperGeneratorTool");END_NCBI_SCOPE/* * =========================================================================== * $Log: msvc_tools_implement.hpp,v $ * Revision 1000.2 2004/06/16 17:05:10 gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.14 * * Revision 1.14 2004/06/10 15:12:55 gorelenk * Added newline at the file end to avoid GCC warning. * * Revision 1.13 2004/06/07 13:54:52 gorelenk * Classes *ToolImpl, switched to using interface IMsvcMetaMakefile. * * Revision 1.12 2004/05/21 13:45:41 gorelenk * Changed implementation of class CLinkerToolImpl method OutputFile - * allow to override linker Output File settings in user .msvc makefile. * * Revision 1.11 2004/03/22 14:47:34 gorelenk * Changed definition of class CLibrarianToolImpl. * * Revision 1.10 2004/03/10 16:47:01 gorelenk * Changed definitions of classes CCompilerToolImpl and CLinkerToolImpl. * * Revision 1.9 2004/03/08 23:30:29 gorelenk * Added static helper function s_GetLibsPrefixesPreprocessorDefinitions. * Changed declaration of class CCompilerToolImpl. * * Revision 1.8 2004/02/23 20:43:43 gorelenk * Added support of MSVC ResourceCompiler tool. * * Revision 1.7 2004/02/20 22:54:46 gorelenk * Added analysis of ASN projects depends. * * Revision 1.6 2004/02/06 23:15:40 gorelenk * Implemented support of ASN projects, semi-auto configure, * CPPFLAGS support. Second working version. * * Revision 1.5 2004/01/28 17:55:06 gorelenk * += For msvc makefile support of : * Requires tag, ExcludeProject tag, * AddToProject section (SourceFiles and IncludeDirs), * CustomBuild section. * += For support of user local site. * * Revision 1.4 2004/01/26 19:25:42 gorelenk * += MSVC meta makefile support * += MSVC project makefile support * * Revision 1.3 2004/01/22 17:57:09 gorelenk * first version * * =========================================================================== */#endif //PROJECT_TREE_BUILDER__TOOLS_IMPLEMENT__HPP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?