FAST.Framework  1.0.0
FInt.h
1 /******************************************************************************
2 **
3 ** FAST.Framework
4 **
5 ** Created: 2023-10-11
6 ** Author: Boris Fast
7 ** Mail: support@fast-framework.com
8 **
9 ******************************************************************************/
10 
11 #ifndef FINT_H
12 #define FINT_H
13 
14 using namespace std;
15 
16 #include "FObject.h"
17 
21 class FInt : public FObject
22 {
23  public:
24  FInt(const FInt& value);
25  FInt(const int& value);
26  FInt() : buffer(0) { }
27  virtual ~FInt() = default;
28 
29  inline void operator =(const FInt& value)
30  {
31  this->buffer = value.buffer;
32  }
33  inline void operator =(const int& value)
34  {
35  this->buffer = value;
36  }
37  inline Boolean CompareTo(const FInt& value) const
38  {
39  return this->buffer == value.buffer;
40  }
41  inline Boolean CompareTo(const int& value) const
42  {
43  return this->buffer == value;
44  }
45 
46  inline int Data() const { return this->buffer; }
47 
48  static constexpr int MinValue = INT_MIN;
49  static constexpr int MaxValue = INT_MAX;
50  static constexpr UInt MaxUValue = UINT_MAX;
51 
52  const type_info& GetType() override;
53  FString GetName() const override;
54 
55  private:
56  int buffer;
57 };
58 
59 #endif // FINT_H
Definition: FInt.h:22
Boolean CompareTo(const FInt &value) const
< Returns TRUE if obejct is equels to value, otherwise FALSE
Definition: FInt.h:37
int Data() const
Returns value of fint object.
Definition: FInt.h:46
Boolean CompareTo(const int &value) const
< Returns TRUE if obect is equels to value, otherwise FALSE
Definition: FInt.h:41
virtual ~FInt()=default
Destroy fint object.
FInt()
Constructor of fint object.
Definition: FInt.h:26
Definition: FObject.h:50
Definition: FString.h:22