Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

FieldWriter Class Reference

storage of fields on files. More...

#include <FieldWriter.h>

List of all members.

Public Methods

 FieldWriter ()
 FieldWriter (const String &dataset_name, bool append=false)
 ~FieldWriter ()
void setDatasetName (const String &dataset_name, bool append=false)
void setStorageMode (Format_type field_format, Format_type grid_format)
int writeField (Field &field, const String &header, real time, const String &description, int component=1, int maxcomponent=1)
int writeField (Field &field, const String &header, real time=DUMMY, int component=1, int maxcomponent=1)
int writeField (Field &field, real time=DUMMY, int component=1, int maxcomponent=1)


Detailed Description

storage of fields on files.

NAME: FieldWriter - storage of fields on files

DESCRIPTION:

This class is a low-level tool mainly used from classes "SimResFile" or "SaveSimRes".

The storage format is binary or ASCII. In binary mode we try to use the hardware-independent xdr format if possible (on some systems, problems might arise with xdr and then the "FieldReader" and "FieldWriter" classes can be compiled using a straight (binary) C file).


Constructor & Destructor Documentation

FieldWriter::FieldWriter ( )
 

The default constructor requires "setDatasetName" to be called, whereas the constructor accepting a "String" argument sets the data set name on its own. The secong argument decides whehter a new SimRes file is started (by overwriting the named file), or whether the data is appended to an existing file.

FieldWriter::FieldWriter ( const String & dataset_name,
bool append = false )
 

See documentation of one of the overloaded constructor.

FieldWriter::~FieldWriter ( )
 


Member Function Documentation

void FieldWriter::setDatasetName ( const String & dataset_name,
bool append = false )
 

sets the name of the dataset. When a dataset is already open, it will be closed and the FieldWriter object will connect to the new dataset instead. If the new dataset is already existing, the append flag determines whether is will be overwritten or appended to.

void FieldWriter::setStorageMode ( Format_type field_format,
Format_type grid_format )
 

sets the storage mode for the grids and fields.

int FieldWriter::writeField ( Field & field,
real time = DUMMY,
int component = 1,
int maxcomponent = 1 )
 

See documentation of one of the overloaded functions.

int FieldWriter::writeField ( Field & field,
const String & header,
real time = DUMMY,
int component = 1,
int maxcomponent = 1 )
 

See documentation of one of the overloaded functions.

int FieldWriter::writeField ( Field & field,
const String & header,
real time,
const String & description,
int component = 1,
int maxcomponent = 1 )
 

stores a specified field to the dataset. A header and a time stamp must be specified. An optional description can also be given. The component number and the total number of components (maxcomponent) must be specified when storing components of a vector field, otherwise the default values can be used.


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.