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