1 #ifndef DataFormats_Common_Wrapper_h
2 #define DataFormats_Common_Wrapper_h
19 #include "boost/mpl/if.hpp"
34 explicit Wrapper(std::auto_ptr<T> ptr);
51 std::vector<
void const*>& pointers,
54 void setPtr(std::type_info const& iToType,
56 void const*& oPtr) const;
59 std::vector<
unsigned long> const& iIndicies,
60 std::vector<
void const*>& oPtr) const;
97 std::vector<void const*>& pointers,
101 template <
typename T>
105 std::vector<void const*>&,
110 "\ndoes not support Views\n");
114 template <
typename T>
117 std::vector<void const*>& pointers,
121 assert(
id.isValid());
122 assert(pointers.empty());
123 assert(helpers.get() == 0);
127 maybe_filler(
obj,
id, pointers, helpers);
131 template <
typename T>
134 std::type_info
const& iToType,
135 unsigned long iIndex,
136 void const*& oPtr)
const;
138 std::type_info
const& iToType,
139 std::vector<unsigned long>
const& iIndex,
140 std::vector<void const*>& oPtr)
const;
143 template <
typename T>
146 std::type_info
const& ,
148 void const*& )
const {
152 "\ndoes not support edm::Ptr\n");
155 std::type_info
const& ,
156 std::vector<unsigned long>
const& ,
157 std::vector<void const*>& )
const {
161 "\ndoes not support edm::PtrVector\n");
165 template <
typename T>
168 unsigned long iIndex,
169 void const*& oPtr)
const {
173 maybe_filler(this->
obj, iToType, iIndex, oPtr);
176 template <
typename T>
178 std::vector<unsigned long>
const& iIndices,
179 std::vector<void const*>& oPtr)
const {
183 maybe_filler(this->
obj, iToType, iIndices, oPtr);
191 template <
typename T>
196 template <
typename T>
202 template <
typename T>
207 template <
typename T>
212 template <
typename T>
217 template <
typename T>
222 template <
typename T>
227 template <
typename T>
232 template <
typename T>
237 template <
typename T>
261 sizeof(has_swap_helper<T>(0)) ==
sizeof(
yes_tag);
272 sizeof(has_mergeProduct_helper<T>(0)) ==
sizeof(
yes_tag);
282 sizeof(has_isProductEqual_helper<T>(0)) ==
sizeof(
yes_tag);
287 template <
typename T>
289 present(ptr.
get() != 0),
297 swap_or_assign(
obj, *ptr);
301 template <
typename T>
305 std::auto_ptr<T>
temp(ptr);
312 swap_or_assign(
obj, *ptr);
318 template <
typename T>
323 return is_mergeable(
obj);
326 template <
typename T>
331 return merge_product(
obj, wrappedNewProduct->
obj);
334 template <
typename T>
339 return has_is_equal(
obj);
342 template <
typename T>
347 return is_equal(
obj, wrappedNewProduct->
obj);
361 std::vector<void const*>& pointers,
371 fillView(obj,
id, pointers, * helpers);
372 assert(pointers.size() == helpers->size());
380 std::vector<void const*>& pointers,
384 pointers.reserve(h->size());
396 std::vector<void const*>& pointers,
400 pointers.reserve(obj.
size());
411 std::type_info
const& iToType,
412 unsigned long iIndex,
418 setPtr(obj, iToType, iIndex, oPtr);
422 std::type_info
const& iToType,
423 std::vector<unsigned long>
const& iIndex,
424 std::vector<void const*>& oPtr) {
434 template <
typename T>
437 std::vector<void const*>& pointers,
442 template <
typename T>
444 std::type_info
const& iToType,
445 unsigned long iIndex,
446 void const*& oPtr)
const {
450 template <
typename T>
452 std::type_info
const& iToType,
453 std::vector<unsigned long>
const& iIndices,
454 std::vector<void const*>& oPtr)
const {
467 template <
typename T>
468 WrapperInterface<T>
const*
void operator()(T &a, T &b)
static void fill(PtrVector< T > const &obj, ProductID const &, std::vector< void const * > &pointers, helper_vector_ptr &helpers)
T const * operator->() const
size_type size() const
Size of the RefVector.
boost::shared_ptr< reftobase::RefVectorHolderBase > helper_vector_ptr
void fillView(AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper > const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector &helpers)
static void set(T const &obj, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
static PFTauRenderPlugin instance
void fillView(ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers) const
void fillPtrVector(std::vector< T, A > const &obj, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
std::type_info const & dynamicTypeInfo_() const
static std::type_info const & productTypeInfo()
bool isProductEqual(Wrapper< T > const *wrappedNewProduct) const
bool hasIsProductEqual() const
void operator()(T const &, ProductID const &, std::vector< void const * > &, helper_vector_ptr &) const
void setPtr(std::vector< T, A > const &obj, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
bool operator()(T const &) const
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
static void fill(T const &obj, std::type_info const &iToType, std::vector< unsigned long > const &iIndex, std::vector< void const * > &oPtr)
no_tag has_isProductEqual_helper(...)
void operator()(T &a, T &b)
static WrapperInterface< T > const * getInterface()
bool operator()(T const &) const
static void fill(RefToBaseVector< T > const &obj, ProductID const &, std::vector< void const * > &pointers, helper_vector_ptr &helpers)
std::auto_ptr< reftobase::RefVectorHolderBase > vectorHolder() const
static void fill(T const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers)
no_tag has_swap_helper(...)
bool operator()(T const &) const
std::type_info const & dynamicTypeInfo() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
T const * product() const
bool operator()(T &a, T const &b)
void operator()(T const &obj, ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers) const
void operator()(T const &, std::type_info const &, std::vector< unsigned long > const &, std::vector< void const * > &) const
void operator()(T const &, std::type_info const &, unsigned long, void const *&) const
void operator()(T const &obj, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
bool mergeProduct(Wrapper< T > const *wrappedNewProduct)
bool operator()(T const &) const
void setPtr(std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
bool operator()(T const &, T const &) const
void fillPtrVector(std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr) const
Wrapper< T > & operator=(Wrapper< T > const &)
T get(const Candidate &c)
no_tag has_mergeProduct_helper(...)
bool operator()(T const &a, T const &b) const
static std::type_info const & typeInfo()
bool operator()(T &, T const &)