The Conley-Morse Graphs Software
Functions
datatext.h File Reference

Converting a binary data buffer into a printable text and vice versa. More...

#include <string>
#include "chomp/system/config.h"
#include "chomp/multiwork/mwdata.h"

Go to the source code of this file.

Functions

std::string data2text (const chomp::multiwork::mwData &data)
 Encodes the entire binary data into a text string (single line, printable characters only). More...
 
void text2data (const std::string &str, chomp::multiwork::mwData &data)
 Decodes a prevously prepared text back into binary data. More...
 

Detailed Description

Converting a binary data buffer into a printable text and vice versa.

Author
Pawel Pilarczyk

Definition in file datatext.h.

Function Documentation

◆ data2text()

std::string data2text ( const chomp::multiwork::mwData &  data)
inline

Encodes the entire binary data into a text string (single line, printable characters only).

Definition at line 48 of file datatext.h.

Referenced by computeMorseDecomposition(), and OdeIntegrParam::getInfo().

◆ text2data()

void text2data ( const std::string &  str,
chomp::multiwork::mwData &  data 
)
inline

Decodes a prevously prepared text back into binary data.

Resets the data and replaces its contents with the decoded buffer. Throws an exception in case of errors.

Definition at line 76 of file datatext.h.

Referenced by computeMorseDecomposition(), and OdeIntegrParam::useInfo().