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

Go to the SVN repository for this file.

1 #ifndef TABLE2ASN_VALIDATOR_HPP_INCLUDED
2 #define TABLE2ASN_VALIDATOR_HPP_INCLUDED
3 
6 
7 #include "utils.hpp"
8 
10 
11 namespace objects
12 {
13  class CSeq_entry;
14  class CBioseq;
15  class CSeq_entry_Handle;
16  class CValidError;
17  class CSeq_submit;
18  class CScope;
19 }
20 namespace NDiscrepancy
21 {
22  class CDiscrepancySet;
23  class CDiscrepancyProduct;
24 }
25 
26 class CTable2AsnContext;
28 {
29 public:
32 
33  void Clear();
34  void ValCollect(CRef<objects::CSeq_submit> submit, CRef<objects::CSeq_entry> entry, const string& flags);
36  void ValReportErrors();
37  size_t ValTotalErrors() const;
38 
39  void Cleanup(CRef<objects::CSeq_submit> submit, objects::CSeq_entry_Handle& entry, const string& flags) const;
40  void UpdateECNumbers(objects::CSeq_entry& entry);
41 
42  void CollectDiscrepancies(CRef<objects::CSeq_submit> submit, objects::CSeq_entry_Handle& entry);
43  void ReportDiscrepancies();
44  void ReportDiscrepancies(const string& filename);
45 
46 protected:
47  CRef<NDiscrepancy::CDiscrepancyProduct> x_PopulateDiscrepancy(CRef<objects::CSeq_submit> submit, objects::CSeq_entry_Handle& entry) const;
48  void x_ReportDiscrepancies(CRef<NDiscrepancy::CDiscrepancyProduct>& discrepancy, std::ostream& ostr) const;
51  {
52  public:
53  TErrorStats() : m_total(0) {};
55  size_t m_total;
56  };
58 
59  std::mutex m_discrep_mutex;
61 
62  std::shared_ptr<objects::validator::SValidatorContext> m_val_context;
63  vector<TErrorStats> m_val_stats;
64  std::list<CRef<objects::CValidError>> m_val_errors;
65  objects::validator::CHugeFileValidator::TGlobalInfo m_val_globalInfo;
66  mutable std::mutex m_mutex;
67 };
68 
70 
71 #endif
CObject –.
Definition: ncbiobj.hpp:180
CScope –.
Definition: scope.hpp:92
CSeq_entry_Handle –.
Definition: Seq_entry.hpp:56
map< int, size_t > TErrorStatMap
void x_ReportDiscrepancies(CRef< NDiscrepancy::CDiscrepancyProduct > &discrepancy, std::ostream &ostr) const
vector< TErrorStats > m_val_stats
std::list< CRef< objects::CValidError > > m_val_errors
void UpdateECNumbers(objects::CSeq_entry &entry)
std::shared_ptr< objects::validator::SValidatorContext > m_val_context
void Cleanup(CRef< objects::CSeq_submit > submit, objects::CSeq_entry_Handle &entry, const string &flags) const
CRef< NDiscrepancy::CDiscrepancyProduct > m_discr_product
void ValReportErrorStats(CNcbiOstream &out)
void CollectDiscrepancies(CRef< objects::CSeq_submit > submit, objects::CSeq_entry_Handle &entry)
CTable2AsnContext * m_context
void ValCollect(CRef< objects::CSeq_submit > submit, CRef< objects::CSeq_entry > entry, const string &flags)
objects::validator::CHugeFileValidator::TGlobalInfo m_val_globalInfo
CTable2AsnValidator(CTable2AsnContext &ctx)
CRef< NDiscrepancy::CDiscrepancyProduct > x_PopulateDiscrepancy(CRef< objects::CSeq_submit > submit, objects::CSeq_entry_Handle &entry) const
Definition: map.hpp:338
static uch flags
CS_CONTEXT * ctx
Definition: t0006.c:12
std::ofstream out("events_result.xml")
main entry point for tests
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
Modified on Thu Nov 30 04:53:40 2023 by modify_doxy.py rev. 669887