home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ibasstrm.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  3.7 KB  |  138 lines

  1. #ifndef _IBASSTRM_INL_
  2. #define _IBASSTRM_INL_ 0
  3. /*******************************************************************************
  4. * FILE NAME: ibasstrm.inl                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the definition of the inline functions for the          *
  8. *   classes declared in ibasstrm.hpp.                                          *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *   Portions or this component are based on work originating from Taligent.    *
  18. *   (C) Copyright Taligent, Inc. 1996 - All rights reserved.                   *
  19. *                                                                              *
  20. *******************************************************************************/
  21. #ifndef _IBASSTRM_
  22.   #undef  _IBASSTRM_INL_
  23.   #define _IBASSTRM_INL_ 1
  24.   #include <ibasstrm.hpp>
  25. #endif
  26.  
  27. #if _IBASSTRM_INL_
  28.   #define inline
  29. #endif
  30.  
  31.  
  32. //===============================================================================
  33. //
  34. // Global operators for streaming support....
  35. //
  36.  
  37. inline IBaseStream& operator<<=(char* c, IBaseStream& s)
  38. {
  39.     return s.read(c);
  40. }
  41.  
  42. inline IBaseStream& operator<<=(long& c, IBaseStream& s)
  43. {
  44.     return s.read(c);
  45. }
  46.  
  47. inline IBaseStream& operator<<=(short& c, IBaseStream& s)
  48. {
  49.     return s.read(c);
  50. }
  51.  
  52. inline IBaseStream& operator<<=(char& c, IBaseStream& s)
  53. {
  54.     return s.read((unsigned char&)c);
  55. }
  56.  
  57. inline IBaseStream& operator<<=(signed char& c, IBaseStream& s)
  58. {
  59.     return s.read(c);
  60. }
  61.  
  62. inline IBaseStream& operator<<=(unsigned long& c, IBaseStream& s)
  63. {
  64.     return s.read(c);
  65. }
  66.  
  67. inline IBaseStream& operator<<=(unsigned short& c, IBaseStream& s)
  68. {
  69.     return s.read(c);
  70. }
  71.  
  72. inline IBaseStream& operator<<=(unsigned char& c, IBaseStream& s)
  73. {
  74.     return s.read(c);
  75. }
  76.  
  77. inline IBaseStream& operator<<=(float& c, IBaseStream& s)
  78. {
  79.     return s.read(c);
  80. }
  81.  
  82. inline IBaseStream& operator<<=(double& c, IBaseStream& s)
  83. {
  84.     return s.read(c);
  85. }
  86.  
  87. inline IBaseStream& operator>>=(const char* c, IBaseStream& s)
  88. {
  89.     return s.write(c);
  90. }
  91.  
  92. inline IBaseStream& operator>>=(long c, IBaseStream& s)
  93. {
  94.     return s.write(c);
  95. }
  96.  
  97. inline IBaseStream& operator>>=(short c, IBaseStream& s)
  98. {
  99.     return s.write(c);
  100. }
  101.  
  102. inline IBaseStream& operator>>=(char c, IBaseStream& s)
  103. {
  104.     return s.write((unsigned char)c);
  105. }
  106.  
  107. inline IBaseStream& operator>>=(signed char c, IBaseStream& s)
  108. {
  109.     return s.write(c);
  110. }
  111.  
  112. inline IBaseStream& operator>>=(unsigned long c, IBaseStream& s)
  113. {
  114.     return s.write(c);
  115. }
  116.  
  117. inline IBaseStream& operator>>=(unsigned short c, IBaseStream& s)
  118. {
  119.     return s.write(c);
  120. }
  121.  
  122. inline IBaseStream& operator>>=(unsigned char c, IBaseStream& s)
  123. {
  124.     return s.write(c);
  125. }
  126.  
  127. inline IBaseStream& operator>>=(float c, IBaseStream& s)
  128. {
  129.     return s.write(c);
  130. }
  131.  
  132. inline IBaseStream& operator>>=(double c, IBaseStream& s)
  133. {
  134.     return s.write(c);
  135. }
  136.  
  137. #endif /* _IBASSTRM_INL_ */
  138.