gbmanage.cpp

来自「ncbi源码」· C++ 代码 · 共 257 行

CPP
257
字号
/* * =========================================================================== * PRODUCTION $Log: gbmanage.cpp,v $ * PRODUCTION Revision 1000.1  2004/06/01 20:57:54  gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.4 * PRODUCTION * =========================================================================== *//*  $Id: gbmanage.cpp,v 1000.1 2004/06/01 20:57:54 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: *    CDataPlugin_GBManage - load sequence information form Genbank. */#include <ncbi_pch.hpp>#include "gbmanage.hpp"#include "gb_manage_dlg.hpp"#include <gui/core/version.hpp>#include <gui/plugin/PluginCommandSet.hpp>#include <gui/plugin/PluginInfo.hpp>#include <gui/plugin/PluginValue.hpp>#include <gui/utils/message_box.hpp>BEGIN_NCBI_SCOPEUSING_SCOPE(objects);//// class CDataPlugin_GBManageException defines some internal exception types used in// processing files.//// This class is used internally to avoid an ad-hoc exception mechanism;// currently, it reports only errors concerning invalid format types.//class CDataPlugin_GBManageException : EXCEPTION_VIRTUAL_BASE public CException{public:    // Enumerated list of exception types    enum EErrCode {        eInvalidId    };    // Convert an enuerated exception to a human-readable string representation    // of this exception.    virtual const char* GetErrCodeString(void) const    {        switch (GetErrCode()) {        case eInvalidId:        return "eInvalidId";        default:                return CException::GetErrCodeString();        }    }    // constructor boilerplate    NCBI_EXCEPTION_DEFAULT(CDataPlugin_GBManageException, CException);};void CDataPlugin_GBManage::GetInfo(CPluginInfo& info){    info.Reset();    // version info macro    info.SetInfo(CPluginVersion::eMajor, CPluginVersion::eMinor, 0,                 string(__DATE__) + " " + string(__TIME__),                 "CDataPlugin_GBManage", "GenBank Connection",                 "Manage the GenBank data connector", "");    // command info    CPluginCommandSet& cmds     = info.SetCommands();    CPluginCommand& manage_args = cmds.AddDataCommand(eDataCommand_manage);}CDataPlugin_GBManage::CDataPlugin_GBManage(){}CDataPlugin_GBManage::~CDataPlugin_GBManage(){}//// load a record from Genbank into a fully-prepared document//void CDataPlugin_GBManage::Manage(CPluginMessage& msg){    CPluginReply& reply = msg.SetReply();    reply.SetStatus(eMessageStatus_success);    if ( !m_Dialog.get() ) {        m_Dialog.reset(new CGBManageDlg());    }    m_Dialog->Show();}END_NCBI_SCOPE/* * =========================================================================== * $Log: gbmanage.cpp,v $ * Revision 1000.1  2004/06/01 20:57:54  gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.4 * * Revision 1.4  2004/05/25 17:21:59  dicuccio * Modified class names.  Fonts to 12 point * * Revision 1.3  2004/05/21 22:27:48  gorelenk * Added PCH ncbi_pch.hpp * * Revision 1.2  2004/01/27 18:45:32  dicuccio * Added missing header files * * Revision 1.1  2003/12/05 13:07:53  dicuccio * Split management interface into a separate plugin.  Fixed linker error * introduced with status bar * * Revision 1.5  2003/11/24 15:45:34  dicuccio * Renamed CVersion to CPluginVersion * * Revision 1.4  2003/11/04 17:49:24  dicuccio * Changed calling parameters for plugins - pass CPluginMessage instead of paired * CPluginCommand/CPluginReply * * Revision 1.3  2003/10/07 13:47:05  dicuccio * Renamed CPluginURL* to CPluginValue* * * Revision 1.2  2003/08/01 14:37:20  dicuccio * Solved issue with plugin communication - make sure that sequences are loaded * when the load button is clicked, not when the dialog closes * * Revision 1.1  2003/07/31 17:04:00  dicuccio * Added GenBank search * * Revision 1.22  2003/07/14 11:16:52  shomrat * Plugin messageing system related changes * * Revision 1.21  2003/06/25 17:02:58  dicuccio * Split CPluginHandle into a handle (pointer-to-implementation) and * implementation file.  Lots of #include file clean-ups. * * Revision 1.20  2003/06/20 14:52:57  dicuccio * Revised plugin registration - moved GetInfo() into the plugin handler * * Revision 1.19  2003/06/02 16:06:22  dicuccio * Rearranged src/objects/ subtree.  This includes the following shifts: *     - src/objects/asn2asn --> arc/app/asn2asn *     - src/objects/testmedline --> src/objects/ncbimime/test *     - src/objects/objmgr --> src/objmgr *     - src/objects/util --> src/objmgr/util *     - src/objects/alnmgr --> src/objtools/alnmgr *     - src/objects/flat --> src/objtools/flat *     - src/objects/validator --> src/objtools/validator *     - src/objects/cddalignview --> src/objtools/cddalignview * In addition, libseq now includes six of the objects/seq... libs, and libmmdb * replaces the three libmmdb? libs. * * Revision 1.18  2003/05/30 14:15:42  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.17  2003/05/30 13:10:37  dicuccio * Use MessageBox() instead of fl_alter() * * Revision 1.16  2003/05/19 13:40:44  dicuccio * Moved gui/core/plugin/ -> gui/plugin/.  Merged core libraries into libgui_core. * Removed old, unused dialog box. * * Revision 1.15  2003/05/01 12:54:34  dicuccio * Changed a useful trace -> log post for failure to load accession * * Revision 1.14  2003/04/29 14:52:31  dicuccio * Deprecated old accession entry dialog.  Added correct plugin argument to specify accession names * * Revision 1.13  2003/04/24 16:39:08  dicuccio * Updated to reflect changes in plugin API.  Changed location of document * marshal from framework to plugin * * Revision 1.12  2003/02/26 14:26:56  dicuccio * Removed unnecessary _TRACE() statements * * Revision 1.11  2003/02/24 13:03:16  dicuccio * Renamed classes in plugin spec: *     CArgSeg --> CPluginArgSet *     CArgument --> CPluginArg *     CPluginArgs --> CPluginCommand *     CPluginCommands --> CPluginCommandSet * * Revision 1.10  2003/02/20 19:49:56  dicuccio * Created new plugin architecture, based on ASN.1 spec.  Moved GBENCH * frameowrk over to use new plugin architecture. * * Revision 1.9  2003/02/06 18:48:36  dicuccio * Made 'catch (...)' conditional for non-debug builds * * Revision 1.8  2003/01/15 21:08:34  dicuccio * Removed dead _TRACE() statements * * Revision 1.7  2003/01/13 13:10:07  dicuccio * Namespace clean-up.  Retired namespace gui -> converted all to namespace * ncbi.  Moved all FLUID-generated code into namespace ncbi. * * Revision 1.6  2003/01/03 17:25:50  dicuccio * Fixed (finally!) issues regarding input validation of seq-ids. * * Revision 1.5  2002/12/30 18:44:20  dicuccio * Fixed a number of buglets in accession dialog and in handling of empty * accessions. * * Revision 1.4  2002/12/30 17:48:28  dicuccio * Added mechanism for data loader plugins to announce supported modes of * operation (load, import, save currently) * * Revision 1.3  2002/12/20 19:17:58  dicuccio * Added better handling of sueqnece ID errors (try not to segfault...) * * Revision 1.2  2002/12/12 15:22:38  dicuccio * Minot tweak to avoid a compiler warning. * * Revision 1.1  2002/11/25 20:51:01  dicuccio * Initial revision. * * =========================================================================== */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?