From: Kevin M. Rosenberg Date: Fri, 15 Dec 2000 23:48:25 +0000 (+0000) Subject: r253: *** empty log message *** X-Git-Tag: debian-4.5.3-3~764 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=7c3c1727423ad6c0f56ac45ac33f250b4029dc88 r253: *** empty log message *** --- diff --git a/include/ct.h b/include/ct.h index 84e139f..16b79a6 100644 --- a/include/ct.h +++ b/include/ct.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ct.h,v 1.42 2000/12/06 15:17:51 kevin Exp $ +** $Id: ct.h,v 1.43 2000/12/15 23:48:25 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 @@ -57,7 +57,7 @@ using namespace std; #if defined(MSVC) || HAVE_SSTREAM #include #else -#include +#include #endif #include diff --git a/include/sstream b/include/sstream deleted file mode 100644 index c89ffdc..0000000 --- a/include/sstream +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef __CM_SSTREAM__ -#define __CM_SSTREAM__ - -#ifndef MSVC - -#include -#include -#include -#include - -namespace std { - -class ostringstream -{ -public: - ostringstream (const string & str = "") - : buffer(str) {} - - const string & str() const - { - return buffer; - } - - void str (const string & new_string) - { - buffer = new_string; - } - - ostringstream & operator<< (const string & item) - { - buffer += item; - - return *this; - } - - ostringstream & operator<< (int item) - { - char temp[100]; - - sprintf (temp, "%d", item); - buffer += temp; - - return *this; - } - - ostringstream & operator<< (unsigned int item) - { - char temp[100]; - - sprintf (temp, "%u", item); - buffer += temp; - - return *this; - } - - ostringstream & operator<< (char item) - { - buffer += item; - return *this; - } - - ostringstream & operator<< (double item) - { - char temp[1000]; - - sprintf (temp, "%g", item); - buffer += temp; - - return *this; - } - -private: - string buffer; -}; - - - -class istringstream -{ - friend istringstream & getline (istringstream &, string &, char = '\n'); - -public: - istringstream (const string & str = "") - : buffer (str.c_str(), str.length()) {} - - template - istringstream & operator>> (T & item) - { - buffer >> item; - return *this; - } - - operator void * () const - { - return (void *) buffer; - } - -private: - istrstream buffer; -}; - - -inline istringstream & getline (istringstream & src_stream, string & str, char separator) -{ - getline (src_stream.buffer, str, separator); - return src_stream; -} - -} // End of namespace std - -#endif - -#endif - diff --git a/include/sstream_subst b/include/sstream_subst new file mode 100644 index 0000000..c89ffdc --- /dev/null +++ b/include/sstream_subst @@ -0,0 +1,114 @@ +#ifndef __CM_SSTREAM__ +#define __CM_SSTREAM__ + +#ifndef MSVC + +#include +#include +#include +#include + +namespace std { + +class ostringstream +{ +public: + ostringstream (const string & str = "") + : buffer(str) {} + + const string & str() const + { + return buffer; + } + + void str (const string & new_string) + { + buffer = new_string; + } + + ostringstream & operator<< (const string & item) + { + buffer += item; + + return *this; + } + + ostringstream & operator<< (int item) + { + char temp[100]; + + sprintf (temp, "%d", item); + buffer += temp; + + return *this; + } + + ostringstream & operator<< (unsigned int item) + { + char temp[100]; + + sprintf (temp, "%u", item); + buffer += temp; + + return *this; + } + + ostringstream & operator<< (char item) + { + buffer += item; + return *this; + } + + ostringstream & operator<< (double item) + { + char temp[1000]; + + sprintf (temp, "%g", item); + buffer += temp; + + return *this; + } + +private: + string buffer; +}; + + + +class istringstream +{ + friend istringstream & getline (istringstream &, string &, char = '\n'); + +public: + istringstream (const string & str = "") + : buffer (str.c_str(), str.length()) {} + + template + istringstream & operator>> (T & item) + { + buffer >> item; + return *this; + } + + operator void * () const + { + return (void *) buffer; + } + +private: + istrstream buffer; +}; + + +inline istringstream & getline (istringstream & src_stream, string & str, char separator) +{ + getline (src_stream.buffer, str, separator); + return src_stream; +} + +} // End of namespace std + +#endif + +#endif + diff --git a/include/transformmatrix.h b/include/transformmatrix.h index 6282b61..bdae6cf 100644 --- a/include/transformmatrix.h +++ b/include/transformmatrix.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: transformmatrix.h,v 1.2 2000/12/06 01:46:43 kevin Exp $ +** $Id: transformmatrix.h,v 1.3 2000/12/15 23:48:25 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 @@ -28,7 +28,7 @@ #ifndef __H_TRANSFORMMATRIX #define __H_TRANSFORMMATRIX -#include +#include class TransformationMatrix2D { public: