← Documentation
ADS-IDAC Engine 5.0.0
KBExpectedParameterValueUnit.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <typeinfo>
5// KBExpectedParameterValueUnit.h: interface for the KBExpectedParameterValueUnit class.
6//
8
9#include <cstdlib>
10#include <boost/serialization/export.hpp>
11
12#include "KBElement.h"
13#include "../Procedure/ExpectationElement.h"
14#include "../CalculationAid/Polynomial.h" //Y.L.
15#include "../ReasonMachine/BiResult.h" //Y.L
16#include <boost/archive/text_oarchive.hpp>
17#include <boost/archive/text_iarchive.hpp>
18#include <boost/serialization/string.hpp>
19
21{
22public:
23 polynomial *poly1_pt; // cached curve for expected value 1 (polynomial mode), looked up on first use
24 polynomial *poly2_pt; // cached curve for expected value 2 (polynomial mode), looked up on first use
25 std::string value2_poly_name;
26 std::string value1_poly_name;
27 bool value2_mode; // true: expected value 2 comes from the polynomial value2_poly_name
28 bool value1_mode; // true: expected value 1 comes from the polynomial value1_poly_name
31 void setLogicalRelation(int);
32 void setExpectedValue1(double);
33 void setExpectedValue2(double);
34 void readInfoFromFile(std::ifstream &);
36 double getExpectedValue1();
37 double getExpectedValue2();
38 //int checkForMatch(string , double, int);
39 int checkForMatch(std::string, double, int);
41 void saveKBExpectedParameterValueUnitToFile(std::ofstream &);
43 friend class boost::serialization::access; // give access to boost serialization
44 template<class Archive>
45 void serialize(Archive & ar, const unsigned int version)
46 {
47 ar & boost::serialization::base_object<KBElement>(*this);
48 ar & boost::serialization::base_object<ExpectationElement>(*this);
51 ar & value1_mode;
52 ar & value2_mode;
54 ar & expected_value1;
55 ar & expected_value2;
56 ar & poly1_pt;
57 ar & poly2_pt;
58 }
59private:
63};
64
65
66BOOST_CLASS_EXPORT_KEY(KBExpectedParameterValueUnit)
void copyKBExpectedParameterValueUnit(KBExpectedParameterValueUnit &)
int checkForMatch(std::string, double, int)
void saveKBExpectedParameterValueUnitToFile(std::ofstream &)
void retrieveKBExpectedParameterValueUnitFromFile(std::ifstream &)
void serialize(Archive &ar, const unsigned int version)
friend class boost::serialization::access