1 #ifndef DataFormats_Common_FwdRef_h
2 #define DataFormats_Common_FwdRef_h
116 #include <boost/functional.hpp>
120 template <
typename C,
130 typedef typename boost::binary_traits<F>::second_argument_type
argument_type;
153 T const*
get()
const {
154 if (
ref_.isAvailable()) {
208 #include "DataFormats/Common/interface/RefProd.h"
213 template <
typename C,
typename T,
typename F>
215 return ref_.isNonnull() && ref_.isAvailable() ? ref_.operator*() : backRef_.operator*();
219 template <
typename C,
typename T,
typename F>
221 return ref_.isNonnull() && ref_.isAvailable() ? ref_.operator->() : backRef_.operator->();
226 template <
typename C,
typename T,
typename F>
233 template <
typename C,
typename T,
typename F>
235 return (lhs == rhs.
ref()) || (lhs == rhs.
backRef());
240 template <
typename C,
typename T,
typename F>
242 return (lhs.
ref() == rhs) || (lhs.
backRef() == rhs);
245 template <
typename C,
typename T,
typename F>
247 return !(lhs == rhs);
250 template <
typename C,
typename T,
typename F>
252 return !(lhs == rhs);
255 template <
typename C,
typename T,
typename F>
257 return !(lhs == rhs);
262 template <
typename C,
typename T,
typename F>
264 return (lhs.ref() < rhs.ref());
267 template <
typename C,
typename T,
typename F>
269 return (lhs < rhs.ref());
272 template <
typename C,
typename T,
typename F>
273 inline bool operator<(FwdRef<C, T, F>
const& lhs,
Ref<C, T, F> const& rhs) {
274 return (lhs.ref() < rhs);
constexpr bool operator==(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
#define CMS_CLASS_VERSION(_version_)
bool operator!() const
Checks for null.
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.
constexpr bool operator!=(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
bool hasProductCache() const
bool isNull() const
Checks for null.
Ref< C, T, F > const & backRef() 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).
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Ref< C, T, F > const & ref() const
boost::binary_traits< F >::second_argument_type argument_type
ProductID id() const
Accessor for product ID.
T const & operator*() const
Dereference operator.