X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Ffnetorderstream.h;h=a8559390b857ca874b7bc578253fdd3e4c618af4;hp=41be6cb8f0b95ba70c34058ac48c7eab2401b179;hb=9b2bb510160bdb56f04847f5b55ab61dd8a47976;hpb=9703ace3c451ce079967284bf191783736dbc77f diff --git a/include/fnetorderstream.h b/include/fnetorderstream.h index 41be6cb..a855939 100644 --- a/include/fnetorderstream.h +++ b/include/fnetorderstream.h @@ -1,3 +1,31 @@ +/***************************************************************************** +** FILE IDENTIFICATION +** +** Name: fnetorderstream.h +** Purpose: Network-order file stream header +** Programmer: Kevin Rosenberg +** Date Started: Sep 2000 +** +** This is part of the CTSim program +** Copyright (C) 1983-2000 Kevin Rosenberg +** +** $Id: fnetorderstream.h,v 1.6 2000/12/16 06:12:47 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 +** published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +******************************************************************************/ + + #ifndef NETORDER_H #define NETORDER_H @@ -8,7 +36,6 @@ #include #include #include -using namespace std; inline bool NativeBigEndian (void) @@ -65,14 +92,11 @@ SwapBytes8 (void* buffer) void ConvertNetworkOrder (void* buffer, size_t bytes); void ConvertReverseNetworkOrder (void* buffer, size_t bytes); - +using std::fstream; class fnetorderstream : public fstream { public: fnetorderstream (const char* filename, int mode) - : fstream (filename, mode) {} - - fnetorderstream (const int fd) - : fstream (fd) {} + : fstream (filename, mode) {} ~fnetorderstream (void) {} @@ -94,9 +118,6 @@ class frnetorderstream : public fnetorderstream { frnetorderstream (const char* filename, int mode) : fnetorderstream (filename, mode) {} - frnetorderstream (const int fd) - : fnetorderstream (fd) {} - virtual void writeInt16 (kuint16 n); virtual void writeInt32 (kuint32 n); virtual void writeFloat32 (kfloat32 n);