gramods
|
This struct creates a FILE pointer to a temporary file and reads off this file's data into string when finalized. More...
#include <StringFile.hh>
Public Member Functions | |
~StringFile () | |
Closes the temporary file if this has not already been done. More... | |
FILE * | getFilePtr () |
Returns the FILE pointer to a temporary file after, if not already done, creating such a FILE object. More... | |
std::string | finalize () |
Rewinds and reads off the temporary file into a string, closes the FILE object and returns the string. More... | |
This struct creates a FILE pointer to a temporary file and reads off this file's data into string when finalized.
This is useful in communication with pure C libraries.
|
inline |
Closes the temporary file if this has not already been done.
|
inline |
Rewinds and reads off the temporary file into a string, closes the FILE object and returns the string.
This can only be called after getFilePtr and then only once.
|
inline |
Returns the FILE pointer to a temporary file after, if not already done, creating such a FILE object.