Jpp  15.0.1-rc.2-highQE
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Friends | List of all members
JLANG::JComparable< JFirst_t, JSecond_t > Struct Template Reference

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

#include <JComparable.hh>

Inheritance diagram for JLANG::JComparable< JFirst_t, JSecond_t >:
JACOUSTICS::JTransmission_t JDATABASE::JDBAPIVersion JDATABASE::JLocation_t JDATABASE::JRun_t JDATABASE::JRun_t JDATABASE::JRun_t JEEP::JDate<'/'> JDETECTOR::JDetectorParameters JDETECTOR::JLocation JDETECTOR::JPMTAddress JDETECTOR::JPMTPhysicalAddress JDETECTOR::JVersion JEEP::JDate< JSeparator_t > JEEP::JTime< JSeparator_t > JEEP::JVersion JFIT::JEnergy JMATH::JNumber< T > JPARSER::JCounter JPARSER::JCounter JSUPPORT::JLimit JSUPPORT::JLimit JTOOLS::JMultiKey< N, JKey_t > JTOOLS::JMultiKey< 1, JKey_t > JTOOLS::JMultiKey< 2, JKey_t > JTOOLS::JTuple< T > JTOOLS::JTuple< JTypeList< JHead_t, JTail_t > > JTOOLS::JTuple< JTypeList< JHead_t, JTypeList< JTail_t, JNullType > > > JTOOLS::JTuple< JHead_t > JTOOLS::JTuple< JTail_t >

Friends

bool operator< (const JFirst_t &first, typename JClass< JSecond_t >::argument_type second)
 Less than operator. More...
 
bool operator< (typename JClass< JSecond_t >::argument_type first, const JFirst_t &second)
 Less than operator. More...
 
bool operator> (const JFirst_t &first, typename JClass< JSecond_t >::argument_type second)
 Greater than operator. More...
 
bool operator> (typename JClass< JSecond_t >::argument_type first, const JFirst_t &second)
 Greater than operator. More...
 
bool operator<= (const JFirst_t &first, typename JClass< JSecond_t >::argument_type second)
 Less than or equal operator. More...
 
bool operator<= (typename JClass< JSecond_t >::argument_type first, const JFirst_t &second)
 Less than or equal operator. More...
 
bool operator>= (const JFirst_t &first, typename JClass< JSecond_t >::argument_type second)
 Greater than or equal operator. More...
 
bool operator>= (typename JClass< JSecond_t >::argument_type first, const JFirst_t &second)
 Greater than or equal operator. More...
 
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 = JNullType>
struct JLANG::JComparable< JFirst_t, JSecond_t >

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

Specialisation of class JComparable for two data types.

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

The first template parameter should have the corresponding member methods:

      bool less(const JSecond_t&) const;
      bool more(const JSecond_t&) const;

where JFirst_t andd JSecond_t refers 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 24 of file JComparable.hh.

Friends And Related Function Documentation

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

Less than operator.

Parameters
firstfirst object
secondsecond object
Returns
true if first object is less than second object; else false

Definition at line 147 of file JComparable.hh.

149  {
150  return first.less(second);
151  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
bool operator< ( typename JClass< JSecond_t >::argument_type  first,
const JFirst_t &  second 
)
friend

Less than operator.

Parameters
firstfirst object
secondsecond object
Returns
true if first object is less than second object; else false

Definition at line 161 of file JComparable.hh.

163  {
164  return second.more(first);
165  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
bool operator> ( const JFirst_t &  first,
typename JClass< JSecond_t >::argument_type  second 
)
friend

Greater than operator.

Parameters
firstfirst object
secondsecond object
Returns
true if first object is greater than second object; else false

Definition at line 175 of file JComparable.hh.

177  {
178  return first.more(second);
179  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
bool operator> ( typename JClass< JSecond_t >::argument_type  first,
const JFirst_t &  second 
)
friend

Greater than operator.

Parameters
firstfirst object
secondsecond object
Returns
true if first object is greater than second object; else false

Definition at line 189 of file JComparable.hh.

191  {
192  return second.less(first);
193  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
bool operator<= ( const JFirst_t &  first,
typename JClass< JSecond_t >::argument_type  second 
)
friend

Less than or equal operator.

Parameters
firstfirst object
secondsecond object
Returns
true if first object is less than or equal to second object; else false

Definition at line 203 of file JComparable.hh.

205  {
206  return !first.more(second);
207  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
bool operator<= ( typename JClass< JSecond_t >::argument_type  first,
const JFirst_t &  second 
)
friend

Less than or equal operator.

Parameters
firstfirst object
secondsecond object
Returns
true if first object is less than or equal to second object; else false

Definition at line 217 of file JComparable.hh.

219  {
220  return second.more(first);
221  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
bool operator>= ( const JFirst_t &  first,
typename JClass< JSecond_t >::argument_type  second 
)
friend

Greater than or equal operator.

Parameters
firstfirst object
secondsecond object
Returns
true if first object is greater than or equal to second object; else false

Definition at line 231 of file JComparable.hh.

233  {
234  return !first.less(second);
235  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
bool operator>= ( typename JClass< JSecond_t >::argument_type  first,
const JFirst_t &  second 
)
friend

Greater than or equal operator.

Parameters
firstfirst object
secondsecond object
Returns
true if first object is greater than or equal to second object; else false

Definition at line 245 of file JComparable.hh.

248  {
249  return second.less(first);
250  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
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 260 of file JComparable.hh.

262  {
263  return !first.less(second) && !first.more(second);
264  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
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 274 of file JComparable.hh.

277  {
278  return !second.less(first) && !second.more(first);
279  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
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 289 of file JComparable.hh.

291  {
292  return first.less(second) || first.more(second);
293  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
template<class JFirst_t, class JSecond_t = JNullType>
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 303 of file JComparable.hh.

305  {
306  return second.less(first) || second.more(first);
307  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first

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