CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WrapperInterfaceBase.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_WrapperInterfaceBase_h
2 #define DataFormats_Provenance_WrapperInterfaceBase_h
3 
4 /*----------------------------------------------------------------------
5 
6 WrapperInterfaceBase: The base class of all things that will be inserted into the Event.
7 /
8 ----------------------------------------------------------------------*/
9 #include "boost/shared_ptr.hpp"
10 
11 #include <typeinfo>
12 #include <vector>
13 
14 namespace edm {
15  class ProductID;
16  namespace reftobase {
17  class RefVectorHolderBase;
18  }
19  typedef boost::shared_ptr<reftobase::RefVectorHolderBase> helper_vector_ptr;
21  public:
23  virtual ~WrapperInterfaceBase();
24 
25  void deleteProduct(void const* me) const {
26  deleteProduct_(me);
27  }
28 
29  void fillView(void const* me,
30  ProductID const& id,
31  std::vector<void const*>& view,
32  helper_vector_ptr& helpers) const;
33 
34  void setPtr(void const* me,
35  std::type_info const& iToType,
36  unsigned long iIndex,
37  void const*& oPtr) const;
38 
39  void fillPtrVector(void const* me,
40  std::type_info const& iToType,
41  std::vector<unsigned long> const& iIndicies,
42  std::vector<void const*>& oPtr) const;
43 
44  bool isMergeable(void const* me) const {
45  return isMergeable_(me);
46  }
47 
48  bool hasIsProductEqual(void const* me) const {
49  return hasIsProductEqual_(me);
50  }
51 
52  bool mergeProduct(void* me, void const* newProduct) const {
53  return mergeProduct_(me, newProduct);
54  }
55 
56  bool isProductEqual(void const* me, void const* newProduct) const {
57  return isProductEqual_(me, newProduct);
58  }
59 
60  bool isPresent(void const* me) const {
61  return isPresent_(me);
62  }
63 
64  std::type_info const& dynamicTypeInfo() const {
65  return dynamicTypeInfo_();
66  }
67 
68  std::type_info const& wrappedTypeInfo() const {
69  return wrappedTypeInfo_();
70  }
71 
72  private:
73  virtual void deleteProduct_(void const* me) const = 0;
74 
75  virtual void do_fillView(void const* me,
76  ProductID const& id,
77  std::vector<void const*>& pointers,
78  helper_vector_ptr& helpers) const = 0;
79 
80  virtual void do_setPtr(void const* me,
81  std::type_info const& iToType,
82  unsigned long iIndex,
83  void const*& oPtr) const = 0;
84 
85  virtual void do_fillPtrVector(void const* me,
86  std::type_info const& iToType,
87  std::vector<unsigned long> const& iIndicies,
88  std::vector<void const*>& oPtr) const = 0;
89 
90  virtual bool isMergeable_(void const* me) const = 0;
91 
92  virtual bool hasIsProductEqual_(void const* me) const = 0;
93 
94  virtual bool mergeProduct_(void* me, void const* newProduct) const = 0;
95 
96  virtual bool isProductEqual_(void const* me, void const* newProduct) const = 0;
97 
98  virtual std::type_info const& dynamicTypeInfo_() const = 0;
99 
100  virtual std::type_info const& wrappedTypeInfo_() const = 0;
101 
102  virtual bool isPresent_(void const* me) const = 0;
103  };
104 }
105 #endif
bool isProductEqual(void const *me, void const *newProduct) const
boost::shared_ptr< reftobase::RefVectorHolderBase > helper_vector_ptr
Definition: EDProductfwd.h:46
virtual void do_fillPtrVector(void const *me, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr) const =0
std::type_info const & dynamicTypeInfo() const
bool mergeProduct(void *me, void const *newProduct) const
virtual void do_setPtr(void const *me, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const =0
virtual void do_fillView(void const *me, ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers) const =0
virtual bool isProductEqual_(void const *me, void const *newProduct) const =0
std::type_info const & wrappedTypeInfo() const
virtual void deleteProduct_(void const *me) const =0
virtual bool hasIsProductEqual_(void const *me) const =0
bool isMergeable(void const *me) const
void fillView(void const *me, ProductID const &id, std::vector< void const * > &view, helper_vector_ptr &helpers) const
void deleteProduct(void const *me) const
virtual bool mergeProduct_(void *me, void const *newProduct) const =0
virtual bool isMergeable_(void const *me) const =0
void setPtr(void const *me, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
virtual std::type_info const & dynamicTypeInfo_() const =0
virtual std::type_info const & wrappedTypeInfo_() const =0
bool isPresent(void const *me) const
virtual bool isPresent_(void const *me) const =0
void fillPtrVector(void const *me, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr) const
bool hasIsProductEqual(void const *me) const