nInt.hpp
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace by {
7
12 class _nout nInt: public primitiveObj<nint> {
16 class _nout wIntType: public ntype {
17 public:
18 nbool isImmutable() const override;
19 const std::string& getName() const override;
20
21 protected:
22 const impliAses& _getImpliAses() const override;
23 const ases& _getAses() const override;
24 };
25 BY(CLASS(nInt, primitiveObj, wIntType), VISIT())
26
27 public:
28 nInt();
29 nInt(nint val);
30
31 public:
32 tstr<arithmeticObj> bitwiseNot() const override;
33
34 const baseObj& getOrigin() const override;
35
36 protected:
37 tstr<arithmeticObj> _add(const arithmeticObj& rhs, nbool reversed) const override;
38 tstr<arithmeticObj> _sub(const arithmeticObj& rhs, nbool reversed) const override;
39 tstr<arithmeticObj> _mul(const arithmeticObj& rhs, nbool reversed) const override;
40 tstr<arithmeticObj> _div(const arithmeticObj& rhs, nbool reversed) const override;
41 tstr<arithmeticObj> _mod(const arithmeticObj& rhs, nbool reversed) const override;
42 tstr<arithmeticObj> _bitwiseAnd(const arithmeticObj& rhs, nbool reversed) const override;
43 tstr<arithmeticObj> _bitwiseOr(const arithmeticObj& rhs, nbool reversed) const override;
44 tstr<arithmeticObj> _bitwiseXor(const arithmeticObj& rhs, nbool reversed) const override;
45 tstr<arithmeticObj> _lshift(const arithmeticObj& rhs, nbool reversed) const override;
46 tstr<arithmeticObj> _rshift(const arithmeticObj& rhs, nbool reversed) const override;
47
48 nbool _eq(const arithmeticObj& rhs) const override;
49 nbool _ne(const arithmeticObj& rhs) const override;
50 nbool _gt(const arithmeticObj& rhs) const override;
51 nbool _lt(const arithmeticObj& rhs) const override;
52 nbool _ge(const arithmeticObj& rhs) const override;
53 nbool _le(const arithmeticObj& rhs) const override;
54 nbool _logicalAnd(const arithmeticObj& rhs) const override;
55 nbool _logicalOr(const arithmeticObj& rhs) const override;
56
57 arithmeticObj& _mov(const arithmeticObj& rhs) override;
58 };
59} // namespace by
Base class for arithmetic operations on primitive types.
Definition: arithmeticObj.hpp:13
Collection of type converters.
Definition: ases.hpp:12
Base class for all objects in byeol language.
Definition: baseObj.hpp:24
Implicit type conversion collection.
Definition: impliAses.hpp:11
Integer primitive type in byeol language.
Definition: nInt.hpp:12
Native type system for byeol language.
Definition: ntype.hpp:19
Definition: primitiveObj.hpp:13
Strong reference smart pointer with strict type checking.
Definition: tstr.hpp:13