Rudiments
comparator.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef RUDIMENTS_COMPARATOR_H
5#define RUDIMENTS_COMPARATOR_H
6
7#include <rudiments/private/inttypes.h>
8
12 public:
14 comparator();
15
17 virtual ~comparator();
18
20 void setReverse(bool reverse);
21
24 bool getReverse();
25
29 void setNatural(bool natural);
30
34 bool getNatural();
35
40 void setNumberDelimiters(const char *delimiters);
41
44 const char *getNumberDelimiters();
45
50 void setWideNumberDelimiters(const wchar_t *delimiters);
51
55 const wchar_t *getWideNumberDelimiters();
56
60 virtual int32_t compare(char *value1, char *value2);
61
65 virtual int32_t compare(const char *value1,
66 const char *value2);
67
71 virtual int32_t compare(wchar_t *value1, wchar_t *value2);
72
76 virtual int32_t compare(const wchar_t *value1,
77 const wchar_t *value2);
78
82 virtual int32_t compare(byte_t *value1, byte_t *value2);
83
87 virtual int32_t compare(const byte_t *value1,
88 const byte_t *value2);
89
93 virtual int32_t compare(char value1, char value2);
94
98 virtual int32_t compare(bool value1, bool value2);
99
103 virtual int32_t compare(int16_t value1, int16_t value2);
104
108 virtual int32_t compare(int32_t value1, int32_t value2);
109
113 virtual int32_t compare(int64_t value1, int64_t value2);
114
118 virtual int32_t compare(byte_t value1, byte_t value2);
119
123 virtual int32_t compare(uint16_t value1, uint16_t value2);
124
128 virtual int32_t compare(uint32_t value1, uint32_t value2);
129
133 virtual int32_t compare(uint64_t value1, uint64_t value2);
134
138 virtual int32_t compare(float value1, float value2);
139
143 virtual int32_t compare(double value1, double value2);
144
148 virtual int32_t compare(long double value1,
149 long double value2);
150
154 virtual int32_t compare(void *value1, void *value2);
155
159 virtual int32_t compare(object *value1, object *value2);
160
161 #include <rudiments/private/comparator.h>
162};
163
164#include <rudiments/private/comparatorinlines.h>
165
166#endif
Definition comparator.h:11
void setNumberDelimiters(const char *delimiters)
Definition comparatorinlines.h:41
void setReverse(bool reverse)
Definition comparatorinlines.h:21
const char * getNumberDelimiters()
Definition comparatorinlines.h:46
bool getNatural()
Definition comparatorinlines.h:36
const wchar_t * getWideNumberDelimiters()
Definition comparatorinlines.h:56
void setWideNumberDelimiters(const wchar_t *delimiters)
Definition comparatorinlines.h:51
comparator()
Definition comparatorinlines.h:9
bool getReverse()
Definition comparatorinlines.h:26
virtual ~comparator()
Definition comparatorinlines.h:17
virtual int32_t compare(char *value1, char *value2)
Definition comparatorinlines.h:61
void setNatural(bool natural)
Definition comparatorinlines.h:31