Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JMultiEquals< JClass_t, JType_t > Struct Template Reference

Template definition of auxiliary base class for data structures composed of multiple base classes with equality evaluations capabilities. More...

#include <JMultiEquals.hh>

Inheritance diagram for JLANG::JMultiEquals< JClass_t, JType_t >:
JDETECTOR::JDetector JDETECTOR::JPMT JDETECTOR::JTransmitter JSUPPORT::JMultipleFileScanner< JNullType > JSUPPORT::JSingleFileScanner< JNullType > JDETECTOR::JMonteCarloDetector JDYNAMICS::JDynamics

Friends

bool operator== (const JClass_t &first, const JClass_t &second)
 Equal operator.
 
bool operator!= (const JClass_t &first, const JClass_t &second)
 Not equal operator.
 

Detailed Description

template<class JClass_t, class JType_t>
struct JLANG::JMultiEquals< JClass_t, JType_t >

Template definition of auxiliary base class for data structures composed of multiple base classes with equality evaluations capabilities.

The data type JType_t should have the corresponding operator:

      bool operator==(const JType_t& first, const JType_t& second);

This class uses in-class friend operators (see Barton-Nackman trick).

This class implements the operators == != .

Definition at line 32 of file JMultiEquals.hh.

Friends And Related Symbol Documentation

◆ operator==

template<class JClass_t , class JType_t >
bool operator== ( const JClass_t & first,
const JClass_t & second )
friend

Equal operator.

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

Definition at line 40 of file JMultiEquals.hh.

42 {
43 return static_cast<const JType_t&>(first) == static_cast<const JType_t&>(second);
44 }

◆ operator!=

template<class JClass_t , class JType_t >
bool operator!= ( const JClass_t & first,
const JClass_t & second )
friend

Not equal operator.

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

Definition at line 54 of file JMultiEquals.hh.

56 {
57 return static_cast<const JType_t&>(first) != static_cast<const JType_t&>(second);
58 }

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