📄 dload_factory.hpp
字号:
/* * =========================================================================== * PRODUCTION $Log: dload_factory.hpp,v $ * PRODUCTION Revision 1000.1 2004/04/12 18:12:10 gouriano * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.11 * PRODUCTION * =========================================================================== */#ifndef GUI_CORE___DLOAD_FACTORY__HPP#define GUI_CORE___DLOAD_FACTORY__HPP/* $Id: dload_factory.hpp,v 1000.1 2004/04/12 18:12:10 gouriano Exp $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * Authors: Mike DiCuccio * * File Description: * CDataFactory -- templatized base class for data loaders, providing * standard entry hooks */#include <gui/core/context_factory.hpp>#include <gui/core/doc_manager.hpp>#include <gui/plugin/PluginArgSet.hpp>#include <gui/plugin/PluginCommand.hpp>BEGIN_NCBI_SCOPEtemplate <class DataType>class CDataFactory : public CContextFactory<DataType>{public: virtual CPluginBase* GetPlugin(void) { return new DataType; }};// Macros for easily defining and registering unique factory names and// instances#define DECLARE_DATA_FACTORY(name) \ static CDataFactory<name> s_DataFactory_##name#define REGISTER_DATA_PLUGIN(name) \ plugins.push_back(&s_DataFactory_##name)END_NCBI_SCOPE#endif // GUI_CORE___DLOAD_FACTORY__HPP/* * =========================================================================== * $Log: dload_factory.hpp,v $ * Revision 1000.1 2004/04/12 18:12:10 gouriano * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.11 * * Revision 1.11 2003/12/22 19:10:05 dicuccio * Don't swallow the trailing ';' on macros * * Revision 1.10 2003/09/29 15:20:06 dicuccio * Deprecated gui/scope.hpp. Merged gui/core/types.hpp into gui/types.hpp * * Revision 1.9 2003/08/22 15:53:21 dicuccio * Removed lots of dead code. Removed 'USING_SCOPE(objects)' * * Revision 1.8 2003/07/14 10:57:03 shomrat * Plugin messageing system related changes * * Revision 1.7 2003/06/25 16:59:41 dicuccio * Changed CPluginHandle into a pointer-to-implementation (the previous * implementation is now the pointer held). Lots of #include file clean-ups. * * Revision 1.6 2003/06/20 14:44:36 dicuccio * Revamped handling of plugin registration. All plugin factories now derive * from CPluginFactoryBase; CPluginFactory is a template. There is a new * requirement for derived plugin handlers of all types (each must implement a * static function of the form 'static void GetInfo(CPluginInfo&)') * * Revision 1.5 2003/05/19 13:32:43 dicuccio * Moved gui/core/plugin --> gui/plugin/ * * Revision 1.4 2003/04/24 16:09:55 dicuccio * Make sure to update all doc manager views after loading a document * * Revision 1.3 2003/02/24 13:00:17 dicuccio * Renamed classes in plugin spec: * CArgSeg --> CPluginArgSet * CArgument --> CPluginArg * CPluginArgs --> CPluginCommand * CPluginCommands --> CPluginCommandSet * * Revision 1.2 2003/02/21 16:44:13 dicuccio * Added Win32 export specifiers for new plugin library. Fixed compilation * issues for Win32. * * Revision 1.1 2003/02/20 19:44:06 dicuccio * Created new plugin architecture, mediated via an ASN.1 spec. Moved GBENCH * framework over to use new plugin architecture. * * =========================================================================== */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -