1 #ifndef DataFormats_Common_FwdRef_h
2 #define DataFormats_Common_FwdRef_h
120 template <
typename C,
132 typedef typename boost::binary_traits<F>::second_argument_type
argument_type;
157 T const*
get()
const {
158 if (
ref_.isNonnull() ) {
160 }
else if (
backRef_.isNonnull() ) {
182 if (
ref_.productGetter() )
return ref_.productGetter();
183 else return backRef_.productGetter();
215 #include "DataFormats/Common/interface/RefProd.h"
222 template <
typename C,
typename T,
typename F>
226 return ref_.isNonnull() && ref_.isAvailable() ?
232 template <
typename C,
typename T,
typename F>
236 return ref_.isNonnull() && ref_.isAvailable() ?
238 backRef_.operator*();
242 template <
typename C,
typename T,
typename F>
246 return ref_.isNonnull() && ref_.isAvailable() ?
248 backRef_.operator->();
254 template <
typename C,
typename T,
typename F>
259 (lhs.
ref() == rhs.
ref() ) &&
266 template <
typename C,
typename T,
typename F>
271 (lhs == rhs.
ref() ) ||
278 template <
typename C,
typename T,
typename F>
283 (lhs.
ref() == rhs ) ||
290 template <
typename C,
typename T,
typename F>
294 return !(lhs == rhs);
297 template <
typename C,
typename T,
typename F>
301 return !(lhs == rhs);
304 template <
typename C,
typename T,
typename F>
308 return !(lhs == rhs);
313 template <
typename C,
typename T,
typename F>
317 return (lhs.ref() < rhs.ref() );
320 template <
typename C,
typename T,
typename F>
324 return (lhs < rhs.ref() );
327 template <
typename C,
typename T,
typename F>
331 return (lhs.ref() < rhs );
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
#define CMS_CLASS_VERSION(_version_)
bool operator!() const
Checks for null.
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
key_type key() const
Accessor for product key.
EDProductGetter const * productGetter() const
Accessor for product getter.
bool isNull() const
Checks for null.
T const * operator->() const
Member dereference operator.
bool hasProductCache() const
bool isNonnull() const
Checks for non-null.
FwdRef()
Default constructor needed for reading from persistent store. Not for direct use. ...
FwdRef(Ref< C, T, F > const &ref, Ref< C, T, F > const &backRef)
General purpose constructor from 2 refs (forward and backward.
bool isTransient() const
Checks if this ref is transient (i.e. not persistable).
Ref< C, T, F > const & backRef() const
Ref< C, T, F > const & ref() const
C const * product() const
Accessor for product collection.
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
boost::binary_traits< F >::second_argument_type argument_type
ProductID id() const
Accessor for product ID.
T const & operator*() const
Dereference operator.