stdistream.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2002 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #include "stdpre.h"
00016 #if HAVE_ISTREAM
00017 #include <istream>
00018 #else
00019 #include <iostream>
00020 #endif
00021 #include "stdpost.h"
00022 
00023 #if defined(_MSC_VER) && _MSC_VER <= 1200
00024 // VC++6 istream has no overloads for __int* types, .NET does
00025 inline
00026 std::istream& operator>>(std::istream& s, SInt8& i)
00027 { return s >> (signed char&)i; }
00028 inline
00029 std::istream& operator>>(std::istream& s, SInt16& i)
00030 { return s >> (short&)i; }
00031 inline
00032 std::istream& operator>>(std::istream& s, SInt32& i)
00033 { return s >> (int&)i; }
00034 inline
00035 std::istream& operator>>(std::istream& s, UInt8& i)
00036 { return s >> (unsigned char&)i; }
00037 inline
00038 std::istream& operator>>(std::istream& s, UInt16& i)
00039 { return s >> (unsigned short&)i; }
00040 inline
00041 std::istream& operator>>(std::istream& s, UInt32& i)
00042 { return s >> (unsigned int&)i; }
00043 #endif

Generated on Fri Nov 6 00:18:46 2009 for synergy-plus by  doxygen 1.4.7