demo_data_source.cpp

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

CPP
157
字号
/* * =========================================================================== * PRODUCTION $Log: demo_data_source.cpp,v $ * PRODUCTION Revision 1000.2  2004/06/01 21:08:09  gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.12 * PRODUCTION * =========================================================================== *//*  $Id: demo_data_source.cpp,v 1000.2 2004/06/01 21:08:09 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:  Vlad Lebedev * */#include <ncbi_pch.hpp>#include <gui/gui.hpp>#include "demo_data_source.hpp" #include <corelib/ncbiutil.hpp>#include <gui/objutils/utils.hpp>#include <objtools/alnmgr/alnmix.hpp>#include <objects/seqalign/Dense_seg.hpp>// Object Manager includes#include <objmgr/object_manager.hpp>#include <objmgr/scope.hpp>#include <objmgr/seq_vector.hpp>#include <objmgr/seq_descr_ci.hpp>#include <objmgr/feat_ci.hpp>#include <objmgr/align_ci.hpp>#include <objtools/data_loaders/genbank/gbloader.hpp>#include <objtools/data_loaders/genbank/readers/id1/reader_id1.hpp>#include <objmgr/util/sequence.hpp>#include <objects/seqloc/Seq_id.hpp>#include <objects/seqloc/Textseq_id.hpp>#include <objects/seqset/Seq_entry.hpp>#include <serial/iterator.hpp>using namespace ncbi;using namespace objects;CTextAlnViewTestDS::CTextAlnViewTestDS(){    _TRACE( "Connecting to database..." );    m_ObjMgr = new CObjectManager;    m_ObjMgr->RegisterDataLoader(*new CGBDataLoader(),                                 CObjectManager::eDefault);    m_Scope = new CScope(*m_ObjMgr);    m_Scope->AddDefaults();    CSeq_id seq_id;    //seq_id.SetGi(6467445);    //seq_id.SetGi(19880863);    seq_id.SetGi(19568015);    //seq_id.SetGi(19172277);    CBioseq_Handle handle = m_Scope->GetBioseqHandle(seq_id);    CAlign_CI iter(handle, 0, 0, SAnnotSelector());    Init(iter, *m_Scope);}CTextAlnViewTestDS::~CTextAlnViewTestDS(){    m_AlnMgr.Reset();    m_Scope.Reset();    m_ObjMgr.Reset();}/* * =========================================================================== * $Log: demo_data_source.cpp,v $ * Revision 1000.2  2004/06/01 21:08:09  gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.12 * * Revision 1.12  2004/05/21 22:27:53  gorelenk * Added PCH ncbi_pch.hpp * * Revision 1.11  2004/05/03 17:53:22  dicuccio * gui/utils --> gui/objutils where needed * * Revision 1.10  2004/02/11 15:09:45  yazhuk * Replaced x_Init() call with Init() * * Revision 1.9  2004/02/09 19:18:52  grichenk * Renamed CDesc_CI to CSeq_descr_CI. Redesigned CSeq_descr_CI * and CSeqdesc_CI to avoid using data directly. * * Revision 1.8  2004/01/07 17:39:05  vasilche * Fixed include path to genbank loader. * * Revision 1.7  2003/09/24 18:34:58  dicuccio * Use new generic alignment data source.  Removed USING_SCOPE(objects) from * headers; used objects:: where necessary * * Revision 1.6  2003/06/23 13:23:14  dicuccio * Deprecated seq_utils.[h,c]pp - moved functions into gui.utils/utils.hpp * * Revision 1.5  2003/06/02 16:06:28  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.4  2003/05/16 17:03:02  lebedev * Removed files from different widget * * Revision 1.3  2003/04/19 14:21:08  ucko * iterate -> ITERATE * * Revision 1.2  2003/03/27 20:38:57  dicuccio * Fixed compilation errors under Linux (gcc-3.0.4) * * Revision 1.1  2003/03/27 17:04:15  lebedev * Text Alignment Widget Demo: Initial revision * * =========================================================================== */

⌨️ 快捷键说明

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