if ( ! infile.is_open() ) return -1;
if( filename.substr(filename.size()-4) == ".dat" ) {
- format = Format::DAT;
+ format = DAT;
}
else if( filename.substr(filename.size()-4) == "edat" ) {
- format = Format::EDAT;
+ format = EDAT;
}
else if( filename.substr(filename.size()-4) == "sdat" ) {
- format = Format::SDAT;
+ format = SDAT;
getline(infile, parastring);
}
- if (inbuffer != NULL)
+ if ( inbuffer != NULL )
delete inbuffer;
inbuffer = new boost::iostreams::filtering_istreambuf;
return 0;
}
-datread::~datread ()
-{
- if (inbuffer != NULL)
- delete inbuffer;
-}
-
int datread::readDataToMem (char *tmpData, long unsigned int dataSize)
{
int readturn = -1;
return -4;
/* try to read header */
- if ( format == Format::EDAT || format == Format::SDAT )
+ if ( format == EDAT || format == SDAT )
if ( ! readAllHeaders() ) {
infile.close();
return -1;
if ( infile.is_open() )
infile.close();
}
+
+datread::~datread ()
+{
+ if ( inbuffer != NULL )
+ delete inbuffer;
+}