FDR  4.2.7(6ecbe5a21b71ab020e8fcaeccfe5ebaad0599f4f)
evaluator_result.h
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 
6 namespace FDR
7 {
8 namespace Evaluator
9 {
11 template <class R>
13 {
14 public:
15  EvaluatorResult(const std::vector<std::string>& warnings, const R& result) : result_(result), warnings_(warnings)
16  {
17  }
18 
19  EvaluatorResult(const EvaluatorResult<R>&) = default;
20  EvaluatorResult<R>& operator=(const EvaluatorResult<R>&) = default;
21 
23  const R& result() const
24  {
25  return result_;
26  }
27 
29  const std::vector<std::string>& warnings() const
30  {
31  return warnings_;
32  }
33 
34 private:
35  R result_;
36  std::vector<std::string> warnings_;
37 };
38 
39 } // end Evaluator
40 } // end FDR
FDR::Evaluator::EvaluatorResult::warnings
const std::vector< std::string > & warnings() const
The list of warnings generated when evaluating the expression.
Definition: evaluator_result.h:29
FDR::Evaluator::EvaluatorResult::result
const R & result() const
The result that was obtained during the evaluation.
Definition: evaluator_result.h:23
FDR::Evaluator::EvaluatorResult
Represents the result of evaluating something.
Definition: evaluator_result.h:13