00001 // -*- C++ -*- 00002 // 00003 // Package: Framework 00004 // Class : GenericObjectOwner 00005 // 00006 // Implementation: 00007 // <Notes on implementation> 00008 // 00009 // Original Author: Chris Jones 00010 // Created: Thu Feb 7 17:21:22 EST 2008 00011 // $Id: GenericObjectOwner.cc,v 1.1 2008/02/12 21:48:33 chrjones Exp $ 00012 // 00013 00014 // system include files 00015 00016 // user include files 00017 #include "FWCore/Framework/interface/GenericObjectOwner.h" 00018 00019 namespace edm { 00020 // 00021 // constants, enums and typedefs 00022 // 00023 00024 // 00025 // static data member definitions 00026 // 00027 00028 // 00029 // constructors and destructor 00030 // 00031 //GenericObjectOwner::GenericObjectOwner() 00032 //{ 00033 //} 00034 00035 // GenericObjectOwner::GenericObjectOwner(const GenericObjectOwner& rhs) 00036 // { 00037 // // do actual copying here; 00038 // } 00039 00040 GenericObjectOwner::~GenericObjectOwner() 00041 { 00042 if(m_ownData) { 00043 m_object.Destruct(); 00044 } 00045 } 00046 00047 // 00048 // assignment operators 00049 // 00050 // const GenericObjectOwner& GenericObjectOwner::operator=(const GenericObjectOwner& rhs) 00051 // { 00052 // //An exception safe implementation is 00053 // GenericObjectOwner temp(rhs); 00054 // swap(rhs); 00055 // 00056 // return *this; 00057 // } 00058 00059 // 00060 // member functions 00061 // 00062 void 00063 GenericObjectOwner::swap(GenericObjectOwner& iOther) 00064 { 00065 ROOT::Reflex::Object old(m_object); 00066 m_object = iOther.m_object; 00067 iOther.m_object = m_object; 00068 } 00069 00070 // 00071 // const member functions 00072 // 00073 ROOT::Reflex::Object 00074 GenericObjectOwner::object() const 00075 { 00076 return m_object; 00077 } 00078 00079 // 00080 // static member functions 00081 // 00082 }