OSFEG-C++  1.4.6
OpenSF Error Generation Library
ErrorSources.h
1 /*
2  * openSF Error Generation Libraries (OSFEG)
3  * Deimos Space, S.L.U.
4  *
5  * This file is part of OSFEG. OSFEG is free software; you can redistribute it
6  * and/or modify it under the terms of the 'ESA Software Community Licence Permissive' as
7  * published by the European Space Agency; either version 2.4 of the License,
8  * or (at your option) any later version. You should have received a
9  * copy of the 'ESA Software Community Licence Permissive - v2.4' along with this program
10  * or one can be found at <http://eop-cfi.esa.int/index.php/docs-and-mission-data/licensing-documents>.
11  *
12  */
13 
14 #include "IErrorSources.h"
15 
16 #include <string>
17 #include <map>
18 #include <memory>
19 
20 #include "stl_tree/Composite.h"
21 
22 #if __cplusplus >= 201402L
23 # define OSFEG_DEPRECATED(why) [[deprecated(why)]]
24 #else
25 # define OSFEG_DEPRECATED(why) /* Not present in C++11 */
26 #endif
27 
29 using errorsMap OSFEG_DEPRECATED("Internal alias, will be removed") = std::map<std::string, Composite*>;
30 
35 class ErrorSources: public IErrorSources {
36 public:
37 
43  ErrorSources(const std::string& errorFileName);
44 
45  virtual ~ErrorSources();
46 
50  double getSimTime();
51 
60  double getError(const std::string& paramName, const double time) override;
61 
62 private:
63  double simTime;
64  std::map<std::string,std::unique_ptr<Composite>> errors;
65 };
Definition: ErrorSources.h:35
double getError(const std::string &paramName, const double time) override
double getSimTime()
ErrorSources(const std::string &errorFileName)
Definition: IErrorSources.h:22