NCBI C++ ToolKit
loadfeat.h
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: loadfeat.h 102387 2024-04-29 15:07:50Z stakhovv $
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  * File Name: loadfeat.h
27  *
28  * Author: Karl Sirotkin, Hsiu-Chuan Chen
29  *
30  * File Description:
31  *
32  */
33 
34 #ifndef _LOADFEAT_
35 #define _LOADFEAT_
36 
38 
39 #include "xgbfeat.h"
40 #include "asci_blk.h"
41 
43 struct FeatBlk : public CFlatFileData {
44  Int4 num = 0;
45  string key;
46  char* location = nullptr;
48 
50 
51  const char* key_or(const char* pch) const { return key.empty() ? pch : key.c_str(); }
52 
53  void location_assign(string_view);
54  bool location_isset() const { return location != nullptr; }
55  const char* location_get() const { return location; }
56  const char* location_c_str() const { return location; }
57  const char* location_or(const char* pch) const { return location ? location : pch; }
58 
59  ~FeatBlk();
60 };
61 
63 
64 void LoadFeat(ParserPtr pp, const DataBlk& entry, objects::CBioseq& bioseq);
66 
67 void GetFlatBiomol(int& biomol, int tech, char* molstr, ParserPtr pp, const DataBlk& entry, const objects::COrg_ref* org_ref);
68 
69 bool GetSeqLocation(objects::CSeq_feat& feat, const char* location, TSeqIdList& ids, bool* hard_err, ParserPtr pp, const string& name);
70 
72 
73 #endif
std::list< CRef< objects::CSeq_id > > TSeqIdList
Definition: ftablock.h:57
static const char location[]
Definition: config.c:97
int16_t Int2
2-byte (16-bit) signed integer
Definition: ncbitype.h:100
int32_t Int4
4-byte (32-bit) signed integer
Definition: ncbitype.h:102
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
void LoadFeat(ParserPtr pp, const DataBlk &entry, objects::CBioseq &bioseq)
bool GetSeqLocation(objects::CSeq_feat &feat, const char *location, TSeqIdList &ids, bool *hard_err, ParserPtr pp, const string &name)
int ParseFeatureBlock(IndexblkPtr ibp, bool deb, DataBlkPtr dbp, Int2 source, Parser::EFormat format)
void GetFlatBiomol(int &biomol, int tech, char *molstr, ParserPtr pp, const DataBlk &entry, const objects::COrg_ref *org_ref)
const CharType(& source)[N]
Definition: pointer.h:1149
static Format format
Definition: njn_ioutil.cpp:53
Int2 spindex
Definition: loadfeat.h:47
const char * key_or(const char *pch) const
Definition: loadfeat.h:51
TQualVector quals
Definition: loadfeat.h:49
void location_assign(string_view)
Definition: loadfeat.cpp:566
Int4 num
Definition: loadfeat.h:44
char * location
Definition: loadfeat.h:46
const char * location_get() const
Definition: loadfeat.h:55
const char * location_c_str() const
Definition: loadfeat.h:56
const char * location_or(const char *pch) const
Definition: loadfeat.h:57
bool location_isset() const
Definition: loadfeat.h:54
string key
Definition: loadfeat.h:45
~FeatBlk()
Definition: loadfeat.cpp:571
std::vector< CRef< objects::CGb_qual > > TQualVector
Definition: xgbfeat.h:12
Modified on Fri May 03 15:49:20 2024 by modify_doxy.py rev. 669887