OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Implementation of FileDataStream representing DataStream interface to file i/o. More...
#include <datastream.h>
Classes | |
class | CantOpen |
Public Member Functions | |
FileDataStream (std::string filename, bool write) | |
Constructor, takes associated stream pointer as parameter. More... | |
virtual | ~FileDataStream () |
Destructor (will not close stream!) More... | |
virtual int | read (int *data, int count) |
Reads count integer values into array pointed by data. More... | |
virtual int | read (unsigned long *data, int count) |
Reads count unsigned long values into array pointed by data. More... | |
virtual int | read (long *data, int count) |
Reads count long values into array pointed by data. More... | |
virtual int | read (double *data, int count) |
Reads count double values into array pointed by data. More... | |
virtual int | read (char *data, int count) |
Reads count char values into array pointed by data. More... | |
virtual int | read (bool &data) |
Reads a bool value from data. More... | |
virtual int | write (const int *data, int count) |
Writes count integer values from array pointed by data. More... | |
virtual int | write (const unsigned long *data, int count) |
Writes count unsigned long values from array pointed by data. More... | |
virtual int | write (const long *data, int count) |
Writes count long values from array pointed by data. More... | |
virtual int | write (const double *data, int count) |
Writes count double values from array pointed by data. More... | |
virtual int | write (const char *data, int count) |
Writes count char values from array pointed by data. More... | |
virtual int | write (bool data) |
Writes a bool value. More... | |
virtual int | givePackSizeOfInt (int count) |
virtual int | givePackSizeOfDouble (int count) |
virtual int | givePackSizeOfChar (int count) |
virtual int | givePackSizeOfBool (int count) |
virtual int | givePackSizeOfLong (int count) |
Public Member Functions inherited from oofem::DataStream | |
virtual | ~DataStream () |
Destructor. More... | |
int | read (int &data) |
int | read (unsigned long &data) |
int | read (long &data) |
int | read (double &data) |
int | read (char &data) |
int | read (std::string &data) |
Reads a string (stored as an int for the length followed by char*). More... | |
int | write (int data) |
int | write (unsigned long data) |
int | write (long data) |
int | write (double data) |
int | write (char data) |
int | write (const std::string &data) |
Reads a string (stored as an int for the length followed by char*). More... | |
int | write (const char *data) |
Writes a string (wrapper needed, otherwise write(bool) is called ) More... | |
Private Attributes | |
FILE * | stream |
FILE pointer of associated stream. More... | |
std::string | filename |
Filename. More... | |
Implementation of FileDataStream representing DataStream interface to file i/o.
This class creates a DataStream shell around c file i/o routines. This class will not provide any methods for opening/closing file. This is the responsibility of user.
Definition at line 136 of file datastream.h.
oofem::FileDataStream::FileDataStream | ( | std::string | filename, |
bool | write | ||
) |
Constructor, takes associated stream pointer as parameter.
Definition at line 65 of file datastream.C.
References stream.
|
virtual |
|
virtual |
Implements oofem::DataStream.
Definition at line 158 of file datastream.C.
|
virtual |
Implements oofem::DataStream.
Definition at line 153 of file datastream.C.
|
virtual |
Implements oofem::DataStream.
Definition at line 148 of file datastream.C.
|
virtual |
Implements oofem::DataStream.
Definition at line 143 of file datastream.C.
|
virtual |
Implements oofem::DataStream.
Definition at line 163 of file datastream.C.
|
virtual |
Reads count integer values into array pointed by data.
Implements oofem::DataStream.
Definition at line 81 of file datastream.C.
References stream.
|
virtual |
Reads count unsigned long values into array pointed by data.
Implements oofem::DataStream.
Definition at line 88 of file datastream.C.
References stream.
|
virtual |
Reads count long values into array pointed by data.
Implements oofem::DataStream.
Definition at line 93 of file datastream.C.
References stream.
|
virtual |
Reads count double values into array pointed by data.
Implements oofem::DataStream.
Definition at line 98 of file datastream.C.
References stream.
|
virtual |
Reads count char values into array pointed by data.
Implements oofem::DataStream.
Definition at line 103 of file datastream.C.
References stream.
|
virtual |
Reads a bool value from data.
Implements oofem::DataStream.
Definition at line 108 of file datastream.C.
References stream.
|
virtual |
Writes count integer values from array pointed by data.
Implements oofem::DataStream.
Definition at line 113 of file datastream.C.
References stream.
|
virtual |
Writes count unsigned long values from array pointed by data.
Implements oofem::DataStream.
Definition at line 118 of file datastream.C.
References stream.
|
virtual |
Writes count long values from array pointed by data.
Implements oofem::DataStream.
Definition at line 123 of file datastream.C.
References stream.
|
virtual |
Writes count double values from array pointed by data.
Implements oofem::DataStream.
Definition at line 128 of file datastream.C.
References stream.
|
virtual |
Writes count char values from array pointed by data.
Implements oofem::DataStream.
Definition at line 133 of file datastream.C.
References stream.
|
virtual |
Writes a bool value.
Implements oofem::DataStream.
Definition at line 138 of file datastream.C.
References stream.
|
private |
Filename.
Definition at line 150 of file datastream.h.
|
private |
FILE pointer of associated stream.
Definition at line 148 of file datastream.h.
Referenced by FileDataStream(), read(), write(), and ~FileDataStream().