72 auto& user = desc.GetUser();
73 if (user.IsSetType() && user.GetType().IsStr() &&
NStr::Equal(user.GetType().GetStr(),
"StructuredComment"))
75 if (user.IsSetData() && user.GetData().size() > 0)
77 const auto& fdata = *user.GetData().front();
78 if (fdata.IsSetLabel() && fdata.GetLabel().IsStr() &&
NStr::Equal(fdata.GetLabel().GetStr(),
"StructuredCommentPrefix"))
79 return fdata.GetData().GetStr();
88 if (name.
compare(
"StructuredCommentPrefix") == 0)
95 user_obj = &(user_desc->
SetUser());
96 user_obj->SetType().SetStr(
"StructuredComment");
97 cmt.
m_descs.push_back(user_desc);
99 user_obj->AddField(name,
value);
101 if (name.
compare(
"StructuredCommentSuffix") == 0)
109 cmt.
m_descs.reserve(values.size() - 1);
110 objects::CUser_object* user = 0;
112 for (
size_t i = 1;
i<values.size();
i++)
126 while (!reader.
AtEOF() && cols.empty())
157 return (pTsid->
GetName() == commentIdText);
163 switch (seqID.
Which()) {
177 if (general.IsSetTag()) {
178 if (general.GetTag().IsStr()) {
206 unsigned char chain =
static_cast<unsigned char>(pid.
GetChain());
209 seqIdText +=
static_cast<char>(chain);
215 return (seqIdText == commentIdText);
User-defined methods of the data storage class.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Abstract base class for lightweight line-by-line reading.
const TPrim & Get(void) const
CTempString GetCurrentLine(void) const
virtual bool AtEOF(void) const =0
Indicates (negatively) whether there is any more input.
const CTextseq_id * GetTextseq_Id(void) const
Return embedded CTextseq_id, if any.
E_SIC Compare(const CSeq_id &sid2) const
Compare() - more general.
@ e_YES
SeqIds compared, but are different.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
int compare(const CTempString str) const
Compare the current string with a given string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
bool IsNumber(void) const
Check if variant Number is selected.
const TId & GetId(void) const
Get the Id member data.
const TNumber & GetNumber(void) const
Get the variant data.
const TApp_number & GetApp_number(void) const
Get the variant data.
const TTag & GetTag(void) const
Get the Tag member data.
const TStr & GetStr(void) const
Get the variant data.
TChain GetChain(void) const
Get the Chain member data.
const TPdb & GetPdb(void) const
Get the variant data.
TGibbsq GetGibbsq(void) const
Get the variant data.
TId GetId(void) const
Get the Id member data.
bool IsSetChain_id(void) const
chain identifier; length-independent generalization of 'chain' Check if a value has been assigned to ...
bool IsSetChain(void) const
Deprecated: 'chain' can't support multiple character PDB chain identifiers (introduced in 2015).
bool IsSetAccession(void) const
Check if a value has been assigned to Accession data member.
const TName & GetName(void) const
Get the Name member data.
E_Choice Which(void) const
Which variant is currently selected.
TGi GetGi(void) const
Get the variant data.
const TMol & GetMol(void) const
Get the Mol member data.
TSeqid GetSeqid(void) const
Get the Seqid member data.
const TGiim & GetGiim(void) const
Get the variant data.
const TLocal & GetLocal(void) const
Get the variant data.
bool IsLocal(void) const
Check if variant Local is selected.
const TChain_id & GetChain_id(void) const
Get the Chain_id member data.
const TGeneral & GetGeneral(void) const
Get the variant data.
const TPatent & GetPatent(void) const
Get the variant data.
TGibbmt GetGibbmt(void) const
Get the variant data.
const TCit & GetCit(void) const
Get the Cit member data.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
const TAccession & GetAccession(void) const
Get the Accession member data.
@ e_Gibbmt
Geninfo backbone moltype.
@ e_Giim
Geninfo import id.
@ e_Gibbsq
Geninfo backbone seqid.
@ e_General
for other databases
@ e_Gi
GenInfo Integrated Database.
TUser & SetUser(void)
Select the variant.
Lightweight interface for getting lines of data with minimal memory copying.
constexpr bool empty(list< Ts... >) noexcept
const GenericPointer< typename T::ValueType > T2 value