Jpp  19.1.0
the software that should make you happy
Friends | List of all members
JLANG::JEquals< JFirst_t, JSecond_t > Struct Template Reference

Template definition of auxiliary base class for comparison of data structures. More...

#include <JEquals.hh>

Inheritance diagram for JLANG::JEquals< JFirst_t, JSecond_t >:
JSUPPORT::JTreeScannerInterface< JClass_t, JNullType >::basic_iterator< iterator > JSUPPORT::JTreeScannerInterface< JClass_t, JNullType >::basic_iterator< reverse_iterator > JTOOLS::JArray< NUMBER_OF_DIMENSIONS, abscissa_type > JTOOLS::JArray< NUMBER_OF_DIMENSIONS, argument_type > JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >::iterator_helper< reverse_iterator, ordinate_type & > JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >::iterator_helper< const_reverse_iterator, const ordinate_type & > JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >::iterator_helper< const_iterator, const ordinate_type & > JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >::iterator_helper< iterator, ordinate_type & > JTOOLS::JRange< double > JTOOLS::JRange< abscissa_type > JTOOLS::JRange< int > JTOOLS::JRange< JDAQHit::JTOT_t > JTOOLS::JRange< counter_type > JTOOLS::JRange< JAbscissa_t > JAANET::JPowerLawFlux JACOUSTICS::JMODEL::JEmission JACOUSTICS::JMODEL::JString JACOUSTICS::JModel JDATABASE::JMACAddress JDETECTOR::JCompass JDETECTOR::JDetectorHeader JDETECTOR::JModuleAddress JEEP::JStatus JGEOMETRY3D::JQuaternion3D JMATH::JGauss_t JMATH::JMatrix1D JMATH::JMatrix2D JMATH::JMatrix3D JMATH::JMatrix4D JMATH::JMatrix5D JMATH::JMatrixND JMATH::JPolynome_t JROOT::JROOTClassSelector JROOT::JRootClass JSUPPORT::JTreeScanner< JAssertConversion< JDerived_t, JBase_t >, JNullType > JSUPPORT::JTreeScannerInterface< JClass_t, JNullType >::basic_iterator< T > JTOOLS::JArray< N, T > JTOOLS::JArray< 1, T > JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_const_iterator JTOOLS::JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >::super_iterator JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_const_iterator JTOOLS::JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >::super_iterator JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >::iterator_helper< iterator_type, ordinate_type > JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >::super_const_iterator JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >::super_const_reverse_iterator JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JTail_t >, JDistance_t >::iterator_base< first_iterator, second_iterator > JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JTail_t >, JDistance_t >::super_const_iterator JTOOLS::JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JTail_t >, JDistance_t >::super_const_reverse_iterator JTOOLS::JRange< T, JComparator_t > JUTM::JUTMGrid

Friends

bool operator== (const JFirst_t &first, typename JClass< JSecond_t >::argument_type second)
 Equal operator. More...
 
bool operator== (typename JClass< JSecond_t >::argument_type first, const JFirst_t &second)
 Equal operator. More...
 
bool operator!= (const JFirst_t &first, typename JClass< JSecond_t >::argument_type second)
 Not equal operator. More...
 
bool operator!= (typename JClass< JSecond_t >::argument_type first, const JFirst_t &second)
 Not equal operator. More...
 

Detailed Description

template<class JFirst_t, class JSecond_t>
struct JLANG::JEquals< JFirst_t, JSecond_t >

Template definition of auxiliary base class for comparison of data structures.

Specialisation of class JEquals for two data types.

The various specialisations of this class implement the operators == != .

The first template parameter should have the corresponding member methods:

      bool equals(const JFirst_t&) const;
      bool equals(const JSecond_t&) const;

where JFirst_t and JSecond_t refer to the first and second template parameter, respectively. The second template parameter may be a primitive data type. This class uses in-class friend operators (see Barton-Nackman trick).

Definition at line 82 of file JEquals.hh.

Friends And Related Function Documentation

◆ operator== [1/2]

template<class JFirst_t , class JSecond_t >
bool operator== ( const JFirst_t &  first,
typename JClass< JSecond_t >::argument_type  second 
)
friend

Equal operator.

Parameters
firstfirst object
secondsecond object
Returns
true if two objects are equal; else false

Definition at line 92 of file JEquals.hh.

94  {
95  return first.equals(second);
96  }

◆ operator== [2/2]

template<class JFirst_t , class JSecond_t >
bool operator== ( typename JClass< JSecond_t >::argument_type  first,
const JFirst_t &  second 
)
friend

Equal operator.

Parameters
firstfirst object
secondsecond object
Returns
true if two objects are equal; else false

Definition at line 106 of file JEquals.hh.

108  {
109  return second.equals(first);
110  }

◆ operator!= [1/2]

template<class JFirst_t , class JSecond_t >
bool operator!= ( const JFirst_t &  first,
typename JClass< JSecond_t >::argument_type  second 
)
friend

Not equal operator.

Parameters
firstfirst object
secondsecond object
Returns
true if two objects are not equal; else false

Definition at line 120 of file JEquals.hh.

122  {
123  return !first.equals(second);
124  }

◆ operator!= [2/2]

template<class JFirst_t , class JSecond_t >
bool operator!= ( typename JClass< JSecond_t >::argument_type  first,
const JFirst_t &  second 
)
friend

Not equal operator.

Parameters
firstfirst object
secondsecond object
Returns
true if two objects are not equal; else false

Definition at line 134 of file JEquals.hh.

136  {
137  return !second.equals(first);
138  }

The documentation for this struct was generated from the following file: