mFrame
載入中...
搜尋中...
無符合項目
Byte.h
1
8
#ifndef MFRAME_F9B57639_6FC2_4ABB_B8EB_618F2228B096
9
#define MFRAME_F9B57639_6FC2_4ABB_B8EB_618F2228B096
10
11
/* ***************************************************************************************
12
* Include
13
*/
14
15
//----------------------------------------------------------------------------------------
16
17
//----------------------------------------------------------------------------------------
18
#include "./../numb/Number.h"
19
20
/* ***************************************************************************************
21
* Namespace
22
*/
23
namespace
mframe::numb
{
24
class
Byte;
25
}
// namespace mframe::numb
26
27
/* ***************************************************************************************
28
* Class Byte
29
*/
30
class
mframe::numb::Byte
final :
public
mframe::numb::Number
{
31
/* *************************************************************************************
32
* Variable
33
*/
34
35
/* *************************************************************************************
36
* Abstract Method
37
*/
38
39
/* *************************************************************************************
40
* Construct Method
41
*/
42
public
:
47
Byte
(
void
);
48
54
Byte
(
char
value);
55
60
virtual
~Byte
(
void
)
override
;
61
62
/* *************************************************************************************
63
* Operator Method
64
*/
65
public
:
70
inline
operator
char(
void
) {
71
return
this->vValue.s8[0];
72
}
73
81
bool
operator==
(
char
v) {
82
return
(this->vValue.s8[0] ==
static_cast<
char
>
(v));
83
}
84
92
bool
operator==
(
Byte
& v) {
93
return
(this->vValue.s8[0] == v.vValue.s8[0]);
94
}
95
102
char
operator=
(
char
v) {
103
this->vValue.s8[0] = v;
104
return
this->vValue.s8[0];
105
}
106
113
Byte
operator+=
(
int
v) {
114
this->vValue.s8[0] += v;
115
return
*
this
;
116
}
117
124
Byte
operator-=
(
int
v) {
125
this->vValue.s8[0] -= v;
126
return
*
this
;
127
}
128
135
Byte
operator*=
(
int
v) {
136
this->vValue.s8[0] *= v;
137
return
*
this
;
138
}
139
146
Byte
operator/=
(
int
v) {
147
this->vValue.s8[0] /= v;
148
return
*
this
;
149
}
150
156
Byte
operator++
(
int
) {
157
Byte
tmp = *
this
;
158
++this->vValue.s8[0];
159
return
tmp;
160
}
161
167
Byte
operator++
() {
168
++this->vValue.s8[0];
169
return
*
this
;
170
}
171
177
Byte
operator--
(
int
) {
178
Byte
tmp = *
this
;
179
--this->vValue.s8[0];
180
return
tmp;
181
}
182
188
Byte
&
operator--
(
void
) {
189
--this->vValue.s8[0];
190
return
*
this
;
191
}
192
193
/* *************************************************************************************
194
* Public Method <Override>
195
*/
196
197
/* *************************************************************************************
198
* Public Method
199
*/
200
201
/* *************************************************************************************
202
* Protected Method
203
*/
204
205
/* *************************************************************************************
206
* Private Method
207
*/
208
209
/* *************************************************************************************
210
* Static Variable
211
*/
212
213
/* *************************************************************************************
214
* Static Method
215
*/
216
};
217
218
/* ***************************************************************************************
219
* End of file
220
*/
221
222
#endif
/* MFRAME_F9B57639_6FC2_4ABB_B8EB_618F2228B096 */
mframe::numb::Byte
Definition
Byte.h:30
mframe::numb::Byte::operator/=
Byte operator/=(int v)
Definition
Byte.h:146
mframe::numb::Byte::operator==
bool operator==(char v)
Definition
Byte.h:81
mframe::numb::Byte::~Byte
virtual ~Byte(void) override
Destroy the Byte object.
mframe::numb::Byte::operator+=
Byte operator+=(int v)
Definition
Byte.h:113
mframe::numb::Byte::operator++
Byte operator++()
Definition
Byte.h:167
mframe::numb::Byte::operator=
char operator=(char v)
Definition
Byte.h:102
mframe::numb::Byte::operator--
Byte & operator--(void)
Definition
Byte.h:188
mframe::numb::Byte::operator--
Byte operator--(int)
Definition
Byte.h:177
mframe::numb::Byte::operator++
Byte operator++(int)
Definition
Byte.h:156
mframe::numb::Byte::Byte
Byte(void)
Construct a new Byte object.
mframe::numb::Byte::operator==
bool operator==(Byte &v)
Definition
Byte.h:92
mframe::numb::Byte::Byte
Byte(char value)
Construct a new Byte object.
mframe::numb::Byte::operator-=
Byte operator-=(int v)
Definition
Byte.h:124
mframe::numb::Byte::operator*=
Byte operator*=(int v)
Definition
Byte.h:135
mframe::numb::Number
Definition
Number.h:30
mframe::numb
Definition
Boolean.h:23
C:
Workspaces
mframe-doxygen
souurce
base
mframe
src
numb
Byte.h
產生者:
1.11.0