NCBI C++ ToolKit
src
app
pub_report
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
34
#include <
objects/seqset/Bioseq_set.hpp
>
35
#include <
objects/seq/Bioseq.hpp
>
36
37
#include "
base_report.hpp
"
38
#include "
seqid_hook.hpp
"
39
#include "
seq_entry_hook.hpp
"
40
41
USING_NCBI_SCOPE
;
42
USING_SCOPE
(
objects
);
43
44
namespace
pub_report
45
{
46
47
CSkipSeqEntryHook::CSkipSeqEntryHook
(
CBaseReport
& report) :
48
m_report(report),
49
m_level(0)
50
{
51
}
52
53
void
CSkipSeqEntryHook::SkipObject
(
CObjectIStream
&
in
,
const
CObjectTypeInfo
&
info
)
54
{
55
++
m_level
;
56
57
if
(
m_level
== 1) {
58
59
CObjectTypeInfo
type
=
CType<CBioseq>
();
60
type
.FindMember(
"id"
).SetLocalSkipHook(
in
,
new
CSkipSeqIdHook
(
m_report
));
61
62
DefaultSkip
(
in
,
info
);
63
64
m_report
.
ClearCurrentSeqId
();
65
m_report
.
ClearData
();
66
// do not call ResetLocalSkipHook here, because CSkipSeqIdHook class will do that by itself
67
}
else
68
DefaultSkip
(
in
,
info
);
69
70
--
m_level
;
71
}
72
73
}
Bioseq.hpp
Bioseq_set.hpp
base_report.hpp
CObjectIStream
CObjectIStream –.
Definition:
objistr.hpp:93
CObjectTypeInfo
CObjectTypeInfo –.
Definition:
objectinfo.hpp:94
CType
Definition:
objecttype.hpp:79
pub_report::CBaseReport
Definition:
base_report.hpp:42
pub_report::CBaseReport::ClearData
virtual void ClearData()
Definition:
base_report.hpp:65
pub_report::CBaseReport::ClearCurrentSeqId
virtual void ClearCurrentSeqId()
Definition:
base_report.hpp:56
pub_report::CSkipSeqEntryHook::SkipObject
void SkipObject(CObjectIStream &in, const CObjectTypeInfo &info) override
Definition:
seq_entry_hook.cpp:53
pub_report::CSkipSeqEntryHook::m_report
CBaseReport & m_report
Definition:
seq_entry_hook.hpp:53
pub_report::CSkipSeqEntryHook::m_level
size_t m_level
Definition:
seq_entry_hook.hpp:54
pub_report::CSkipSeqEntryHook::CSkipSeqEntryHook
CSkipSeqEntryHook(CBaseReport &report)
Definition:
seq_entry_hook.cpp:47
pub_report::CSkipSeqIdHook
Definition:
seqid_hook.hpp:47
CSkipObjectHook::DefaultSkip
void DefaultSkip(CObjectIStream &in, const CObjectTypeInfo &type)
Default skip.
Definition:
objhook.cpp:111
info
static MDB_envinfo info
Definition:
mdb_load.c:37
objects
Definition:
wiggle_export_job.hpp:44
pub_report
Definition:
base_report.hpp:39
ncbi_pch.hpp
in
std::istream & in(std::istream &in_, double &x_)
USING_SCOPE
USING_SCOPE(objects)
USING_NCBI_SCOPE
USING_NCBI_SCOPE
Definition:
seq_entry_hook.cpp:41
seq_entry_hook.hpp
seqid_hook.hpp
type
Definition:
type.c:6
Generated by
1.9.0
Modified on Sun May 05 05:19:06 2024 by modify_doxy.py rev. 669887