nByte.hpp
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace by {
7
12 class _nout nByte: public primitiveObj<nuchar> {
16 class _nout nByteType: 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
26 BY(CLASS(nByte, primitiveObj, nByteType), VISIT())
27
28 public:
29 nByte() = default;
30 nByte(nuchar val);
31
32 public:
33 tstr<arithmeticObj> bitwiseNot() const override;
34
35 const baseObj& getOrigin() const override;
36
37 protected:
38 tstr<arithmeticObj> _add(const arithmeticObj& rhs, nbool reversed) const override;
39 tstr<arithmeticObj> _sub(const arithmeticObj& rhs, nbool reversed) const override;
40 tstr<arithmeticObj> _mul(const arithmeticObj& rhs, nbool reversed) const override;
41 tstr<arithmeticObj> _div(const arithmeticObj& rhs, nbool reversed) const override;
42 tstr<arithmeticObj> _mod(const arithmeticObj& rhs, nbool reversed) const override;
43 tstr<arithmeticObj> _bitwiseAnd(const arithmeticObj& rhs, nbool reversed) const override;
44 tstr<arithmeticObj> _bitwiseOr(const arithmeticObj& rhs, nbool reversed) const override;
45 tstr<arithmeticObj> _bitwiseXor(const arithmeticObj& rhs, nbool reversed) const override;
46 tstr<arithmeticObj> _lshift(const arithmeticObj& rhs, nbool reversed) const override;
47 tstr<arithmeticObj> _rshift(const arithmeticObj& rhs, nbool reversed) const override;
48
49 nbool _eq(const arithmeticObj& rhs) const override;
50 nbool _ne(const arithmeticObj& rhs) const override;
51 nbool _gt(const arithmeticObj& rhs) const override;
52 nbool _lt(const arithmeticObj& rhs) const override;
53 nbool _ge(const arithmeticObj& rhs) const override;
54 nbool _le(const arithmeticObj& rhs) const override;
55 nbool _logicalAnd(const arithmeticObj& rhs) const override;
56 nbool _logicalOr(const arithmeticObj& rhs) const override;
57
58 arithmeticObj& _mov(const arithmeticObj& rhs) override;
59 };
60} // 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
Byte primitive type in byeol language.
Definition: nByte.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