~fnetorderstream (void)
{}
- virtual fnetorderstream& writeInt16 (kuint16 n);
- virtual fnetorderstream& writeInt32 (kuint32 n);
- virtual fnetorderstream& writeFloat32 (kfloat32 n);
- virtual fnetorderstream& writeFloat64 (kfloat64 n);
+ virtual writeInt16 (kuint16 n);
+ virtual writeInt32 (kuint32 n);
+ virtual writeFloat32 (kfloat32 n);
+ virtual writeFloat64 (kfloat64 n);
- virtual fnetorderstream& readInt16 (kuint16& n);
- virtual fnetorderstream& readInt32 (kuint32& n);
- virtual fnetorderstream& readFloat32 (kfloat32& n);
- virtual fnetorderstream& readFloat64 (kfloat64& n);
+ virtual readInt16 (kuint16& n);
+ virtual readInt32 (kuint32& n);
+ virtual readFloat32 (kfloat32& n);
+ virtual readFloat64 (kfloat64& n);
};
frnetorderstream (const char* filename, int mode)
: fnetorderstream (filename, mode) {}
- virtual frnetorderstream& writeInt16 (kuint16 n);
- virtual frnetorderstream& writeInt32 (kuint32 n);
- virtual frnetorderstream& writeFloat32 (kfloat32 n);
- virtual frnetorderstream& writeFloat64 (kfloat64 n);
+ writeInt16 (kuint16 n);
+ writeInt32 (kuint32 n);
+ writeFloat32 (kfloat32 n);
+ writeFloat64 (kfloat64 n);
- virtual frnetorderstream& readInt16 (kuint16& n);
- virtual frnetorderstream& readInt32 (kuint32& n);
- virtual frnetorderstream& readFloat32 (kfloat32& n);
- virtual frnetorderstream& readFloat64 (kfloat64& n);
+ readInt16 (kuint16& n);
+ readInt32 (kuint32& n);
+ readFloat32 (kfloat32& n);
+ readFloat64 (kfloat64& n);
};
#endif
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: array2dfile.cpp,v 1.11 2000/12/04 03:12:18 kevin Exp $
+** $Id: array2dfile.cpp,v 1.12 2000/12/04 03:42:00 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
init();
}
-Array2dFileLabel::Array2dFileLabel(const char* const str, double ctime = 0.)
+Array2dFileLabel::Array2dFileLabel(const char* const str, double ctime)
: m_strLabel (str)
{
init();
m_calcTime = ctime;
}
-Array2dFileLabel::Array2dFileLabel(const int type, const char* const str, double ctime = 0.)
+Array2dFileLabel::Array2dFileLabel(const int type, const char* const str, double ctime)
: m_strLabel (str)
{
init();
if (NativeBigEndian()) {
for (unsigned int iy = 0; iy < m_ny; iy++) {
ConvertReverseNetworkOrder (ptrColumn, m_pixelSize);
- fs.write (ptrColumn, m_pixelSize);
+ fs.write (reinterpret_cast<const char*>(ptrColumn), m_pixelSize);
ptrColumn += m_pixelSize;
}
} else
- fs.write (ptrColumn, columnSize);
+ fs.write (reinterpret_cast<const char*>(ptrColumn), columnSize);
}
return true;
unsigned char* ptrColumn = m_arrayData[ix];
if (NativeBigEndian()) {
for (unsigned int iy = 0; iy < m_ny; iy++) {
- fs.read (ptrColumn, m_pixelSize);
+ fs.read (reinterpret_cast<char*>(ptrColumn), m_pixelSize);
ConvertReverseNetworkOrder (ptrColumn, m_pixelSize);
ptrColumn += m_pixelSize;
}
} else
- fs.read (ptrColumn, columnSize);
+ fs.read (reinterpret_cast<char*>(ptrColumn), columnSize);
}
return true;
}
void
-Array2dFile::labelAdd (const char* const lstr, double calc_time=0.)
+Array2dFile::labelAdd (const char* const lstr, double calc_time)
{
labelAdd (Array2dFileLabel::L_HISTORY, lstr, calc_time);
}
void
-Array2dFile::labelAdd (int type, const char* const lstr, double calc_time=0.)
+Array2dFile::labelAdd (int type, const char* const lstr, double calc_time)
{
Array2dFileLabel label (type, lstr, calc_time);
#ifndef WORDS_BIGENDIAN
SwapBytes2 (&n);
#endif
- write (&n, 2);
+ write (reinterpret_cast<const char*>(&n), 2);
return (*this);
}
#ifndef WORDS_BIGENDIAN
SwapBytes4(&n);
#endif
- write (&n, 4);
+ write (reinterpret_cast<const char*>(&n), 4);
return (*this);
}
#ifndef WORDS_BIGENDIAN
SwapBytes4 (&n);
#endif
- write (&n, 4);
+ write (reinterpret_cast<const char*>(&n), 4);
return (*this);
}
#ifndef WORDS_BIGENDIAN
SwapBytes8 (&n);
#endif
- write (&n, 8);
+ write (reinterpret_cast<const char*>(&n), 8);
return (*this);
}
fnetorderstream& fnetorderstream::readInt16 (kuint16& n) {
- read (&n, 2);
+ read (reinterpret_cast<char*>(&n), 2);
#ifndef WORDS_BIGENDIAN
SwapBytes2 (&n);
#endif
}
fnetorderstream& fnetorderstream::readInt32 (kuint32& n) {
- read (&n, 4);
+ read (reinterpret_cast<char*>(&n), 4);
#ifndef WORDS_BIGENDIAN
SwapBytes4 (&n);
#endif
}
fnetorderstream& fnetorderstream::readFloat32 (kfloat32& n) {
- read (&n, 4);
+ read (reinterpret_cast<char*>(&n), 4);
#ifndef WORDS_BIGENDIAN
SwapBytes4 (&n);
#endif
}
fnetorderstream& fnetorderstream::readFloat64 (kfloat64& n) {
- read (&n, 8);
+ read (reinterpret_cast<char*>(&n), 8);
#ifndef WORDS_BIGENDIAN
SwapBytes8 (&n);
#endif
#ifdef WORDS_BIGENDIAN
SwapBytes2 (&n);
#endif
- write (&n, 2);
+ write (reinterpret_cast<char*>(&n), 2);
return (*this);
}
#ifdef WORDS_BIGENDIAN
SwapBytes4(&n);
#endif
- write (&n, 4);
+ write (reinterpret_cast<char*>(&n), 4);
return (*this);
}
#ifdef WORDS_BIGENDIAN
SwapBytes4 (&n);
#endif
- write (&n, 4);
+ write (reinterpret_cast<char*>(&n), 4);
return (*this);
}
#ifdef WORDS_BIGENDIAN
SwapBytes8 (&n);
#endif
- write (&n, 8);
+ write (reinterpret_cast<char*>(&n), 8);
return (*this);
}
frnetorderstream& frnetorderstream::readInt16 (kuint16& n) {
- read (&n, 2);
+ read (reinterpret_cast<char*>(&n), 2);
#ifdef WORDS_BIGENDIAN
SwapBytes2 (&n);
#endif
}
frnetorderstream& frnetorderstream::readInt32 (kuint32& n) {
- read (&n, 4);
+ read (reinterpret_cast<char*>(&n), 4);
#ifdef WORDS_BIGENDIAN
SwapBytes4 (&n);
#endif
}
frnetorderstream& frnetorderstream::readFloat32 (kfloat32& n) {
- read (&n, 4);
+ read (reinterpret_cast<char*>(&n), 4);
#ifdef WORDS_BIGENDIAN
SwapBytes4 (&n);
#endif
}
frnetorderstream& frnetorderstream::readFloat64 (kfloat64& n) {
- read (&n, 8);
+ read (reinterpret_cast<char*>(&n), 8);
#ifdef WORDS_BIGENDIAN
SwapBytes8 (&n);
#endif