← Documentation
ADS-IDAC Engine 5.0.0
ProcedureActionUnit.h
Go to the documentation of this file.
1#pragma once
2
3// ProcedureActionUnit.h: interface for the ProcedureActionUnit class.
4//
6
7#include "../Crew/KBElement.h"
8#include "../CalculationAid/Timer.h"
9#include "../CalculationAid/Probability.h"
10#include <boost/serialization/access.hpp>
11#include <boost/serialization/base_object.hpp>
12#include <boost/serialization/export.hpp>
13
15 public KBElement,
16 public Timer,
17 public Probability
18{
19public:
20 // State hooks (see ExpectationElement): seeded containers walk Timer
21 // progress only; name/probability/Weibull are seeded definitions.
22 template<class Archive> void state_save(Archive& ar) const { timer_state_save(ar); }
23 template<class Archive> void state_load(Archive& ar) { timer_state_load(ar); }
24
26 virtual ~ProcedureActionUnit();
27 void setControlValue(double);
28 double getControlValue();
29 void setParameterName(std::string);
30 std::string getParameterName();
32 void saveProcedureActionUnitToFile(std::ofstream &);
33 void retrieveProcedureActionUnitFromFile(std::ifstream &);
34private:
36 std::string parameter_name;
38 template<class Archive>
39 void serialize(Archive & ar, const unsigned int version) {
40 // State overlay: the class's own definition fields (control_value,
41 // parameter_name) come from the seeded master and are not archived.
42 // The shared bases (KBElement, Timer, Probability) are archived whole.
43 ar & boost::serialization::base_object<KBElement>(*this);
44 ar & boost::serialization::base_object<Timer>(*this);
45 ar & boost::serialization::base_object<Probability>(*this);
46 }
47};
48
49BOOST_CLASS_EXPORT_KEY(ProcedureActionUnit)
void setParameterName(std::string)
void state_save(Archive &ar) const
void state_load(Archive &ar)
std::string getParameterName()
void copyProcedureActionUnit(ProcedureActionUnit &)
void serialize(Archive &ar, const unsigned int version)
friend class boost::serialization::access
void retrieveProcedureActionUnitFromFile(std::ifstream &)
void saveProcedureActionUnitToFile(std::ofstream &)
Definition: Timer.h:17
void timer_state_save(Archive &ar) const
Definition: Timer.h:22
void timer_state_load(Archive &ar)
Definition: Timer.h:26