CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::Comparisons< Derived > Struct Template Reference

#include <Comparisons.hh>

Detailed Description

template<typename Derived>
struct CASM::Comparisons< Derived >

Implements other comparisons in terms of '<'.

If

Derived::operator<(const Derived& B) const

is implemented, then Comparisons<Derived> implements:

  • '>', '<=', '>=', '==', '!='
  • '==' and '!=' can be specialized in Derived by implementing private methods '_eq' and '_ne'

The Derived class definition needs to include:

friend Comparisons<Derived>;

Definition at line 23 of file Comparisons.hh.

Public Member Functions

bool operator> (const Derived &B) const
 
bool operator<= (const Derived &B) const
 
bool operator>= (const Derived &B) const
 
bool operator== (const Derived &B) const
 
bool operator!= (const Derived &B) const
 

Protected Member Functions

const Derived & derived () const
 
bool _eq (const Derived &B) const
 
bool _ne (const Derived &B) const
 

Member Function Documentation

template<typename Derived>
bool CASM::Comparisons< Derived >::_eq ( const Derived &  B) const
inlineprotected

Definition at line 52 of file Comparisons.hh.

template<typename Derived>
bool CASM::Comparisons< Derived >::_ne ( const Derived &  B) const
inlineprotected

Definition at line 56 of file Comparisons.hh.

template<typename Derived>
const Derived& CASM::Comparisons< Derived >::derived ( ) const
inlineprotected

Definition at line 48 of file Comparisons.hh.

template<typename Derived>
bool CASM::Comparisons< Derived >::operator!= ( const Derived &  B) const
inline

Definition at line 41 of file Comparisons.hh.

template<typename Derived>
bool CASM::Comparisons< Derived >::operator<= ( const Derived &  B) const
inline

Definition at line 29 of file Comparisons.hh.

template<typename Derived>
bool CASM::Comparisons< Derived >::operator== ( const Derived &  B) const
inline

Definition at line 37 of file Comparisons.hh.

template<typename Derived>
bool CASM::Comparisons< Derived >::operator> ( const Derived &  B) const
inline

Definition at line 25 of file Comparisons.hh.

template<typename Derived>
bool CASM::Comparisons< Derived >::operator>= ( const Derived &  B) const
inline

Definition at line 33 of file Comparisons.hh.


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