SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
ValidationCollector.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <carl-common/memory/Singleton.h>
4 
5 #include "ValidationPoint.h"
6 
7 #include <memory>
8 #include <string>
9 #include <vector>
10 
11 namespace smtrat {
12 namespace validation {
13 
14 class ValidationCollector: public carl::Singleton<ValidationCollector> {
15 private:
16  std::vector<std::unique_ptr<ValidationPoint>> m_points;
17 public:
18  ValidationPoint& get(const std::string& channel, const std::string& file, int line) {
19  auto& ptr = m_points.emplace_back(std::make_unique<ValidationPoint>());
20  ptr->set_identifier(channel, file, line);
21  return static_cast<ValidationPoint&>(*ptr);
22  }
23 
24  const auto& points() const {
25  return m_points;
26  }
27 };
28 
29 inline auto& get(const std::string& channel, const std::string& file, int line) {
30  return ValidationCollector::getInstance().get(channel, file, line);
31 }
32 
33 }
34 }
ValidationPoint & get(const std::string &channel, const std::string &file, int line)
std::vector< std::unique_ptr< ValidationPoint > > m_points
auto & get(const std::string &channel, const std::string &file, int line)
Class to create the formulas for axioms.