NCBI C++ ToolKit
split_parser.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef ID2_PARSER__HPP_INCLUDED
2 #define ID2_PARSER__HPP_INCLUDED
3 /* $Id: split_parser.hpp 70811 2016-01-22 15:40:54Z vasilche $
4  * ===========================================================================
5  * PUBLIC DOMAIN NOTICE
6  * National Center for Biotechnology Information
7  *
8  * This software/database is a "United States Government Work" under the
9  * terms of the United States Copyright Act. It was written as part of
10  * the author's official duties as a United States Government employee and
11  * thus cannot be copyrighted. This software/database is freely available
12  * to the public for use. The National Library of Medicine and the U.S.
13  * Government have not placed any restriction on its use or reproduction.
14  *
15  * Although all reasonable efforts have been taken to ensure the accuracy
16  * and reliability of the software and data, the NLM and the U.S.
17  * Government do not and cannot warrant the performance or results that
18  * may be obtained by using this software or data. The NLM and the U.S.
19  * Government disclaim all warranties, express or implied, including
20  * warranties of performance, merchantability or fitness for any particular
21  * purpose.
22  *
23  * Please cite the author in any work or product based on this material.
24  *
25  * ===========================================================================
26  *
27  * Author: Eugene Vasilchenko
28  *
29  * File Description: Methods to create object manager structures from ID2 spec
30  *
31  */
32 
33 #include <corelib/ncbiobj.hpp>
34 #include <util/range.hpp>
35 #include <vector>
36 #include <utility>
37 
40 
41 class CID2S_Split_Info;
42 class CID2S_Chunk_Info;
43 class CID2S_Chunk;
49 class CID2S_Seq_loc;
52 
53 class CTSE_Info;
54 class CTSE_Chunk_Info;
55 class CSeq_id_Handle;
56 
58 {
59 public:
60  static void Attach(CTSE_Info& tse, const CID2S_Split_Info& split);
61 
62  static CRef<CTSE_Chunk_Info> Parse(const CID2S_Chunk_Info& info);
63 
64  static void Load(CTSE_Chunk_Info& chunk, const CID2S_Chunk& data);
65 
66  static void x_Attach(CTSE_Chunk_Info& chunk,
67  const CID2S_Seq_descr_Info& descr);
68  static void x_Attach(CTSE_Chunk_Info& chunk,
69  const CID2S_Seq_annot_Info& annot);
70  static void x_Attach(CTSE_Chunk_Info& chunk,
71  const CID2S_Seq_annot_place_Info& place);
72  static void x_Attach(CTSE_Chunk_Info& chunk,
73  const CID2S_Seq_data_Info& data);
74  static void x_Attach(CTSE_Chunk_Info& chunk,
76  static void x_Attach(CTSE_Chunk_Info& chunk,
78  static void x_Attach(CTSE_Chunk_Info& chunk,
79  const CID2S_Seq_feat_Ids_Info& ids);
80 
83  typedef pair<TLocationId, TLocationRange> TLocation;
84  typedef vector<TLocation> TLocationSet;
85 
86  static void x_ParseLocation(TLocationSet& vec, const CID2S_Seq_loc& loc);
87 
88 protected:
89  static void x_AddWhole(TLocationSet& vec, const TLocationId& id);
90  static void x_AddInterval(TLocationSet& vec, const TLocationId& id,
91  TSeqPos start, TSeqPos length);
92  static void x_AddGiWhole(TLocationSet& vec, TGi gi);
93  static void x_AddGiInterval(TLocationSet& vec, TGi gi,
94  TSeqPos start, TSeqPos length);
95 };
96 
97 
100 
101 #endif//ID2_PARSER__HPP_INCLUDED
CID2S_Bioseq_place_Info –.
CID2S_Chunk_Info –.
CID2S_Chunk –.
Definition: ID2S_Chunk.hpp:66
CID2S_Seq_annot_Info –.
CID2S_Seq_annot_place_Info –.
CID2S_Seq_assembly_Info –.
CID2S_Seq_data_Info –.
CID2S_Seq_descr_Info –.
CID2S_Seq_feat_Ids_Info –.
CID2S_Seq_loc –.
CID2S_Split_Info –.
vector< TLocation > TLocationSet
pair< TLocationId, TLocationRange > TLocation
CSeq_id_Handle TLocationId
CRange< TSeqPos > TLocationRange
char data[12]
Definition: iconv.c:80
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define NCBI_XOBJMGR_EXPORT
Definition: ncbi_export.h:1307
static MDB_envinfo info
Definition: mdb_load.c:37
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
void split(std::vector< std::string > *strVec, const std::string &str_, const std::string &split_)
Modified on Wed Jun 19 17:06:40 2024 by modify_doxy.py rev. 669887