home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / yacl-012.zip / base / long.h < prev    next >
C/C++ Source or Header  |  1995-04-08  |  2KB  |  93 lines

  1.  
  2.  
  3. #ifndef _long_h_ /* Mon Aug  8 14:03:07 1994 */
  4. #define _long_h_
  5.  
  6.  
  7.  
  8.  
  9.  
  10. /*
  11.  *
  12.  *          Copyright (C) 1994, M. A. Sridhar
  13.  *  
  14.  *
  15.  *     This software is Copyright M. A. Sridhar, 1994. You are free
  16.  *     to copy, modify or distribute this software  as you see fit,
  17.  *     and to use  it  for  any  purpose, provided   this copyright
  18.  *     notice and the following   disclaimer are included  with all
  19.  *     copies.
  20.  *
  21.  *                        DISCLAIMER
  22.  *
  23.  *     The author makes no warranties, either expressed or implied,
  24.  *     with respect  to  this  software, its  quality, performance,
  25.  *     merchantability, or fitness for any particular purpose. This
  26.  *     software is distributed  AS IS.  The  user of this  software
  27.  *     assumes all risks  as to its quality  and performance. In no
  28.  *     event shall the author be liable for any direct, indirect or
  29.  *     consequential damages, even if the  author has been  advised
  30.  *     as to the possibility of such damages.
  31.  *
  32.  */
  33.  
  34.  
  35.  
  36.  
  37. // Template specializations for the type-specific "basic operations" on
  38. // the CL_VoidPtr type.
  39.  
  40. inline long  CL_Basics<long>::NullValue ()
  41. {
  42.     return 0;
  43. }
  44.  
  45. inline short      CL_Basics<long>::Compare (const long& o1, const long&
  46.                                             o2)
  47. {
  48.     return o1 < o2 ? -1 : (o1 == o2 ? 0 : 1);
  49. }
  50.  
  51. inline CL_String  CL_Basics<long>::PrintableForm (const long& o)
  52. {
  53.     return CL_String (o);
  54. }
  55.  
  56. inline long       CL_Basics<long>::StoreWidth (const long& l)
  57. {
  58.     return sizeof l;
  59. }
  60.  
  61.  
  62. inline void       CL_Basics<long>::Destroy (CL_VoidPtr)
  63. {
  64.     // Do nothing
  65. }
  66.  
  67. inline void       CL_Basics<long>::ReallyDestroy (const long&)
  68. {
  69. }
  70.  
  71.  
  72. inline long& CL_Basics<long>::Deref (CL_VoidPtr& p)
  73. {
  74.     return (long&) p;
  75. }
  76.  
  77.  
  78. inline CL_VoidPtr    CL_Basics<long>::MakeCopy (const long& o)
  79. {
  80.     register CL_VoidPtr p = (const CL_VoidPtr&) o;
  81.     return p;
  82. }
  83.  
  84. inline CL_VoidPtr    CL_Basics<long>::MakePointer (const long& o)
  85. {
  86.     register CL_VoidPtr p = (const CL_VoidPtr&) o;
  87.     return p;
  88. }
  89.  
  90.  
  91.  
  92. #endif /* _long_h_ */
  93.