ECSTASY
All in the name
Loading...
Searching...
No Matches
ecstasy::SystemInstances::Comparer Class Reference

Public Types

using is_transparent = std::true_type
 

Public Member Functions

 Comparer ()=default
 Construct a new Comparer object.
 
bool operator() (const key_type &a, const std::type_index &b) const
 Compare a key with a type index.
 
bool operator() (const std::type_index &a, const key_type &b) const
 Compare a type index with a key.
 
bool operator() (const key_type &a, const key_type &b) const
 Compare two keys.
 

Detailed Description

Definition at line 44 of file SystemInstances.hpp.

Member Typedef Documentation

◆ is_transparent

Constructor & Destructor Documentation

◆ Comparer()

ecstasy::SystemInstances::Comparer::Comparer ( )
default

Construct a new Comparer object.

Author
Andréas Leroux
Since
1.0.0 (2024-10-17)

Member Function Documentation

◆ operator()() [1/3]

bool ecstasy::SystemInstances::Comparer::operator() ( const key_type a,
const key_type b 
) const
inline

Compare two keys.

Parameters
aLeft operand.
bRight operand.
Returns
Whether a is less than b.
Author
Andréas Leroux
Since
1.0.0 (2024-10-17)

Definition at line 99 of file SystemInstances.hpp.

100 {
101 if (a.second == b.second)
102 return a.first < b.first;
103 else
104 return a.second < b.second;
105 }

◆ operator()() [2/3]

bool ecstasy::SystemInstances::Comparer::operator() ( const key_type a,
const std::type_index b 
) const
inline

Compare a key with a type index.

Parameters
aLeft operand.
bRight operand.
Returns
Whether a is less than b.
Author
Andréas Leroux
Since
1.0.0 (2024-10-17)

Definition at line 67 of file SystemInstances.hpp.

68 {
69 return a.first < b;
70 }

◆ operator()() [3/3]

bool ecstasy::SystemInstances::Comparer::operator() ( const std::type_index a,
const key_type b 
) const
inline

Compare a type index with a key.

Parameters
aLeft operand.
bRight operand.
Returns
Whether a is less than b.
Author
Andréas Leroux
Since
1.0.0 (2024-10-17)

Definition at line 83 of file SystemInstances.hpp.

84 {
85 return a < b.first;
86 }

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