Class XMLStateWriter
Defined in File XMLStateWriter.h
Inheritance Relationships
Base Type
public flamegpu::io::StateWriter
(Class StateWriter)
Class Documentation
-
class XMLStateWriter : public flamegpu::io::StateWriter
XML format StateWriter
Public Functions
-
XMLStateWriter()
Constructs a writer capable of writing model state to an XML file
-
inline virtual bool isWriting() override
Returns true if beginWrite() has been called and writing is active
-
virtual void beginWrite(const std::string &output_file, bool pretty_print) override
Starts writing to the specified file in the specified mode
See also
- Parameters:
output_file – Filename of the input file (This will be used to determine which reader to return)
pretty_print – Whether the output file should be “pretty” or minified.
- Throws:
Throws – exception if beginWrite() is called a second time before endWrite() has been called
-
virtual void endWrite() override
Saves the current file and ends the writing state
- Throws:
Throws – exception if file IO fails
Throws – exception if beginWrite() has not been called so writing is not active
-
virtual void writeConfig(const Simulation *sim_instance) override
-
virtual void writeStats(unsigned int iterations) override
Write the macro environment block
- Parameters:
macro_env – The macro environment to pull properties from
filter – If provided, only named properties will be written. Note, if filter contains missing properties it will fail
-
XMLStateWriter()