← Documentation
ADS-IDAC Engine 5.0.0
MentalComponentState.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <typeinfo>
5// MentalComponentState.h: interface for the MentalComponentState class.
6//
8
9#include "../ControlPanel/DisplayElement.h"
10#include "MentalInfo.h"
11#include <boost/archive/text_oarchive.hpp>
12#include <boost/archive/text_iarchive.hpp>
13#include <boost/serialization/export.hpp>
14
16 public DisplayElement,
17 public MentalInfo
18{
19public:
21 virtual ~MentalComponentState();
25 void saveMentalComponentStateToFile(std::ofstream &);
26 void retrieveMentalComponentStateFromFile(std::ifstream &);
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<DisplayElement>(*this);
36 ar & boost::serialization::base_object<MentalInfo>(*this);
38 }
39private:
41};
42
43
44BOOST_CLASS_EXPORT_KEY(MentalComponentState)
bool checkIfIsIdenticalMentalComponentState(MentalComponentState &)
void retrieveMentalComponentStateFromFile(std::ifstream &)
void copyMentalComponentState(MentalComponentState &)
void saveMentalComponentStateToFile(std::ofstream &)
void serialize(Archive &ar, const unsigned int version)
friend class boost::serialization::access