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

Go to the SVN repository for this file.

1 /* $Id: validator.cpp 77940 2017-05-16 13:11:28Z 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: Jonathan Kans, Clifford Clausen, Aaron Ucko.......
27  *
28  * File Description:
29  * Validates CSeq_entries and CSeq_submits
30  *
31  */
32 #include <ncbi_pch.hpp>
33 #include <corelib/ncbistd.hpp>
34 #include <serial/serialbase.hpp>
36 #include <objects/seq/Bioseq.hpp>
37 #include <objects/seq/Seqdesc.hpp>
39 #include <objmgr/util/sequence.hpp>
41 #include <util/static_map.hpp>
45 
48 
49 
54 
55 
56 // *********************** CValidator implementation **********************
57 
58 
60  AutoPtr<ITaxon3> taxon) :
61  m_ObjMgr(&objmgr),
62  m_PrgCallback(0),
63  m_UserData(0)
64 {
65  if (taxon.get() == NULL) {
66  AutoPtr<ITaxon3> taxon3(new CTaxon3);
67  taxon3->Init();
68  m_Taxon = taxon3;
69  } else {
70  m_Taxon = taxon;
71  }
72  m_Taxon->Init();
73 }
74 
75 
77 {
78 }
79 
80 
82 (const CSeq_entry& se,
83  CScope* scope,
84  Uint4 options)
85 {
86  CRef<CValidError> errors(new CValidError(&se));
88  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), options);
89  imp.SetProgressCallback(m_PrgCallback, m_UserData);
90  if ( !imp.Validate(se, 0, scope) ) {
91  errors.Reset();
92  }
93  return errors;
94 }
95 
97 (const CSeq_entry_Handle& seh,
98  Uint4 options)
99 {
100  static unsigned int num_e = 0, mult = 0;
101 
102  num_e++;
103  if (num_e % 200 == 0) {
104  num_e = 0;
105  mult++;
106  }
107 
110  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), options);
111  imp.SetProgressCallback(m_PrgCallback, m_UserData);
112  if ( !imp.Validate(seh, 0) ) {
113  errors.Reset();
114  }
115  return errors;
116 }
117 
118 
120 {
123  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), 0);
125  if ( !imp.GetTSANStretchErrors(se) ) {
126  errors.Reset();
127  }
128  return errors;
129 }
130 
131 
133 {
136  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), 0);
138  if ( !imp.GetTSACDSOnMinusStrandErrors(se) ) {
139  errors.Reset();
140  }
141  return errors;
142 }
143 
144 
146 {
149  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), 0);
151  if ( !imp.GetTSAConflictingBiomolTechErrors(se) ) {
152  errors.Reset();
153  }
154  return errors;
155 }
156 
157 
159 {
160 
161  CRef<CValidError> errors(new CValidError(&seq));
163  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), 0);
165  if ( !imp.GetTSANStretchErrors(seq) ) {
166  errors.Reset();
167  }
168  return errors;
169 }
170 
171 
173 {
174  CRef<CValidError> errors(new CValidError(&f));
176  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), 0);
178  if ( !imp.GetTSACDSOnMinusStrandErrors(f, seq) ) {
179  errors.Reset();
180  }
181  return errors;
182 }
183 
184 
186 {
187  CRef<CValidError> errors(new CValidError(&seq));
189  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), 0);
191  if ( !imp.GetTSAConflictingBiomolTechErrors(seq) ) {
192  errors.Reset();
193  }
194  return errors;
195 }
196 
197 
199 (const CSeq_submit& ss,
200  CScope* scope,
201  Uint4 options)
202 {
203  CRef<CValidError> errors(new CValidError(&ss));
205  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), options);
206  imp.Validate(ss, scope);
207  if (ss.IsSetSub() && ss.GetSub().IsSetContact() && ss.GetSub().GetContact().IsSetContact()
208  && ss.GetSub().GetContact().GetContact().IsSetAffil()
209  && ss.GetSub().GetContact().GetContact().GetAffil().IsStd()) {
210  imp.ValidateAffil(ss.GetSub().GetContact().GetContact().GetAffil().GetStd(),
211  ss, 0);
212  }
213 
214  return errors;
215 }
216 
217 
219 (const CSeq_annot_Handle& sah,
220  Uint4 options)
221 {
223  CRef<CValidError> errors(new CValidError(&*sar));
224  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), options);
225  imp.Validate(sah);
226  return errors;
227 }
228 
229 
231 (const CSeq_feat& feat,
232  CScope *scope,
233  Uint4 options)
234 {
235  CRef<CValidError> errors(new CValidError(&feat));
236  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), options);
237  imp.Validate(feat, scope);
238  return errors;
239 }
240 
242 (const CSeq_feat& feat,
243  Uint4 options)
244 {
245  return Validate(feat, NULL, options);
246 }
247 
249 (const CBioSource& src,
250  CScope *scope,
251  Uint4 options)
252 {
253  CRef<CValidError> errors(new CValidError(&src));
254  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), options);
255  imp.Validate(src, scope);
256  return errors;
257 }
258 
260 (const CBioSource& src,
261  Uint4 options)
262 {
263  return Validate(src, NULL, options);
264 }
265 
267 (const CPubdesc& pubdesc,
268  CScope *scope,
269  Uint4 options)
270 {
271  CRef<CValidError> errors(new CValidError(&pubdesc));
272  CValidError_imp imp(*m_ObjMgr, &(*errors), m_Taxon.get(), options);
273  imp.Validate(pubdesc, scope);
274  return errors;
275 }
276 
278 (const CPubdesc& pubdesc,
279  Uint4 options)
280 {
281  return Validate(pubdesc, NULL, options);
282 }
283 
284 void CValidator::SetProgressCallback(TProgressCallback callback, void* user_data)
285 {
286  m_PrgCallback = callback;
287  m_UserData = user_data;
288 }
289 
290 
291 bool CValidator::BadCharsInAuthorName(const string& str, bool allowcomma, bool allowperiod, bool last)
292 {
293  if (NStr::IsBlank(str)) {
294  return false;
295  }
296 
297 
298  size_t stp = string::npos;
299  if (last) {
300  if (NStr::StartsWith(str, "St.")) {
301  stp = 2;
302  }
303  else if (NStr::StartsWith(str, "de M.")) {
304  stp = 4;
305  }
306  }
307 
308  size_t pos = 0;
309  const char *ptr = str.c_str();
310 
311  while (*ptr != 0) {
312  if (isalpha(*ptr)
313  || *ptr == '-'
314  || *ptr == '\''
315  || *ptr == ' '
316  || (*ptr == ',' && allowcomma)
317  || (*ptr == '.' && (allowperiod || pos == stp))) {
318  // all these are ok
319  ptr++;
320  pos++;
321  } else {
322  string tail = str.substr(pos);
323  if (NStr::Equal(tail, "2nd") ||
324  NStr::Equal(tail, "3rd") ||
325  NStr::Equal(tail, "4th") ||
326  NStr::Equal(tail, "5th") ||
327  NStr::Equal(tail, "6th")) {
328  return false;
329  }
330  return true;
331  }
332  }
333  return false;
334 }
335 
336 
338 {
339  if (NStr::EqualNocase(str, "et al.")) {
340  // this is ok
341  return false;
342  } else {
343  return BadCharsInAuthorName(str, false, false, true);
344  }
345 }
346 
348 {
349  return BadCharsInAuthorName(str, false, true, false);
350 }
351 
352 
354 {
355  return BadCharsInAuthorName(str, false, true, false);
356 }
357 
358 
360 {
361  return BadCharsInAuthorName(str, false, true, false);
362 }
363 
364 
365 string CValidator::BadCharsInAuthor(const CName_std& author, bool& last_is_bad)
366 {
367  string badauthor = kEmptyStr;
368  last_is_bad = false;
369 
370  if (author.IsSetLast() && BadCharsInAuthorLastName(author.GetLast())) {
371  last_is_bad = true;
372  badauthor = author.GetLast();
373  } else if (author.IsSetFirst() && BadCharsInAuthorFirstName(author.GetFirst())) {
374  badauthor = author.GetFirst();
375  }
376  else if (author.IsSetInitials() && BadCharsInAuthorInitials(author.GetInitials())) {
377  badauthor = author.GetInitials();
378  } else if (author.IsSetSuffix() && BadCharsInAuthorSuffix(author.GetSuffix())) {
379  badauthor = author.GetSuffix();
380  }
381  return badauthor;
382 }
383 
384 
385 string CValidator::BadCharsInAuthor(const CAuthor& author, bool& last_is_bad)
386 {
387  last_is_bad = false;
388  if (author.IsSetName() && author.GetName().IsName()) {
389  return BadCharsInAuthor(author.GetName().GetName(), last_is_bad);
390  } else {
391  return kEmptyStr;
392  }
393 }
394 
395 
396 typedef bool(*CompareConsecutiveIntervalProc) (const CSeq_interval& int1, const CSeq_interval& int2, CScope *scope);
397 
399 (const CPacked_seqint& packed_int,
400 CConstRef<CSeq_interval>& int_cur,
401 CConstRef<CSeq_interval>& int_prv,
402 CScope* scope,
404 {
405  bool ok = true;
406  ITERATE(CPacked_seqint::Tdata, it, packed_int.Get()) {
407  int_cur = (*it);
408  if (int_prv && !compar(*int_cur, *int_prv, scope)) {
409  ok = false;
410  break;
411  }
412 
413  int_prv = int_cur;
414  }
415  return ok;
416 }
417 
418 
420 {
421  bool ok = true;
422  const CSeq_interval *int_cur = 0, *int_prv = 0;
423 
425  for (; lit && ok; ++lit) {
426  CSeq_loc::E_Choice loc_choice = lit->Which();
427  switch (loc_choice) {
428  case CSeq_loc::e_Int:
429  {{
430  int_cur = &lit->GetInt();
431  if (int_prv) {
432  ok = compar(*int_cur, *int_prv, &scope);
433  }
434  int_prv = int_cur;
435  }}
436  break;
437  case CSeq_loc::e_Pnt:
438  int_prv = 0;
439  break;
441  int_prv = 0;
442  break;
444  {{
445  CConstRef<CSeq_interval> this_int_cur(int_cur);
446  CConstRef<CSeq_interval> this_int_prv(int_prv);
448  (lit->GetPacked_int(), this_int_cur, this_int_prv, &scope, compar);
449  }}
450  break;
451  case CSeq_loc::e_Null:
452  break;
453  default:
454  int_prv = 0;
455  break;
456  }
457 
458  }
459  return ok;
460 }
461 
462 
463 
465 (const CSeq_interval& int_cur,
466  const CSeq_interval& int_prv,
467  CScope* scope)
468 {
469  ENa_strand strand_cur = int_cur.IsSetStrand() ?
470  int_cur.GetStrand() : eNa_strand_unknown;
471 
472  if (IsSameBioseq(int_prv.GetId(), int_cur.GetId(), scope)) {
473  if (strand_cur == eNa_strand_minus) {
474  if (int_prv.GetTo() < int_cur.GetTo()) {
475  return false;
476  }
477  }
478  else {
479  if (int_prv.GetTo() > int_cur.GetTo()) {
480  return false;
481  }
482  }
483  }
484  return true;
485 }
486 
487 
489 {
490  CBioseq_Handle seq;
491  try {
492  CBioseq_Handle seq = scope.GetBioseqHandle(loc);
493  } catch (CObjMgrException& ) {
494  // no way to tell
495  return true;
496  } catch (const exception& ) {
497  // no way to tell
498  return true;
499  }
500  if (seq && seq.GetInst_Topology() == CSeq_inst::eTopology_circular) {
501  // no way to check if topology is circular
502  return true;
503  }
504 
506 }
507 
508 
509 bool x_IsNotAdjacent
510 (const CSeq_interval& int_cur,
511 const CSeq_interval& int_prv,
512 CScope* scope)
513 {
514  ENa_strand strand_cur = int_cur.IsSetStrand() ?
515  int_cur.GetStrand() : eNa_strand_unknown;
516 
517  bool ok = true;
518  if (IsSameBioseq(int_prv.GetId(), int_cur.GetId(), scope)) {
519  if (strand_cur == eNa_strand_minus) {
520  if (int_cur.GetTo() + 1 == int_prv.GetFrom()) {
521  ok = false;
522  }
523  }
524  else {
525  if (int_prv.GetTo() + 1 == int_cur.GetFrom()) {
526  ok = false;
527  }
528  }
529  }
530  return ok;
531 }
532 
533 
535 (const CSeq_loc& loc, CScope &scope)
536 {
537  return !CheckConsecutiveIntervals(loc, scope, x_IsNotAdjacent);
538 }
539 
540 
541 bool x_SameStrand(const CSeq_interval& int1, const CSeq_interval& int2)
542 {
543  ENa_strand strand1 = int1.IsSetStrand() ?
544  int1.GetStrand() : eNa_strand_unknown;
545  ENa_strand strand2 = int2.IsSetStrand() ?
546  int2.GetStrand() : eNa_strand_unknown;
547  return (strand1 == strand2);
548 }
549 
550 
551 bool IsNotDuplicateInterval(const CSeq_interval& int1, const CSeq_interval& int2, CScope* scope)
552 {
553  if (IsSameBioseq(int1.GetId(), int2.GetId(), scope) &&
554  x_SameStrand(int1, int2) &&
555  int1.GetFrom() == int2.GetFrom() &&
556  int1.GetTo() == int2.GetTo()) {
557  return false;
558  }
559  return true;
560 }
561 
563 {
565 }
566 
567 
569 {
570  m_impl.reset(new CCacheImpl);
571 }
572 
575 {
576  return Ref(new CCache);
577 }
578 
bool IsSetLast(void) const
Check if a value has been assigned to Last data member.
Definition: Name_std_.hpp:390
bool IsSetInitials(void) const
first + middle initials Check if a value has been assigned to Initials data member.
Definition: Name_std_.hpp:550
CBioseq_Handle –.
static bool DoesSeqLocContainAdjacentIntervals(const CSeq_loc &loc, CScope &scope)
Definition: validator.cpp:535
.hpp User-defined methods of the data storage class.
Definition: Name_std.hpp:55
static CRef< CCache > MakeEmptyCache(void)
Definition: validator.cpp:574
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
Definition: ncbiobj.hpp:1849
TTo GetTo(void) const
Get the To member data.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:102
bool
Definition: cgiapp.hpp:496
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:73
unsigned int Uint4
Alias for unsigned int.
Definition: ncbitype.h:121
USING_SCOPE(sequence)
bool IsSetName(void) const
Author, Primary or Secondary Check if a value has been assigned to Name data member.
Definition: Author_.hpp:329
const TPacked_int & GetPacked_int(void) const
Get the variant data.
Definition: Seq_loc_.cpp:216
Template class for iteration on objects of class C (non-medifiable version)
Definition: iterator.hpp:740
void SetProgressCallback(CValidator::TProgressCallback callback, void *user_data)
TStrand GetStrand(void) const
Get the Strand member data.
static bool BadCharsInAuthorFirstName(const string &str)
Definition: validator.cpp:347
static bool DoesSeqLocContainDuplicateIntervals(const CSeq_loc &loc, CScope &scope)
Definition: validator.cpp:562
bool IsNotDuplicateInterval(const CSeq_interval &int1, const CSeq_interval &int2, CScope *scope)
Definition: validator.cpp:551
bool IsSetAffil(void) const
Check if a value has been assigned to Affil data member.
Definition: Author_.hpp:453
CRef< CObjectManager > m_ObjMgr
Definition: validator.hpp:244
TProgressCallback m_PrgCallback
Definition: validator.hpp:247
CObjectManager –.
int isalpha(Uchar c)
Definition: ncbictype.hpp:61
AutoPtr< ITaxon3 > m_Taxon
Definition: validator.hpp:245
CConstRef< CSeq_entry > GetCompleteSeq_entry(void) const
Complete and get const reference to the seq-entry.
list< CRef< CSeq_interval > > Tdata
static bool BadCharsInAuthorName(const string &str, bool allowcomma, bool allowperiod, bool last)
Definition: validator.cpp:291
const NCBI_NS_NCBI::CEnumeratedTypeValues *ENUM_METHOD_NAME() ENa_strand(void)
Access to ENa_strand's attributes (values, names) as defined in spec.
bool IsSetSub(void) const
Check if a value has been assigned to Sub data member.
#define NULL
Definition: ncbistd.hpp:225
bool IsSetStrand(void) const
Check if a value has been assigned to Strand data member.
#define kEmptyStr
Definition: ncbistr.hpp:120
bool IsName(void) const
Check if variant Name is selected.
Definition: Person_id_.hpp:359
const TAffil & GetAffil(void) const
Get the Affil member data.
Definition: Author_.hpp:465
bool IsSetSuffix(void) const
Jr, Sr, III Check if a value has been assigned to Suffix data member.
Definition: Name_std_.hpp:590
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:776
bool IsSetContact(void) const
WARNING: this will replace the above Check if a value has been assigned to Contact data member...
bool IsSetContact(void) const
who to contact Check if a value has been assigned to Contact data member.
const TName & GetName(void) const
Get the Name member data.
Definition: Author_.hpp:341
CCache(TSizeType capacity, THandler *handler=NULL)
Create cache object with the given capacity.
Definition: ncbi_cache.hpp:326
bool IsSetFirst(void) const
Check if a value has been assigned to First data member.
Definition: Name_std_.hpp:430
static bool IsSeqLocCorrectlyOrdered(const CSeq_loc &loc, CScope &scope)
Definition: validator.cpp:488
static string BadCharsInAuthor(const CName_std &author, bool &last_is_bad)
Definition: validator.cpp:365
const TSub & GetSub(void) const
Get the Sub member data.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
static bool BadCharsInAuthorSuffix(const string &str)
Definition: validator.cpp:359
CConstRef< CValidError > GetTSACDSOnMinusStrandErrors(const CSeq_entry_Handle &se)
Definition: validator.cpp:132
const TFirst & GetFirst(void) const
Get the First member data.
Definition: Name_std_.hpp:442
TFrom GetFrom(void) const
Get the From member data.
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
bool Validate(const CSeq_entry &se, const CCit_sub *cs=0, CScope *scope=0)
CConstRef< CValidError > GetTSANStretchErrors(const CSeq_entry_Handle &se)
Definition: validator.cpp:119
CConstRef< CSeq_annot > GetCompleteSeq_annot(void) const
Complete and return const reference to the current seq-annot.
bool IsSameBioseq(const CSeq_id &id1, const CSeq_id &id2, CScope *scope, CScope::EGetBioseqFlag get_flag=CScope::eGetBioseq_All)
Determines if two CSeq_ids represent the same CBioseq.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
Definition: ncbistr.hpp:5412
bool CheckConsecutiveIntervals(const CSeq_loc &loc, CScope &scope, CompareConsecutiveIntervalProc compar)
Definition: validator.cpp:419
.hpp User-defined methods of the data storage class.
Definition: Pubdesc.hpp:53
CSeq_annot_Handle –.
CConstRef< CValidError > GetTSAConflictingBiomolTechErrors(const CSeq_entry_Handle &se)
Definition: validator.cpp:145
CSeq_entry_Handle –.
const TStd & GetStd(void) const
Get the variant data.
Definition: Affil_.cpp:213
The Object manager core.
static void SetSuppressionRules(const CUser_object &user, CValidError &errors)
Base class for all object manager exceptions.
map< string, string > ss
const TName & GetName(void) const
Get the variant data.
Definition: Person_id_.cpp:137
static bool BadCharsInAuthorLastName(const string &str)
Definition: validator.cpp:337
E_Choice Which(void) const
Which variant is currently selected.
Definition: Seq_loc_.hpp:475
const TContact & GetContact(void) const
Get the Contact member data.
CScope –.
Definition: scope.hpp:90
CRef –.
Definition: ncbiobj.hpp:616
bool IsStd(void) const
Check if variant Std is selected.
Definition: Affil_.hpp:1111
AutoPtr –.
Definition: ncbimisc.hpp:384
Definition: Seq_entry.hpp:55
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
static const char * str(char *buf, int n)
Definition: stats.c:84
bool x_SameStrand(const CSeq_interval &int1, const CSeq_interval &int2)
Definition: validator.cpp:541
void SetProgressCallback(TProgressCallback callback, void *user_data=0)
Definition: validator.cpp:284
TInst_Topology GetInst_Topology(void) const
const TSuffix & GetSuffix(void) const
Get the Suffix member data.
Definition: Name_std_.hpp:602
const TContact & GetContact(void) const
Get the Contact member data.
const TInitials & GetInitials(void) const
Get the Initials member data.
Definition: Name_std_.hpp:562
element_type * get(void) const
Get pointer.
Definition: ncbimisc.hpp:453
const TInt & GetInt(void) const
Get the variant data.
Definition: Seq_loc_.cpp:194
Cache various information for one validation run.
Definition: validatorp.hpp:133
static bool EqualNocase(const CTempString str, SIZE_TYPE pos, SIZE_TYPE n, const char *pattern)
Case-insensitive equality of a substring with a pattern.
Definition: ncbistr.hpp:5358
namespace ncbi::objects::
Definition: Seq_feat.hpp:56
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:70
bool x_IsNotAdjacent(const CSeq_interval &int_cur, const CSeq_interval &int_prv, CScope *scope)
Definition: validator.cpp:510
void * m_UserData
Definition: validator.hpp:248
const Tdata & Get(void) const
Get the member data.
bool x_IsCorrectlyOrdered(const CSeq_interval &int_cur, const CSeq_interval &int_prv, CScope *scope)
Definition: validator.cpp:465
const TLast & GetLast(void) const
Get the Last member data.
Definition: Name_std_.hpp:402
const TId & GetId(void) const
Get the Id member data.
bool(* CompareConsecutiveIntervalProc)(const CSeq_interval &int1, const CSeq_interval &int2, CScope *scope)
Definition: validator.cpp:396
static bool BadCharsInAuthorInitials(const string &str)
Definition: validator.cpp:353
static bool Equal(const CTempString str, SIZE_TYPE pos, SIZE_TYPE n, const char *pattern, ECase use_case=eCase)
Test for equality of a substring with a pattern.
Definition: ncbistr.hpp:5384
virtual void Init(void)=0
E_Choice
Choice variants.
Definition: Seq_loc_.hpp:96
~CValidator(void)
Definition: validator.cpp:76
bool x_CompareConsecutiveIntervals(const CPacked_seqint &packed_int, CConstRef< CSeq_interval > &int_cur, CConstRef< CSeq_interval > &int_prv, CScope *scope, CompareConsecutiveIntervalProc compar)
Definition: validator.cpp:399
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
CConstRef< CValidError > Validate(const CSeq_entry &se, CScope *scope=0, Uint4 options=0)
Definition: validator.cpp:82
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:756
CConstBeginInfo ConstBegin(const C &obj)
Get starting point of non-modifiable object hierarchy.
Definition: iterator.hpp:966
User-defined methods of the data storage class.
Modified on Tue Jul 25 19:51:47 2017 by modify_doxy.py rev. 533848