- /*
- * ===========================================================================
- * PRODUCTION $Log: view_factory.hpp,v $
- * PRODUCTION Revision 1000.2 2004/04/12 18:13:01 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.12
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_CORE___VIEW_FACTORY__HPP
- #define GUI_CORE___VIEW_FACTORY__HPP
- /* $Id: view_factory.hpp,v 1000.2 2004/04/12 18:13:01 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:
- *
- */
- #include <gui/core/view_plugin.hpp>
- #include <gui/core/plugin_factory.hpp>
- BEGIN_NCBI_SCOPE
- template <class ViewType>
- class CViewFactory : public CPluginFactory<ViewType>
- {
- public:
- virtual CPluginBase* GetPlugin(void)
- {
- return new CViewPlugin<ViewType>;
- }
- };
- // Macros for easily defining and registering unique factory names and
- // instances
- #define DECLARE_VIEW_FACTORY(name)
- static CViewFactory<name> s_ViewFactory_##name
- #define REGISTER_VIEW_PLUGIN(name)
- plugins.push_back(&s_ViewFactory_##name)
- END_NCBI_SCOPE
- #endif // GUI_CORE___VIEW_FACTORY__HPP
- /*
- * ===========================================================================
- * $Log: view_factory.hpp,v $
- * Revision 1000.2 2004/04/12 18:13:01 gouriano
- * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.12
- *
- * Revision 1.12 2003/12/22 19:10:06 dicuccio
- * Don't swallow the trailing ';' on macros
- *
- * Revision 1.11 2003/11/06 19:59:29 dicuccio
- * Removed USING_SCOPE(objects)
- *
- * Revision 1.10 2003/07/14 10:58:21 shomrat
- * Plugin messageing system related changes
- *
- * Revision 1.9 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.8 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.7 2003/05/30 14:15:40 dicuccio
- * Renamed MessageBox to NcbiMessageBox because brain-dead MSVC thinks this is
- * ::MessageBox and rewrites the symbol as MessageBoxA, which results in an
- * unresolved external and conflict with the Win32 API :(.
- *
- * Revision 1.6 2003/05/30 12:53:56 dicuccio
- * Converted code to use MessageBox() instead of
- * fl_ask()/fl_message()/fl_alert()
- *
- * Revision 1.5 2003/05/19 13:32:43 dicuccio
- * Moved gui/core/plugin --> gui/plugin/
- *
- * Revision 1.4 2003/04/24 16:15:03 dicuccio
- * Changed notion of how a document and view relate - eliminate old "default
- * arguments" for views
- *
- * Revision 1.3 2003/03/03 14:21:06 dicuccio
- * Converted all view creation to use CPluginArgSet instead of CDocument
- *
- * Revision 1.2 2003/02/24 13:00:17 dicuccio
- * Renamed classes in plugin spec:
- * CArgSeg --> CPluginArgSet
- * CArgument --> CPluginArg
- * CPluginArgs --> CPluginCommand
- * CPluginCommands --> CPluginCommandSet
- *
- * 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.
- *
- * ===========================================================================
- */