← Documentation
ADS-IDAC Engine 5.0.0
BranchSystemActionVector.cpp
Go to the documentation of this file.
1// BranchSystemActionVector.cpp: implementation of the BranchSystemActionVector class.
2//
4
6#include <boost/serialization/export.hpp>
7#include <boost/archive/binary_oarchive.hpp>
8#include <boost/archive/binary_iarchive.hpp>
9BOOST_CLASS_EXPORT_IMPLEMENT(BranchSystemActionVector)
10using namespace std;
11
13// Construction/Destruction
15
17{
18
19}
20
22{
23 //unique_ptr handles deletion
24}
26 int i, num;
27 num = _bsav.branch_system_action_vector.size();
28 for(i = 0; i < num; i++){
29 auto p = std::make_unique<BranchSystemAction>();
30 p->copyBranchSystemAction(*(_bsav.branch_system_action_vector.at(i)));
31 this->branch_system_action_vector.push_back(std::move(p));
32 }
33}
34
36 int i, num;
37 num = branch_system_action_vector.size();
38 fout << num << '\n';
39 for(i = 0; i < num; i++){
40 this->branch_system_action_vector.at(i)->saveBranchSystemActionToFile(fout);
41 }
42}
44 int i, num;
45 fin >> num;
46 for(i = 0; i < num; i++){
47 auto p = std::make_unique<BranchSystemAction>();
48 p->retrieveBranchSystemActionFromFile(fin);
49 this->branch_system_action_vector.push_back(std::move(p));
50 }
51}
std::vector< std::unique_ptr< BranchSystemAction > > branch_system_action_vector
void saveBranchSystemActionVectorToFile(std::ofstream &)
void retrieveBranchSystemActionVectorFromFile(std::ifstream &)
void copyBranchSystemActionVector(BranchSystemActionVector &)