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);
50 std::vector<
void const*>& pointers,
53 void setPtr(std::type_info const& iToType,
55 void const*& oPtr) const;
58 std::vector<
unsigned long> const& iIndicies,
59 std::vector<
void const*>& oPtr) const;
96 std::vector<void const*>& pointers,
100 template <
typename T>
104 std::vector<void const*>&,
109 "\ndoes not support Views\n");
113 template <
typename T>
116 std::vector<void const*>& pointers,
120 assert(
id.isValid());
121 assert(pointers.empty());
122 assert(helpers.get() == 0);
126 maybe_filler(
obj,
id, pointers, helpers);
130 template <
typename T>
133 std::type_info
const& iToType,
134 unsigned long iIndex,
135 void const*& oPtr)
const;
137 std::type_info
const& iToType,
138 std::vector<unsigned long>
const& iIndex,
139 std::vector<void const*>& oPtr)
const;
142 template <
typename T>
145 std::type_info
const& ,
147 void const*& )
const {
151 "\ndoes not support edm::Ptr\n");
154 std::type_info
const& ,
155 std::vector<unsigned long>
const& ,
156 std::vector<void const*>& )
const {
160 "\ndoes not support edm::PtrVector\n");
164 template <
typename T>
167 unsigned long iIndex,
168 void const*& oPtr)
const {
172 maybe_filler(this->
obj, iToType, iIndex, oPtr);
175 template <
typename T>
177 std::vector<unsigned long>
const& iIndices,
178 std::vector<void const*>& oPtr)
const {
182 maybe_filler(this->
obj, iToType, iIndices, oPtr);
190 template <
typename T>
195 template <
typename T>
201 template <
typename T>
206 template <
typename T>
211 template <
typename T>
216 template <
typename T>
221 template <
typename T>
226 template <
typename T>
231 template <
typename T>
236 template <
typename T>
260 sizeof(has_swap_helper<T>(0)) ==
sizeof(
yes_tag);
271 sizeof(has_mergeProduct_helper<T>(0)) ==
sizeof(
yes_tag);
281 sizeof(has_isProductEqual_helper<T>(0)) ==
sizeof(
yes_tag);
286 template <
typename T>
288 present(ptr.
get() != 0),
296 swap_or_assign(
obj, *ptr);
300 template <
typename T>
304 std::auto_ptr<T>
temp(ptr);
311 swap_or_assign(
obj, *ptr);
317 template <
typename T>
322 return is_mergeable(
obj);
325 template <
typename T>
330 return merge_product(
obj, wrappedNewProduct->
obj);
333 template <
typename T>
338 return has_is_equal(
obj);
341 template <
typename T>
346 return is_equal(
obj, wrappedNewProduct->
obj);
360 std::vector<void const*>& pointers,
370 fillView(obj,
id, pointers, * helpers);
371 assert(pointers.size() == helpers->size());
379 std::vector<void const*>& pointers,
383 pointers.reserve(h->size());
395 std::vector<void const*>& pointers,
399 pointers.reserve(obj.
size());
410 std::type_info
const& iToType,
411 unsigned long iIndex,
417 setPtr(obj, iToType, iIndex, oPtr);
421 std::type_info
const& iToType,
422 std::vector<unsigned long>
const& iIndex,
423 std::vector<void const*>& oPtr) {
433 template <
typename T>
436 std::vector<void const*>& pointers,
441 template <
typename T>
443 std::type_info
const& iToType,
444 unsigned long iIndex,
445 void const*& oPtr)
const {
449 template <
typename T>
451 std::type_info
const& iToType,
452 std::vector<unsigned long>
const& iIndices,
453 std::vector<void const*>& oPtr)
const {
466 template <
typename T>
467 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
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
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
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)
volatile std::atomic< bool > shutdown_flag false
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 &)