mFrame
載入中...
搜尋中...
無符合項目
Memory.h
1
8#ifndef MFRAME_D6A75B59_D8E5_4FB2_BAB8_41477CE17D21
9#define MFRAME_D6A75B59_D8E5_4FB2_BAB8_41477CE17D21
10
11/* ***************************************************************************************
12 * Include
13 */
14
15//----------------------------------------------------------------------------------------
16#include "./../lang/Data.h"
17
18/* ***************************************************************************************
19 * Namespace
20 */
21namespace mframe::lang {
22 class Memory;
23 class String;
24} // namespace mframe::lang
25
26/* ***************************************************************************************
27 * Class/struct/Struct
28 */
30 /* *************************************************************************************
31 * Variable
32 */
33 private:
34 Memory* mNext;
35
36 /* *************************************************************************************
37 * Abstract Method
38 */
39
40 /* *************************************************************************************
41 * Construct Method
42 */
43 public:
49 Memory(const Data& data);
50
57 Memory(const void* pointer, int length);
58
65 Memory(void* pointer, int length);
66
73
79 Memory(const Memory& other);
80
85 virtual ~Memory(void) override;
86
87 /* *************************************************************************************
88 * Operator Method
89 */
90
91 /* *************************************************************************************
92 * Public Method
93 */
94 public:
101 inline bool isHeapMemory(void) const {
102 return (this->mNext != nullptr);
103 }
104
112 bool resize(int size);
113
114 /* *************************************************************************************
115 * Protected Method
116 */
117
118 /* *************************************************************************************
119 * Private Method
120 */
121
122 /* *************************************************************************************
123 * Static Variable
124 */
125
126 /* *************************************************************************************
127 * Static Method
128 */
129 public:
136};
137
138/* ***************************************************************************************
139 * End of file
140 */
141
142#endif /* MFRAME_D6A75B59_D8E5_4FB2_BAB8_41477CE17D21 */
Definition Data.h:30
int length(void) const
Definition Data.h:126
Definition Memory.h:29
Memory(const void *pointer, int length)
Construct a new Memory object.
Memory(int length)
Construct a new Memory object.
bool isHeapMemory(void) const
Definition Memory.h:101
Memory(void *pointer, int length)
Construct a new Memory object.
Memory(const Memory &other)
淺層克隆建構子
bool resize(int size)
Memory(const Data &data)
Construct a new Memory object.
virtual ~Memory(void) override
Destroy the Memory object.
static mframe::lang::Memory nullMemory(void)
E * pointer(void) const
模板方法,取得內部指標並轉換為指定型態(不指定偏移)
Definition Pointer.h:409
Definition Appendable.h:23