← Documentation
ADS-IDAC Engine 5.0.0
ExpectationElement.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <typeinfo>
5// ExpectationElement.h: interface for the ExpectationElement class.
6//
8
9#include <fstream>
10#include <boost/archive/text_oarchive.hpp>
11#include <boost/archive/text_iarchive.hpp>
12#include <boost/serialization/export.hpp>
13
14namespace boost { namespace archive {
15class binary_oarchive;
16class binary_iarchive;
17} }
18
20{
21public:
22 // State hooks: seeded containers (procedure expectation trees, KB
23 // hard-wired units) walk ONLY runtime state through these virtuals. The
24 // regular serialize() carries every member because the same classes also
25 // serve dynamic crew objects that have no master to re-seed from.
26 virtual void state_save(boost::archive::binary_oarchive& ar) const;
27 virtual void state_load(boost::archive::binary_iarchive& ar);
29 virtual ~ExpectationElement();
30 void setStateOfExpectation(int);
32 int updateExpectation(int);
34 void setTypeOfExpectation(int);
36 void saveExpectationElementToFile(std::ofstream &);
37 void retrieveExpectationElementFromFile(std::ifstream &);
39 // Boost Serialization method
41 template<class Archive>
42 void serialize(Archive & ar, const unsigned int version)
43 {
44// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
47 }
48private:
51};
52/*
53alternatives for expectation_satte
54sim::None: has never been actived
55sim::State::Activated: currentlu under investigation
56sim::State::Pause: current activitiy has temperatly pauses, will be resumed later
57sim::State::Succeed: complete verification with matched symptom
58sim::State::Failed: complete verification with non-mathced symptom
59*/
60
61BOOST_CLASS_EXPORT_KEY(ExpectationElement)
virtual void state_load(boost::archive::binary_iarchive &ar)
void saveExpectationElementToFile(std::ofstream &)
virtual void state_save(boost::archive::binary_oarchive &ar) const
void retrieveExpectationElementFromFile(std::ifstream &)
bool checkIfIsIdenticalExpectationElement(ExpectationElement &)
void serialize(Archive &ar, const unsigned int version)
friend class boost::serialization::access
void copyExpectationElement(ExpectationElement &)