00001 /*---------------------------------------------------------------------- 00002 $Id: Selector.cc,v 1.7 2008/05/12 18:14:08 wmtan Exp $ 00003 ----------------------------------------------------------------------*/ 00004 00005 #include "FWCore/Framework/interface/Selector.h" 00006 00007 namespace edm 00008 { 00009 //------------------------------------------------------------------ 00010 // 00011 // Selector 00012 // 00013 //------------------------------------------------------------------ 00014 00015 00016 Selector::Selector(Selector const& other) : 00017 sel_(other.sel_->clone()) 00018 { } 00019 00020 Selector& 00021 Selector::operator= (Selector const& other) 00022 { 00023 Selector temp(other); 00024 swap(temp); 00025 return *this; 00026 } 00027 00028 void 00029 Selector::swap(Selector& other) 00030 { 00031 std::swap(sel_, other.sel_); 00032 } 00033 00034 // We set sel_ = 0 to help diagnose memory overwrites. 00035 Selector::~Selector() { delete sel_; sel_ = 0; } 00036 00037 Selector* 00038 Selector::clone() const 00039 { 00040 return new Selector(*this); 00041 } 00042 00043 00044 bool 00045 Selector::doMatch(ConstBranchDescription const& prov) const 00046 { 00047 return sel_->match(prov); 00048 } 00049 00050 }