Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBclonedObjPtr.icc

Go to the documentation of this file.
00001 
00006 /*----------------------------------------------------------------------------*/
00007 /* C Tool Box: Designed and implemented by:                                   */
00008 /*    Walter F.J. Mueller   Gesellschaft fuer Schwerionenforschung (GSI)      */
00009 /*                          Planckstrasse 1, D-64291 Darmstadt, Germany       */
00010 /*                  Email:  W.F.J.Mueller@gsi.de                              */
00011 /*                  WWW:    http://www-kp3.gsi.de/www/kp3/people/mueller.html */
00012 /*------------------------------------------+---------------------------------*/
00013 
00014 #include "CTBclone.hxx"
00015 
00036 //------------------------------------------+-----------------------------------
00038 
00039 template <class T>
00040 inline CTBclonedObjPtr<T>::CTBclonedObjPtr()
00041   : CTBownedObjPtr<T>()
00042 {}
00043 
00044 //------------------------------------------+-----------------------------------
00046 
00051 template <class T>
00052 inline CTBclonedObjPtr<T>::CTBclonedObjPtr(const CTBclonedObjPtr<T>& rhs)
00053   : CTBownedObjPtr<T>()
00054 {
00055   CTBclone<T> clone;
00056   if (rhs) mp = clone(*rhs);
00057 }
00058 
00059 //------------------------------------------+-----------------------------------
00061 
00065 template <class T>
00066 inline CTBclonedObjPtr<T>::CTBclonedObjPtr(T* p)
00067   : CTBownedObjPtr<T>(p)
00068 {}
00069 
00070 //------------------------------------------+-----------------------------------
00072 
00077 template <class T>
00078 inline CTBclonedObjPtr<T>& CTBclonedObjPtr<T>::operator=(
00079     const CTBclonedObjPtr<T>& rhs)
00080 {
00081   if (&rhs != this) {
00082     CTBclone<T> clone;
00083     delete mp;
00084     mp = (rhs) ? clone(*rhs) : 0;
00085   }
00086   return *this;
00087 }
00088 
00089 //------------------------------------------+-----------------------------------
00091 
00092 template <class T>
00093 inline CTBclonedObjPtr<T>& CTBclonedObjPtr<T>::operator=(T* rhs)
00094 {
00095   CTBownedObjPtr<T>::operator=(rhs);
00096   return *this;
00097 }
00098 

Generated at Fri Oct 24 18:11:27 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001