Dakota  Version 6.20
Explore and Predict with Confidence
Public Member Functions | Private Member Functions | Private Attributes | List of all members
RestartWriter Class Reference

Public Member Functions

 RestartWriter ()
 optional default ctor allowing a non-outputting RestartWriter
 
 RestartWriter (const String &write_restart_filename, bool write_version=true)
 typical ctor taking a filename; this class encapsulates the output stream
 
 RestartWriter (const String &write_restart_filename, const RestartVersion &rst_version)
 alternate ctor taking non-default version info, helpful for testing
 
 RestartWriter (std::ostream &write_restart_stream)
 alternate ctor taking a stream, helpful for testing; assumes client manages the output stream
 
const String & filename ()
 output filename for this writer
 
template<typename T >
void operator& (const T &data_out)
 serialize the passed data_out to the restart file
 
void append_prp (const ParamResponsePair &prp_in)
 add the passed pair to the restart file
 
void flush ()
 flush the restart stream so we have a complete restart record should Dakota abort
 

Private Member Functions

 RestartWriter (const RestartWriter &)
 copy constructor is disallowed due to file stream
 
const RestartWriteroperator= (const RestartWriter &)
 assignment is disallowed due to file stream
 

Private Attributes

String restartOutputFilename
 the name of the restart output file
 
std::ofstream restartOutputFS
 Binary stream to which restart data is written.
 
std::unique_ptr< boost::archive::binary_oarchive > restartOutputArchive
 Binary output archive to which data is written (pointer since no default ctor for oarchive and may not be initialized);.
 

Detailed Description

Component for writing restart files. Creation and destruction of archive and associated stream are managed here.


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