Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/magnus/back_end/global/IPC.h

Go to the documentation of this file.
00001 /*
00002  *   $Id: IPC.h,v 1.3 2000/09/26 20:44:13 bormotov Exp $
00003  */
00004 
00005 // Copyright (C) 1994 The New York Group Theory Cooperative
00006 // See magnus/doc/COPYRIGHT for the full notice.
00007 
00008 // Contents: Global operators for Interprocess Communication (IPC).
00009 //
00010 // Principal Author: Dmitry Bormotov
00011 //
00012 // Status: Under development
00013 //
00014 // Special Notes:
00015 //
00016 //   This file includes only operators which will be used almost 
00017 //   everywhere.
00018 //
00019 
00020 #ifndef _IPC_H_
00021 #define _IPC_H_
00022 
00023 
00024 // ------------------------- Output operators ------------------------------ //
00025 
00026 
00027 inline ostream& operator < ( ostream& ostr, int n )
00028 {
00029   ostr << n << ' ';
00030   return ostr;
00031 }
00032 
00033 inline ostream& operator < ( ostream& ostr, unsigned int n )
00034 {
00035   ostr << n << ' ';
00036   return ostr;
00037 }
00038 
00039 inline ostream& operator < ( ostream& ostr, short n )
00040 {
00041   ostr << n << ' ';
00042   return ostr;
00043 }
00044 
00045 inline ostream& operator < ( ostream& ostr, long n )
00046 {
00047   ostr << n << ' ';
00048   return ostr;
00049 }
00050 
00051 inline ostream& operator < ( ostream& ostr, bool b )
00052 {
00053   ostr << b << ' ';
00054   return ostr;
00055 }
00056 
00057 inline ostream& operator < ( ostream& ostr, char c )
00058 {
00059   ostr << c << ' ';
00060   return ostr;
00061 }
00062 
00063 inline ostream& operator < ( ostream& ostr, const char *s )
00064 {
00065   ostr << s << ' ';
00066   return ostr;
00067 }
00068 
00069 inline ostream& operator < ( ostream& ostr, const double d )
00070 {
00071   ostr << d << ' ';
00072   return ostr;
00073 }
00074 
00075 
00076 // ------------------------- Input operators ------------------------------- //
00077 
00078 
00079 inline istream& operator > ( istream& istr, int& n )
00080 {
00081   istr >> n;
00082   return istr;
00083 }
00084 
00085 inline istream& operator > ( istream& istr, unsigned int& n )
00086 {
00087   istr >> n;
00088   return istr;
00089 }
00090 
00091 inline istream& operator > ( istream& istr, short& n )
00092 {
00093   istr >> n;
00094   return istr;
00095 }
00096 
00097 inline istream& operator > ( istream& istr, long& n )
00098 {
00099   istr >> n;
00100   return istr;
00101 }
00102 
00103 inline istream& operator > ( istream& istr, bool& b )
00104 {
00105   istr >> b;
00106   return istr;
00107 }
00108 
00109 inline istream& operator > ( istream& istr, char& c )
00110 {
00111   istr >> c;
00112   return istr;
00113 }
00114 
00115 inline istream& operator > ( istream& istr, char* s )
00116 {
00117   istr >> s;
00118   return istr;
00119 }
00120 
00121 inline istream& operator > ( istream& istr, double d )
00122 {
00123   istr >> d;
00124   return istr;
00125 }
00126 
00127 inline istream& operator > ( istream& istr, void* p )
00128 {
00129 //  istr >> s;
00130   return istr;
00131 }
00132 //@db this function shouldn't be used at all, it just shuts the compiler up. 
00133 
00134 #endif
00135 

Generated at Tue Jun 19 09:49:36 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001