← Documentation
ADS-IDAC Engine 5.0.0
KBExpectedComponentStateUnit.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <typeinfo>
5// KBExpectedComponentStateUnit.h: interface for the KBExpectedComponentStateUnit class.
6//
8
9#include "KBElement.h"
10#include "../Procedure/ExpectationElement.h"
11#include <boost/archive/text_oarchive.hpp>
12#include <boost/archive/text_iarchive.hpp>
13#include <boost/serialization/base_object.hpp> // Include for base object serialization
14#include <boost/serialization/export.hpp>
15
17{
18public:
21 void setExpectedState(int);
22 void readInfoFromFile(std::ifstream &);
23 int getExpectedState();
24 int checkForMatch(std::string , int );
26 void saveKBExpectedComponentStateUnitToFile(std::ofstream &);
28 // Boost Serialization method
30 template<class Archive>
31 void serialize(Archive & ar, const unsigned int version)
32 {
33// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
34 // Inherit serialization from base classes
35 ar & boost::serialization::base_object<KBElement>(*this);
36 ar & boost::serialization::base_object<ExpectationElement>(*this);
37 // Serialize own member
38 ar & expected_state;
39 }
40private:
42};
43
44
45BOOST_CLASS_EXPORT_KEY(KBExpectedComponentStateUnit)
void serialize(Archive &ar, const unsigned int version)
void retrieveKBExpectedComponentStateUnitFromFile(std::ifstream &)
void copyKBExpectedComponentStateUnit(KBExpectedComponentStateUnit &)
friend class boost::serialization::access
void saveKBExpectedComponentStateUnitToFile(std::ofstream &)