INFM HIL Interface
Interface between Artery simulation and DuTs
Static Public Member Functions | List of all members
sim_interface::ConfigSerializer Class Reference

ConfigSerializer: This class is for de-/ serializing the different connectorConfig types and overwrites the boost:serialization methods More...

#include <ConfigSerializer.h>

Static Public Member Functions

template<typename T >
static void deserialize (std::istringstream &ifs, const std::string &objName, T *obj)
 
template<typename T >
static void serialize (const std::string &file, const std::string &objName, T &obj)
 

Detailed Description

ConfigSerializer: This class is for de-/ serializing the different connectorConfig types and overwrites the boost:serialization methods

Member Function Documentation

◆ deserialize()

template<typename T >
static void sim_interface::ConfigSerializer::deserialize ( std::istringstream &  ifs,
const std::string &  objName,
T *  obj 
)
inlinestatic

T: Templates for any type, so that the following methods can be used by them method:deserialize

Parameters
ifsaddress of an input stringstream
objNameaddress of name of a object
objpointer of any type of object

if: when the input string stream is available exception handling: catching archive exception and start InterfaceLogger: iss: create an input stringstream ia: create an xml input archive with the input stringstream and no header deserialize the object catch the exception if the deserialisation failed and start logging else: start logging:

◆ serialize()

template<typename T >
static void sim_interface::ConfigSerializer::serialize ( const std::string &  file,
const std::string &  objName,
T &  obj 
)
inlinestatic

T: Templates for any type, so that the following methods can be used by them method:serialize

Parameters
objNameaddress of a string --> name of the object
fileaddress of a string --> file
objpointer of any type of object

ofs: create an output file stream if: when the output file stream is available oa: create an xml output archive with the output stringstream and no header serialize now the object in the outputarchive and close file else: start logging


The documentation for this class was generated from the following file: