Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:03:31

0001 #ifndef ZMHANDLETO_H
0002 #define ZMHANDLETO_H
0003 
0004 
0005 // ----------------------------------------------------------------------
0006 //
0007 // ZMhandleTo.h - generic handle class for objects that need to be
0008 //   reference-counted
0009 //
0010 // History:
0011 //   19-Sep-1997  WEB  Design stolen, and code adapted, from
0012 //     Stroustrup: "The C++ Programming Language, 3rd edition" (1997), p 783
0013 //     Koenig & Moo: "Ruminations on C++" (1996), ch 7
0014 //
0015 // ----------------------------------------------------------------------
0016 
0017 
0018 #ifndef ZMUSECOUNT_H
0019 #include "CLHEP/RefCount/ZMuseCount.h"
0020 #endif
0021 
0022 
0023 template< class T >
0024 class ZMhandleTo  {
0025 
0026 public:
0027 
0028   ZMhandleTo();
0029   ZMhandleTo( const ZMhandleTo & h );
0030   ~ZMhandleTo();
0031 
0032   ZMhandleTo & operator=( const ZMhandleTo & rhs );
0033 
0034 protected:
0035   ZMhandleTo( const T & t );
0036   ZMhandleTo( const T * t );
0037 
0038   ZMuseCount u_;
0039   T *        rep_;
0040 
0041 
0042 };  // ZMhandleTo<>
0043 
0044 
0045 #include "CLHEP/RefCount/ZMhandleTo.icc"
0046 
0047 
0048 #endif  // ZMHANDLETO_H