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

Go to the SVN repository for this file.

1 /* $Id: src_table_column.cpp 61818 2014-02-19 18:28:55Z bollin $
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: Colleen Bollin
27  *
28  * File Description:
29  * Implementation of utility classes for handling source qualifiers by name
30  *
31  */
32 #include <ncbi_pch.hpp>
33 #include <corelib/ncbistd.hpp>
34 #include <corelib/ncbistr.hpp>
35 
36 #include <serial/enumvalues.hpp>
37 #include <serial/serialimpl.hpp>
38 
44 #include <objects/seq/Bioseq.hpp>
46 #include <objmgr/scope.hpp>
47 #include <objmgr/seq_vector.hpp>
48 #include <objmgr/util/sequence.hpp>
49 #include <objmgr/bioseq_ci.hpp>
50 #include <objmgr/seqdesc_ci.hpp>
52 
53 #include <vector>
54 #include <algorithm>
55 #include <list>
56 
57 #include "src_table_column.hpp"
58 
61 
62 
63 void CSrcTableOrganismNameColumn::AddToBioSource(
64  objects::CBioSource & in_out_bioSource, const string & newValue )
65 {
66  in_out_bioSource.SetOrg().SetTaxname(newValue);
67 }
68 
70  objects::CBioSource & in_out_bioSource )
71 {
72  in_out_bioSource.SetOrg().ResetTaxname();
73 }
74 
75 
77  const objects::CBioSource & in_out_bioSource ) const
78 {
79  string val = "";
80  if (in_out_bioSource.IsSetOrg() && in_out_bioSource.GetOrg().IsSetTaxname()) {
81  val = in_out_bioSource.GetOrg().GetTaxname();
82  }
83  return val;
84 }
85 
86 
88  objects::CBioSource & in_out_bioSource, const string & newValue )
89 {
90  try {
91  int val = NStr::StringToInt(newValue);
92  in_out_bioSource.SetOrg().SetTaxId(val);
93  } catch (...) {
94  }
95 }
96 
97 
99  objects::CBioSource & in_out_bioSource )
100 {
101  if (in_out_bioSource.IsSetOrg() && in_out_bioSource.GetOrg().IsSetDb()) {
102  COrg_ref::TDb::iterator it = in_out_bioSource.SetOrg().SetDb().begin();
103  while (it != in_out_bioSource.SetOrg().SetDb().end()) {
104  if ((*it)->IsSetDb() && NStr::EqualNocase((*it)->GetDb(), "taxon")) {
105  it = in_out_bioSource.SetOrg().SetDb().erase(it);
106  } else {
107  ++it;
108  }
109  }
110  }
111 }
112 
113 
115  const objects::CBioSource & in_out_bioSource ) const
116 {
117  string val = "";
118  if (in_out_bioSource.IsSetOrg()) {
119  try {
120  int taxid = in_out_bioSource.GetOrg().GetTaxId();
121  val = NStr::NumericToString(taxid);
122  } catch (...) {
123  }
124  }
125  return val;
126 }
127 
128 
130  objects::CBioSource & in_out_bioSource, const string & newValue )
131 {
132  in_out_bioSource.SetGenome(objects::CBioSource::GetGenomeByOrganelle(newValue));
133 }
134 
136  objects::CBioSource & in_out_bioSource )
137 {
138  in_out_bioSource.ResetGenome();
139 }
140 
141 
143  const objects::CBioSource & in_out_bioSource ) const
144 {
145  string val = "";
146  if (in_out_bioSource.IsSetGenome()) {
147  val = in_out_bioSource.GetOrganelleByGenome( in_out_bioSource.GetGenome());
148  }
149  return val;
150 }
151 
152 
153 
155  objects::CBioSource & in_out_bioSource, const string & newValue )
156 {
157  if (!NStr::IsBlank(newValue)) {
158  if (objects::CSubSource::NeedsNoText(m_Subtype)) {
159  CRef<objects::CSubSource> s(new objects::CSubSource(m_Subtype, " "));
160  in_out_bioSource.SetSubtype().push_back(s);
161  } else {
162  CRef<objects::CSubSource> s(new objects::CSubSource(m_Subtype, newValue));
163  in_out_bioSource.SetSubtype().push_back(s);
164  }
165  }
166 }
167 
169  objects::CBioSource & in_out_bioSource )
170 {
171  if (in_out_bioSource.IsSetSubtype()) {
172  objects::CBioSource::TSubtype::iterator it = in_out_bioSource.SetSubtype().begin();
173  while (it != in_out_bioSource.SetSubtype().end()) {
174  if ((*it)->GetSubtype() == m_Subtype) {
175  it = in_out_bioSource.SetSubtype().erase(it);
176  } else {
177  ++it;
178  }
179  }
180  if (in_out_bioSource.SetSubtype().empty()) {
181  in_out_bioSource.ResetSubtype();
182  }
183  }
184 }
185 
186 
188  const objects::CBioSource & in_out_bioSource ) const
189 {
190  string val = "";
191  if (in_out_bioSource.IsSetSubtype()) {
192  objects::CBioSource::TSubtype::const_iterator it = in_out_bioSource.GetSubtype().begin();
193  while (it != in_out_bioSource.GetSubtype().end()) {
194  if ((*it)->GetSubtype() == m_Subtype && (*it)->IsSetName()) {
195  val = (*it)->GetName();
196  break;
197  }
198  ++it;
199  }
200  }
201  return val;
202 }
203 
204 
206 {
207  if (m_Subtype == objects::CSubSource::eSubtype_other) {
208  return "subsrc_note";
209  } else {
211  }
212 }
213 
214 
216  objects::CBioSource & in_out_bioSource, const string & newValue )
217 {
218  if (!NStr::IsBlank(newValue)) {
219  CRef<objects::COrgMod> s(new objects::COrgMod(m_Subtype, newValue));
220  in_out_bioSource.SetOrg().SetOrgname().SetMod().push_back(s);
221  }
222 }
223 
225  objects::CBioSource & in_out_bioSource )
226 {
227  if (in_out_bioSource.IsSetOrg() && in_out_bioSource.GetOrg().IsSetOrgname() && in_out_bioSource.GetOrg().GetOrgname().IsSetMod()) {
228  objects::COrgName::TMod::iterator it = in_out_bioSource.SetOrg().SetOrgname().SetMod().begin();
229  while (it != in_out_bioSource.SetOrg().SetOrgname().SetMod().end()) {
230  if ((*it)->GetSubtype() == m_Subtype) {
231  it = in_out_bioSource.SetOrg().SetOrgname().SetMod().erase(it);
232  } else {
233  ++it;
234  }
235  }
236  }
237 }
238 
239 
241  const objects::CBioSource & in_out_bioSource ) const
242 {
243  string val = "";
244  if (in_out_bioSource.IsSetOrg() && in_out_bioSource.GetOrg().IsSetOrgname() && in_out_bioSource.GetOrg().GetOrgname().IsSetMod()) {
245  objects::COrgName::TMod::const_iterator it = in_out_bioSource.GetOrg().GetOrgname().GetMod().begin();
246  while (it != in_out_bioSource.GetOrg().GetOrgname().GetMod().end()) {
247  if ((*it)->GetSubtype() == m_Subtype && (*it)->IsSetSubname()) {
248  val = (*it)->GetSubname();
249  break;
250  }
251  ++it;
252  }
253  }
254  return val;
255 }
256 
257 
258 string CSrcTableOrgModColumn::GetLabel() const
259 {
260  if (m_Subtype == objects::COrgMod::eSubtype_other) {
261  return "orgmod_note";
262  } else {
264  }
265 }
266 
267 
269  objects::CBioSource & in_out_bioSource, const string & newValue )
270 {
271  objects::CPCRPrimerSeq seq(newValue);
272  bool add_new_set = true;
273  if (in_out_bioSource.IsSetPcr_primers() && in_out_bioSource.GetPcr_primers().IsSet()
274  && in_out_bioSource.GetPcr_primers().Get().size() > 0) {
275  // some sets exist, can we add to the last one?
276  if (in_out_bioSource.GetPcr_primers().Get().back()->IsSetForward()
277  && in_out_bioSource.GetPcr_primers().Get().back()->GetForward().IsSet()) {
278  if (!in_out_bioSource.GetPcr_primers().Get().back()->GetForward().Get().front()->IsSetSeq()) {
279  in_out_bioSource.SetPcr_primers().Set().back()->SetForward().Set().front()->SetSeq(seq);
280  add_new_set = false;
281  }
282  } else {
283  CRef<objects::CPCRPrimer> primer (new objects::CPCRPrimer());
284  primer->SetSeq(seq);
285  in_out_bioSource.SetPcr_primers().Set().back()->SetForward().Set().push_back(primer);
286  add_new_set = false;
287  }
288  }
289 
290  if (add_new_set) {
291  CRef<objects::CPCRPrimer> primer (new objects::CPCRPrimer());
292  primer->SetSeq(seq);
293  CRef<objects::CPCRReaction> reaction (new objects::CPCRReaction());
294  reaction->SetForward().Set().push_back(primer);
295  in_out_bioSource.SetPcr_primers().Set().push_back(reaction);
296  }
297 }
298 
300  objects::CBioSource & in_out_bioSource )
301 {
302  in_out_bioSource.ResetPcr_primers();
303 }
304 
305 
307  const objects::CBioSource & in_out_bioSource ) const
308 {
309  string val = "";
310  if (in_out_bioSource.IsSetPcr_primers()
311  && in_out_bioSource.GetPcr_primers().IsSet()
312  && in_out_bioSource.GetPcr_primers().Get().size() > 0
313  && in_out_bioSource.GetPcr_primers().Get().front()->IsSetForward()
314  && in_out_bioSource.GetPcr_primers().Get().front()->GetForward().IsSet()
315  && in_out_bioSource.GetPcr_primers().Get().front()->GetForward().Get().front()->IsSetSeq()) {
316  val = in_out_bioSource.GetPcr_primers().Get().front()->GetForward().Get().front()->GetSeq();
317  }
318  return val;
319 }
320 
321 
323  objects::CBioSource & in_out_bioSource, const string & newValue )
324 {
325  objects::CPCRPrimerSeq seq(newValue);
326  bool add_new_set = true;
327  if (in_out_bioSource.IsSetPcr_primers() && in_out_bioSource.GetPcr_primers().IsSet()
328  && in_out_bioSource.GetPcr_primers().Get().size() > 0) {
329  // some sets exist, can we add to the last one?
330  if (in_out_bioSource.GetPcr_primers().Get().back()->IsSetReverse()
331  && in_out_bioSource.GetPcr_primers().Get().back()->GetReverse().IsSet()) {
332  if (!in_out_bioSource.GetPcr_primers().Get().back()->GetReverse().Get().front()->IsSetSeq()) {
333  in_out_bioSource.SetPcr_primers().Set().back()->SetReverse().Set().front()->SetSeq(seq);
334  add_new_set = false;
335  }
336  } else {
337  CRef<objects::CPCRPrimer> primer (new objects::CPCRPrimer());
338  primer->SetSeq(seq);
339  in_out_bioSource.SetPcr_primers().Set().back()->SetReverse().Set().push_back(primer);
340  add_new_set = false;
341  }
342  }
343 
344  if (add_new_set) {
345  CRef<objects::CPCRPrimer> primer (new objects::CPCRPrimer());
346  primer->SetSeq(seq);
347  CRef<objects::CPCRReaction> reaction (new objects::CPCRReaction());
348  reaction->SetReverse().Set().push_back(primer);
349  in_out_bioSource.SetPcr_primers().Set().push_back(reaction);
350  }
351 }
352 
353 
355  objects::CBioSource & in_out_bioSource )
356 {
357  in_out_bioSource.ResetPcr_primers();
358 }
359 
360 
362  const objects::CBioSource & in_out_bioSource ) const
363 {
364  string val = "";
365  if (in_out_bioSource.IsSetPcr_primers()
366  && in_out_bioSource.GetPcr_primers().IsSet()
367  && in_out_bioSource.GetPcr_primers().Get().size() > 0
368  && in_out_bioSource.GetPcr_primers().Get().front()->IsSetReverse()
369  && in_out_bioSource.GetPcr_primers().Get().front()->GetReverse().IsSet()
370  && in_out_bioSource.GetPcr_primers().Get().front()->GetReverse().Get().front()->IsSetSeq()) {
371  val = in_out_bioSource.GetPcr_primers().Get().front()->GetReverse().Get().front()->GetSeq();
372  }
373  return val;
374 }
375 
376 
378  objects::CBioSource & in_out_bioSource, const string & newValue )
379 {
380  objects::CPCRPrimerName name(newValue);
381  bool add_new_set = true;
382 
383  if (in_out_bioSource.IsSetPcr_primers() && in_out_bioSource.GetPcr_primers().IsSet()
384  && in_out_bioSource.GetPcr_primers().Get().size() > 0) {
385  // some sets exist, can we add to the last one?
386  if (in_out_bioSource.GetPcr_primers().Get().back()->IsSetForward()
387  && in_out_bioSource.GetPcr_primers().Get().back()->GetForward().IsSet()) {
388  if (!in_out_bioSource.GetPcr_primers().Get().back()->GetForward().Get().front()->IsSetName()) {
389  in_out_bioSource.SetPcr_primers().Set().back()->SetForward().Set().front()->SetName(name);
390  add_new_set = false;
391  }
392  } else {
393  CRef<objects::CPCRPrimer> primer (new objects::CPCRPrimer());
394  primer->SetName(name);
395  in_out_bioSource.SetPcr_primers().Set().back()->SetForward().Set().push_back(primer);
396  add_new_set = false;
397  }
398  }
399 
400  if (add_new_set) {
401  CRef<objects::CPCRPrimer> primer (new objects::CPCRPrimer());
402  primer->SetName(name);
403  CRef<objects::CPCRReaction> reaction (new objects::CPCRReaction());
404  reaction->SetForward().Set().push_back(primer);
405  in_out_bioSource.SetPcr_primers().Set().push_back(reaction);
406  }
407 }
408 
410  objects::CBioSource & in_out_bioSource )
411 {
412  in_out_bioSource.ResetPcr_primers();
413 }
414 
415 
417  const objects::CBioSource & in_out_bioSource ) const
418 {
419  string val = "";
420  if (in_out_bioSource.IsSetPcr_primers()
421  && in_out_bioSource.GetPcr_primers().IsSet()
422  && in_out_bioSource.GetPcr_primers().Get().size() > 0
423  && in_out_bioSource.GetPcr_primers().Get().front()->IsSetForward()
424  && in_out_bioSource.GetPcr_primers().Get().front()->GetForward().IsSet()
425  && in_out_bioSource.GetPcr_primers().Get().front()->GetForward().Get().front()->IsSetName()) {
426  val = in_out_bioSource.GetPcr_primers().Get().front()->GetForward().Get().front()->GetName();
427  }
428  return val;
429 }
430 
431 
433  objects::CBioSource & in_out_bioSource, const string & newValue )
434 {
435  objects::CPCRPrimerName name(newValue);
436  bool add_new_set = true;
437 
438  if (in_out_bioSource.IsSetPcr_primers() && in_out_bioSource.GetPcr_primers().IsSet()
439  && in_out_bioSource.GetPcr_primers().Get().size() > 0) {
440  // some sets exist, can we add to the last one?
441  if (in_out_bioSource.GetPcr_primers().Get().back()->IsSetReverse()
442  && in_out_bioSource.GetPcr_primers().Get().back()->GetReverse().IsSet()) {
443  if (!in_out_bioSource.GetPcr_primers().Get().back()->GetReverse().Get().front()->IsSetName()) {
444  in_out_bioSource.SetPcr_primers().Set().back()->SetReverse().Set().front()->SetName(name);
445  add_new_set = false;
446  }
447  } else {
448  CRef<objects::CPCRPrimer> primer (new objects::CPCRPrimer());
449  primer->SetName(name);
450  in_out_bioSource.SetPcr_primers().Set().back()->SetReverse().Set().push_back(primer);
451  add_new_set = false;
452  }
453  }
454 
455  if (add_new_set) {
456  CRef<objects::CPCRPrimer> primer (new objects::CPCRPrimer());
457  primer->SetName(name);
458  CRef<objects::CPCRReaction> reaction (new objects::CPCRReaction());
459  reaction->SetReverse().Set().push_back(primer);
460  in_out_bioSource.SetPcr_primers().Set().push_back(reaction);
461  }
462 }
463 
464 
466  objects::CBioSource & in_out_bioSource )
467 {
468  in_out_bioSource.ResetPcr_primers();
469 }
470 
471 
473  const objects::CBioSource & in_out_bioSource ) const
474 {
475  string val = "";
476  if (in_out_bioSource.IsSetPcr_primers()
477  && in_out_bioSource.GetPcr_primers().IsSet()
478  && in_out_bioSource.GetPcr_primers().Get().size() > 0
479  && in_out_bioSource.GetPcr_primers().Get().front()->IsSetReverse()
480  && in_out_bioSource.GetPcr_primers().Get().front()->GetReverse().IsSet()
481  && in_out_bioSource.GetPcr_primers().Get().front()->GetReverse().Get().front()->IsSetName()) {
482  val = in_out_bioSource.GetPcr_primers().Get().front()->GetReverse().Get().front()->GetName();
483  }
484  return val;
485 }
486 
487 
488 bool IsFwdPrimerName (string name)
489 {
490  return (NStr::EqualNocase(name, "fwd-primer-name") || NStr::EqualNocase(name, "fwd primer name")
491  || NStr::EqualNocase(name, "fwd-name") || NStr::EqualNocase(name, "fwd name"));
492 }
493 
494 
495 bool IsRevPrimerName (string name)
496 {
497  return (NStr::EqualNocase(name, "rev-primer-name") || NStr::EqualNocase(name, "rev primer name")
498  || NStr::EqualNocase(name, "rev-name") || NStr::EqualNocase(name, "rev name"));
499 }
500 
501 
502 bool IsFwdPrimerSeq (string name)
503 {
504  return (NStr::EqualNocase(name, "fwd-primer-seq") || NStr::EqualNocase(name, "fwd primer seq")
505  || NStr::EqualNocase(name, "fwd-seq") || NStr::EqualNocase(name, "fwd seq"));
506 }
507 
508 
509 bool IsRevPrimerSeq (string name)
510 {
511  return (NStr::EqualNocase(name, "rev-primer-seq") || NStr::EqualNocase(name, "rev primer seq")
512  || NStr::EqualNocase(name, "rev-seq") || NStr::EqualNocase(name, "rev seq"));
513 }
514 
515 
518 {
519  // the default is a CSrcTableEditCommandFactory that does nothing
520 
521  if( sTitle.empty() ) {
523  }
524 
525  if( NStr::EqualNocase(sTitle, kOrganismName) || NStr::EqualNocase(sTitle, "org") || NStr::EqualNocase(sTitle, "taxname") ) {
527  }
528 
529  if (NStr::EqualNocase(sTitle, kTaxId)) {
531  }
532 
533  if (NStr::EqualNocase( sTitle, "genome" )) {
535  }
536 
537  if (NStr::EqualNocase(sTitle, "SubSource Note") ) {
538  return CRef<CSrcTableColumnBase>( new CSrcTableSubSourceColumn (objects::CSubSource::eSubtype_other));
539  }
540 
541  if (NStr::EqualNocase(sTitle, "OrgMod Note") ) {
542  return CRef<CSrcTableColumnBase>( new CSrcTableOrgModColumn (objects::COrgMod::eSubtype_other));
543  }
544 
545  if (IsFwdPrimerName(sTitle)) {
547  }
548 
549  if (IsFwdPrimerSeq(sTitle)) {
551  }
552 
553  if (IsRevPrimerName(sTitle)) {
555  }
556 
557  if (IsRevPrimerSeq(sTitle)) {
559  }
560 
561  // see if it's a SubSource subtype:
562  try {
563  objects::CSubSource::TSubtype st = objects::CSubSource::GetSubtypeValue (sTitle, objects::CSubSource::eVocabulary_insdc);
565  } catch (...) {
566  try {
567  objects::COrgMod::TSubtype st = objects::COrgMod::GetSubtypeValue (sTitle, objects::COrgMod::eVocabulary_insdc);
569  } catch (...) {
570  }
571  }
572 
574 }
575 
576 
578 {
579  TSrcTableColumnList fields;
580 
581  if (src.IsSetSubtype()) {
583  fields.push_back(CRef<CSrcTableColumnBase>(new CSrcTableSubSourceColumn((*it)->GetSubtype())));
584  }
585  }
586  if (src.IsSetPcr_primers()) {
591  }
592 
593  if (src.IsSetOrg()) {
594  if (src.GetOrg().IsSetTaxname()) {
596  try {
597  src.GetOrg().GetTaxId();
598  fields.push_back(CRef<CSrcTableColumnBase>(new CSrcTableTaxonIdColumn()));
599  } catch (...) {
600  }
601  }
602  if (src.GetOrg().IsSetOrgname() && src.GetOrg().GetOrgname().IsSetMod()) {
603  ITERATE(COrgName::TMod, it, src.GetOrg().GetOrgname().GetMod()) {
604  fields.push_back(CRef<CSrcTableColumnBase>(new CSrcTableOrgModColumn((*it)->GetSubtype())));
605  }
606  }
607  }
608  return fields;
609 }
610 
611 
612 
613 
static string GetSubtypeName(const CSubSource &qual)
TTaxId GetTaxId() const
Definition: Org_ref.cpp:72
CRef –.
Definition: ncbiobj.hpp:618
static CRef< CSrcTableColumnBase > Create(const objects::CSeqTable_column &column)
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
virtual void AddToBioSource(objects::CBioSource &in_out_bioSource, const string &newValue)
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
virtual void AddToBioSource(objects::CBioSource &in_out_bioSource, const string &newValue)
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual bool AddToBioSource(objects::CBioSource &src, const string &newValue, objects::edit::EExistingText existing_text)
virtual string GetLabel() const
virtual bool AddToBioSource(objects::CBioSource &src, const string &newValue, objects::edit::EExistingText existing_text)
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
objects::COrgMod::TSubtype m_Subtype
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
virtual void AddToBioSource(objects::CBioSource &in_out_bioSource, const string &newValue)
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual void AddToBioSource(objects::CBioSource &in_out_bioSource, const string &newValue)
objects::CSubSource::TSubtype m_Subtype
virtual string GetLabel() const
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual bool AddToBioSource(objects::CBioSource &src, const string &newValue, objects::edit::EExistingText existing_text)
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
virtual bool AddToBioSource(objects::CBioSource &in_out_bioSource, const string &newValue, objects::edit::EExistingText existing_text)
virtual void ClearInBioSource(objects::CBioSource &in_out_bioSource)
virtual string GetFromBioSource(const objects::CBioSource &in_out_bioSource) const
Include a standard set of the NCBI C++ Toolkit most basic headers.
The NCBI C++ standard methods for dealing with std::string.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NULL
Definition: ncbistd.hpp:225
#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
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
Definition: ncbistr.cpp:630
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
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.
Definition: ncbistr.hpp:673
const TSubtype & GetSubtype(void) const
Get the Subtype member data.
Definition: BioSource_.hpp:539
bool IsSetOrg(void) const
Check if a value has been assigned to Org data member.
Definition: BioSource_.hpp:497
list< CRef< CSubSource > > TSubtype
Definition: BioSource_.hpp:145
bool IsSetSubtype(void) const
Check if a value has been assigned to Subtype data member.
Definition: BioSource_.hpp:527
bool IsSetPcr_primers(void) const
Check if a value has been assigned to Pcr_primers data member.
Definition: BioSource_.hpp:576
const TOrg & GetOrg(void) const
Get the Org member data.
Definition: BioSource_.hpp:509
const TMod & GetMod(void) const
Get the Mod member data.
Definition: OrgName_.hpp:839
bool IsSetMod(void) const
Check if a value has been assigned to Mod data member.
Definition: OrgName_.hpp:827
list< CRef< COrgMod > > TMod
Definition: OrgName_.hpp:332
bool IsSetOrgname(void) const
Check if a value has been assigned to Orgname data member.
Definition: Org_ref_.hpp:529
bool IsSetTaxname(void) const
preferred formal name Check if a value has been assigned to Taxname data member.
Definition: Org_ref_.hpp:360
const TOrgname & GetOrgname(void) const
Get the Orgname member data.
Definition: Org_ref_.hpp:541
The Object manager core.
TSrcTableColumnList GetSourceFields(const CBioSource &src)
bool IsFwdPrimerSeq(string name)
bool IsRevPrimerSeq(string name)
bool IsFwdPrimerName(string name)
bool IsRevPrimerName(string name)
const string kOrganismName
vector< CRef< CSrcTableColumnBase > > TSrcTableColumnList
const string kTaxId
#define const
Definition: zconf.h:232
Modified on Thu Apr 25 08:19:03 2024 by modify_doxy.py rev. 669887