CMS 3D CMS Logo

Classes | Namespaces | Macros | Functions
Equal.h File Reference
#include <typeinfo>
#include <type_traits>
#include <algorithm>
#include <string>
#include <bitset>
#include <utility>
#include <tuple>
#include <memory>
#include <array>
#include <vector>
#include <deque>
#include <forward_list>
#include <list>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <cstddef>
#include <cmath>
#include "CondFormats/Serialization/interface/Serializable.h"

Go to the source code of this file.

Classes

struct  cond::serialization::access< std::array< T, N > >
 
struct  cond::serialization::access< std::bitset< N > >
 
struct  cond::serialization::access< std::deque< T > >
 
struct  cond::serialization::access< std::forward_list< T > >
 
struct  cond::serialization::access< std::list< T > >
 
struct  cond::serialization::access< std::map< T, U > >
 
struct  cond::serialization::access< std::multiset< T > >
 
struct  cond::serialization::access< std::pair< T, U > >
 
struct  cond::serialization::access< std::set< T > >
 
struct  cond::serialization::access< std::shared_ptr< T > >
 
struct  cond::serialization::access< std::string >
 
struct  cond::serialization::access< std::tuple< Ts... > >
 
struct  cond::serialization::access< std::unique_ptr< T > >
 
struct  cond::serialization::access< std::unordered_map< T, U > >
 
struct  cond::serialization::access< std::vector< T > >
 
struct  cond::serialization::access< T, typename std::enable_if< std::is_floating_point< T >::value >::type >
 
struct  cond::serialization::access< T, typename std::enable_if< std::is_integral< T >::value or std::is_enum< T >::value >::type >
 
struct  cond::serialization::access< T, typename std::enable_if< std::is_pointer< T >::value >::type >
 
struct  cond::serialization::access< T[N]>
 
struct  cond::serialization::equal_tuple< N, Ts >
 
struct  cond::serialization::equal_tuple< 0, Ts... >
 

Namespaces

 cond
 
 cond::serialization
 

Macros

#define equal_mapping(TYPE)
 
#define equal_pointer(TYPE)
 
#define equal_sequence(TYPE)
 
#define equal_unorderedmapping(TYPE)
 

Functions

template<typename T >
bool cond::serialization::equal (const T &first, const T &second)
 

Macro Definition Documentation

◆ equal_mapping

#define equal_mapping (   TYPE)
Value:
template <typename T, typename U> \
struct access<TYPE<T, U>> { \
static bool equal_(const TYPE<T, U>& first, const TYPE<T, U>& second) { \
return first.size() == second.size() && \
std::equal(first.cbegin(), \
first.cend(), \
second.cbegin(), \
[](decltype(*first.cbegin()) a, decltype(*first.cbegin()) b) -> bool { return equal(a, b); }); \
} \
};

Definition at line 188 of file Equal.h.

◆ equal_pointer

#define equal_pointer (   TYPE)
Value:
template <typename T> \
struct access<TYPE<T>> { \
static bool equal_(const TYPE<T>& first, const TYPE<T>& second) { return equal(first.get(), second.get()); } \
};

Definition at line 119 of file Equal.h.

◆ equal_sequence

#define equal_sequence (   TYPE)
Value:
template <typename T> \
struct access<TYPE<T>> { \
static bool equal_(const TYPE<T>& first, const TYPE<T>& second) { \
return first.size() == second.size() && \
std::equal(first.cbegin(), \
first.cend(), \
second.cbegin(), \
[](decltype(*first.cbegin()) a, decltype(*first.cbegin()) b) -> bool { return equal(a, b); }); \
} \
};

Definition at line 149 of file Equal.h.

◆ equal_unorderedmapping

#define equal_unorderedmapping (   TYPE)
Value:
template <typename T, typename U> \
struct access<TYPE<T, U>> { \
static bool equal_(const TYPE<T, U>& first, const TYPE<T, U>& second) { \
if (first.size() != second.size()) \
return false; \
\
auto first_it = first.cbegin(); \
while (first_it != first.cend()) { \
auto second_it = second.find(first_it->first); \
if (second_it == second.cend()) \
return false; \
if (not equal(first_it->second, second_it->second)) \
return false; \
first_it++; \
} \
return true; \
} \
};

Definition at line 203 of file Equal.h.

edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
dqmdumpme.first
first
Definition: dqmdumpme.py:55
b
double b
Definition: hdecay.h:118
a
double a
Definition: hdecay.h:119
cond::serialization::equal
bool equal(const T &first, const T &second)
Definition: Equal.h:32