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

  1.  
  2.  
  3. #ifndef _voidptr_h_ /* Mon Aug  8 14:02:32 1994 */
  4. #define _voidptr_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 CL_VoidPtr       CL_Basics<CL_VoidPtr>::NullValue ()
  41. {
  42.     return 0;
  43. }
  44. inline short      CL_Basics<CL_VoidPtr>::Compare (const CL_VoidPtr& o1,
  45.                                            const CL_VoidPtr& o2)
  46.     return o1 < o2 ? -1 : (o1 == o2 ? 0 : 1);
  47. }
  48.  
  49. inline CL_String  CL_Basics<CL_VoidPtr>::PrintableForm (const CL_VoidPtr& o)
  50. {
  51.     CL_String s;
  52.     s.AssignWithFormat ("%lx", o);
  53.     return s;
  54. }
  55.  
  56. inline long       CL_Basics<CL_VoidPtr>::StoreWidth (const CL_VoidPtr&)
  57. {
  58.     return sizeof (CL_VoidPtr);
  59. }
  60.  
  61. inline void       CL_Basics<CL_VoidPtr>::Destroy (CL_VoidPtr)
  62. {
  63.     // Do nothing
  64. }
  65.  
  66.  
  67. inline void       CL_Basics<CL_VoidPtr>::ReallyDestroy (const CL_VoidPtr&)
  68. {
  69. }
  70.  
  71. inline CL_VoidPtr& CL_Basics<CL_VoidPtr>::Deref (CL_VoidPtr& p)
  72. {
  73.     return p;
  74. }
  75.  
  76.  
  77. inline CL_VoidPtr    CL_Basics<CL_VoidPtr>::MakeCopy (const CL_VoidPtr& o)
  78. {
  79.     return o;
  80. }
  81.  
  82. inline CL_VoidPtr    CL_Basics<CL_VoidPtr>::MakePointer (const CL_VoidPtr& o)
  83. {
  84.     return o;
  85. }
  86.  
  87.  
  88.  
  89. #endif /* _voidptr_h_ */
  90.