CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
View.cc
Go to the documentation of this file.
2 #include <typeinfo>
3 
4 namespace edm {
5  //------------------------------------------------------------------
6  // Implementation of ViewBase.
7  //------------------------------------------------------------------
8 
10 
11  std::unique_ptr<ViewBase> ViewBase::clone() const {
12  auto p = doClone();
13 #if !defined(NDEBUG)
14  //move side-effect out of typeid to avoid compiler warning
15  auto p_get = p.get();
16  assert(typeid(*p_get) == typeid(*this) && "doClone() incorrectly overriden");
17 #endif
18  return p;
19  }
20 
22 
24 
25 } // namespace edm
assert(be >=bs)
virtual std::unique_ptr< ViewBase > doClone() const =0
std::unique_ptr< ViewBase > clone() const
Definition: View.cc:11
ViewBase()
Definition: View.cc:21
virtual ~ViewBase()
Definition: View.cc:9