← Documentation
ADS-IDAC Engine 5.0.0
ControlVariable.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <typeinfo>
5#include <boost/serialization/base_object.hpp>
6#include <boost/archive/text_iarchive.hpp>
7#include <boost/archive/text_oarchive.hpp>
8#include <string>
9#include <fstream>
10#include "THElement.h"
11#include <boost/serialization/export.hpp>
12
13class ControlVariable : public THElement {
14public:
16 virtual ~ControlVariable();
17 void setControlValue(double value);
18 void setMaximumControlValue(double value);
19 void setMinimumControlValue(double value);
20 double getControlValue();
23 void setUnitOfControlValue(std::string unit);
24 std::string getUnitOfControlValue();
25 void readInfoFromFile(std::ifstream &);
27 void saveControlVariableToFile(std::ofstream &);
28 void retrieveControlVariableFromFile(std::ifstream &);
29
30private:
31 double control_value; // cnvarn
32 double maximum_control_value; // cnvmax
33 double minimum_control_value; // cnvmin
35
37 template<class Archive>
38 void serialize(Archive &ar, const unsigned int version) {
39// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
40 ar & boost::serialization::base_object<THElement>(*this);
41 ar & control_value;
45 }
46};
47
48
49BOOST_CLASS_EXPORT_KEY(ControlVariable)
double minimum_control_value
virtual ~ControlVariable()
std::string unit_of_control_value
double getControlValue()
void setMaximumControlValue(double value)
void serialize(Archive &ar, const unsigned int version)
void setControlValue(double value)
void setMinimumControlValue(double value)
void readInfoFromFile(std::ifstream &)
void setUnitOfControlValue(std::string unit)
std::string getUnitOfControlValue()
double maximum_control_value
void saveControlVariableToFile(std::ofstream &)
void copyControlVariable(ControlVariable &)
friend class boost::serialization::access
double getMaximumControlValue()
void retrieveControlVariableFromFile(std::ifstream &)
double getMinimumControlValue()