FAST.Framework  1.0.0
FLong.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 FLONG_H
12 #define FLONG_H
13 
14 using namespace std;
15 
16 #include "FObject.h"
17 
21 class FLong : public FObject
22 {
23  public:
24  FLong(const FLong& value);
25  FLong(const long& value);
26  FLong() : buffer(0) { }
27  virtual ~FLong() = default;
28 
29  inline void operator =(const FLong& value)
30  {
31  this->buffer = value.buffer;
32  }
33  inline void operator =(const long& value)
34  {
35  this->buffer = value;
36  }
37  inline Boolean CompareTo(const FLong& value) const
38  {
39  return this->buffer == value.buffer;
40  }
41  inline Boolean CompareTo(const long& value) const
42  {
43  return this->buffer == value;
44  }
45 
46  inline long Data() const { return this->buffer; }
47 
48  static constexpr long MinValue = LONG_MIN;
49  static constexpr long MaxValue = LONG_MAX;
50  static constexpr ULong MaxUValue = ULONG_MAX;
51 
52  const type_info& GetType() override;
53  FString GetName() const override;
54 
55  private:
56  long buffer;
57 };
58 
59 #endif // FLONG_H
Definition: FLong.h:22
virtual ~FLong()=default
Destroy flong object.
FLong()
Constructor of flong object.
Definition: FLong.h:26
long Data() const
Returns value of flong object.
Definition: FLong.h:46
Boolean CompareTo(const FLong &value) const
< Returns TRUE if obejct is equels to value, otherwise FALSE
Definition: FLong.h:37
Boolean CompareTo(const long &value) const
< Returns TRUE if obect is equels to value, otherwise FALSE
Definition: FLong.h:41
Definition: FObject.h:50
Definition: FString.h:22