← Documentation
ADS-IDAC Engine 5.0.0
StringContainer.cpp
Go to the documentation of this file.
1// StringContainer.cpp: implementation of the StringContainer class.
2//
4
5#include "StringContainer.h"
6#include <boost/serialization/export.hpp>
7#include <boost/archive/binary_oarchive.hpp>
8#include <boost/archive/binary_iarchive.hpp>
9BOOST_CLASS_EXPORT_IMPLEMENT(StringContainer)
10using namespace std;
11
13// Construction/Destruction
15
17{
18 message = "NONE";
19}
21{
22 message = str;
23}
25{
26
27}
28void StringContainer::setMessage(string str){message = str;}
31 message = _sc.getMessage();
32}
34
35 //The message is delineated by dollar signs "$" + message + "$"
36 fout << '$' << message << '$' << '\n';
37}
39 //Reads the text between the next two dollar signs into the message
40
41 char ch = ' ';
42 message = "";
43 while (ch != '$' && !fin.eof()){
44 fin.get(ch);}
45 do{
46 fin.get(ch);
47 if (ch != '$'){
48 message += ch;
49 }
50 }while(ch != '$' && !fin.eof());
51}
void saveStringContainerToFile(std::ofstream &)
void setMessage(std::string)
std::string message
std::string getMessage()
void copyStringContainer(StringContainer &)
virtual ~StringContainer()
void retrieveStringContainerFromFile(std::ifstream &)