universal_error.hpp
Go to the documentation of this file.
1 
6 #ifndef UNIVERSAL_ERROR_HPP
7 #define UNIVERSAL_ERROR_HPP 1
8 
9 #include <string>
10 #include <vector>
11 
15 {
16 public:
17 
21  explicit UniversalError(std::string const& err_msg);
22 
26  UniversalError(const UniversalError& origin);
27 
31  void Append2ErrorMessage(std::string const& msg);
32 
37  void AddEntry(std::string const& field,
38  double value);
39 
43  std::string const& GetErrorMessage(void) const;
44 
48  std::vector<std::string> const& GetFields(void) const;
49 
53  std::vector<double> const& GetValues(void) const;
54 
55  ~UniversalError(void);
56 
57 private:
58 
59  std::string err_msg_;
60 
61  std::vector<std::string> fields_;
62 
63  std::vector<double> values_;
64 
65  UniversalError& operator=(const UniversalError&);
66 };
67 
68 #endif // UNIVERSAL_ERROR_HPP
Container for error reports.
std::vector< double > const & GetValues(void) const
Returns entry values.
std::vector< std::string > const & GetFields(void) const
Returns entry fields.
UniversalError(std::string const &err_msg)
Class constructor.
void AddEntry(std::string const &field, double value)
Adds an entry to the list.
void Append2ErrorMessage(std::string const &msg)
Appends std::string to the error message.
std::string const & GetErrorMessage(void) const
Returns the error message.