OpenLexocad  27.1
Int.h
Go to the documentation of this file.
1 #pragma once
2 #pragma warning(disable : 4251)
3 
4 
5 namespace Base
6 {
7 struct LX_BASE_EXPORT Int
8 {
10  // //
11  // --------------------- BEGIN API --------------------- //
12  // //
13  // ATTENTION: DO NOT CHANGE ANY SIGNATURES IN THE API ! //
14  // //
16 
17  int value;
18 
19  // Semi-regular
20  explicit Int(int x) : value(x) {}
21  explicit Int(const Int& x) : value(x.value) {}
22  Int() {}
23  ~Int() {}
24  Int& operator=(const Int& x)
25  {
26  value = x.value;
27  return *this;
28  }
29 
30  // Regular
31  friend bool operator==(const Int& x, const Int& y) { return x.value == y.value; }
32 
33  friend bool operator!=(const Int& x, const Int& y) { return !(x == y); }
34 
35  // TotallyOrdered
36  friend bool operator<(const Int& x, const Int& y) { return x < y; }
37 
38  friend bool operator>(const Int& x, const Int& y) { return y < x; }
39 
40  friend bool operator<=(const Int& x, const Int& y) { return !(y < x); }
41 
42  friend bool operator>=(const Int& x, const Int& y) { return !(x < y); }
43 
44 
46  // //
47  // ---------------------- END API ---------------------- //
48  // //
50 };
51 } // namespace Base
friend bool operator>(const Int &x, const Int &y)
Definition: Int.h:38
friend bool operator<(const Int &x, const Int &y)
Definition: Int.h:36
~Int()
Definition: Int.h:23
Int()
Definition: Int.h:22
friend bool operator<=(const Int &x, const Int &y)
Definition: Int.h:40
Int(const Int &x)
Definition: Int.h:21
Int & operator=(const Int &x)
Definition: Int.h:24
int value
Definition: Int.h:17
Int(int x)
Definition: Int.h:20
friend bool operator!=(const Int &x, const Int &y)
Definition: Int.h:33
Definition: AbstractXMLReader.h:5
friend bool operator>=(const Int &x, const Int &y)
Definition: Int.h:42
friend bool operator==(const Int &x, const Int &y)
Definition: Int.h:31
Definition: Int.h:7