NCBI C++ ToolKit
seq_entry_hook.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /*
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Alexey Dobronadezhdin
27  *
28  * File Description:
29  *
30  * ===========================================================================
31  */
32 #include <ncbi_pch.hpp>
33 
35 #include <objects/seq/Bioseq.hpp>
36 
37 #include "base_report.hpp"
38 #include "seqid_hook.hpp"
39 #include "seq_entry_hook.hpp"
40 
43 
44 namespace pub_report
45 {
46 
48  m_report(report),
49  m_level(0)
50 {
51 }
52 
54 {
55  ++m_level;
56 
57  if (m_level == 1) {
58 
60  type.FindMember("id").SetLocalSkipHook(in, new CSkipSeqIdHook(m_report));
61 
63 
66  // do not call ResetLocalSkipHook here, because CSkipSeqIdHook class will do that by itself
67  } else
69 
70  --m_level;
71 }
72 
73 }
CObjectIStream –.
Definition: objistr.hpp:93
CObjectTypeInfo –.
Definition: objectinfo.hpp:94
virtual void ClearData()
Definition: base_report.hpp:65
virtual void ClearCurrentSeqId()
Definition: base_report.hpp:56
void SkipObject(CObjectIStream &in, const CObjectTypeInfo &info) override
CSkipSeqEntryHook(CBaseReport &report)
void DefaultSkip(CObjectIStream &in, const CObjectTypeInfo &type)
Default skip.
Definition: objhook.cpp:111
static MDB_envinfo info
Definition: mdb_load.c:37
std::istream & in(std::istream &in_, double &x_)
USING_SCOPE(objects)
USING_NCBI_SCOPE
Definition: type.c:6
Modified on Sun May 05 05:19:06 2024 by modify_doxy.py rev. 669887