GeoWriter¶
This page desctibes the class GeoWriter
The class GeoWriter
is used to write the geography data to a geography group in a qdf file.
- Code:
Public Methods¶
constructor
¶
GeoWriter(Geography *pGG);
The constructor.
pGG
A pointer to the gography object to be written.
destructor
¶
virtual ~GeoWriter();
The destructor.
write
¶
int write(hid_t hFile);
Write the geography data to an open qdf file.
hFile
HDF handle to the opened file.
writeToQDF
¶
int writeToQDF(const std::string sFileName, int iStep,
float fStartTime, const std::string sInfoString);
Creates a new qdf file, creates a geography group and writes the geography data to it.
sFileName
Name of output file.
iStep
The current simulation step. This number is saved as an attribute in the output file’s root group.
fStartTime
The start time of the simulation (i.e. the ‘real’ time at step 0). This number is also saved as an attribute in the output file’s root group.
sInfoString
An arbitrary string which will be saved as an attribute in the output file’s root group.
Returns 0 on success, -1 on failure.
replace
¶
int replace(hid_t hFile);
Replaces the geography data in the open qdf file with the new one.
hFile
HDF handle to the opened file.
Returns 0 on success, -1 on failure.
Protected Methods¶
writeGeoAttributes
¶
int writeGeoAttributes(hid_t hGeoGroup);
Writes the geography attributes to the geography group in the qdf file.
hGeoGroup
HDF pointer to the geography group in the qdf file.
Returns 0 on success, -1 on failure.