xtd 0.2.0
comparer.hpp
Go to the documentation of this file.
1
4#pragma once
6#include "icomparer.hpp"
7//#include "../../comparison.hpp"
8#include "../../object.hpp"
9#include "../../ptr.hpp"
10
12namespace xtd {
14 namespace collections {
16 namespace generic {
32 template<class type_t>
33 class comparer : public object, public icomparer<type_t> {
34 public:
36
39 using first_argument_type = type_t;
41 using second_argument_type = type_t;
45
47
52
54
66 result_type compare(const first_argument_type& x, const second_argument_type& y) const noexcept override {return helpers::comparer<type_t> {} (x, y);}
67
68 //static ptr<comparer<type_t>> create (xtd::comparison<type_t> comparison) {
69 // return {};
70 //}
72
73 protected:
75
78 comparer() = default;
80 };
81
83 template<class type_t>
86 }
87 }
88}
Provides a base class for implementations of the xtd::collections::generic::icomparer <type_t> generi...
Definition comparer.hpp:33
comparer()=default
Initializes a new instance of the xtd::collections::generic::comparer <type_t> class.
result_type compare(const first_argument_type &x, const second_argument_type &y) const noexcept override
Compares two entities and returns a value indicating whether one is less than, equal to,...
Definition comparer.hpp:66
xtd::any_object first_argument_type
Definition comparer.hpp:39
static const comparer< xtd::any_object > default_comparer
Definition comparer.hpp:50
xtd::any_object second_argument_type
Definition comparer.hpp:41
Exposes a method that compares two objects.
Definition icomparer.hpp:30
object()=default
Create a new instance of the ultimate base class object.
Contains xtd::collections::generic::helpers::comparer struct.
Contains xtd::collections::generic::icomparer <type_t> interface.
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ y
The Y key.
Definition console_key.hpp:136
@ x
The X key.
Definition console_key.hpp:134
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.
Contains xtd::ptr type.
Implements a function object for compare data.
Definition comparer.hpp:31