mFrame
|
公開方法(Public Methods) | |
ByteBuffer (const mframe::lang::Memory &memory) | |
Construct a new Byte Buffer object. | |
ByteBuffer (int length) | |
Construct a new Byte Buffer object. | |
virtual | ~ByteBuffer (void) override |
Destroy the Byte Buffer object. | |
ByteBuffer & | operator<< (char c) |
ByteBuffer & | operator<< (short s) |
ByteBuffer & | operator<< (int v) |
ByteBuffer & | operator<< (const char *string) |
ByteBuffer & | operator<< (mframe::lang::Strings &string) |
int | operator= (int v) |
void | operator+= (int shift) |
void | operator-= (int shift) |
uint32 | operator++ (void) |
uint32 | operator-- (void) |
uint32 | operator++ (int) |
uint32 | operator-- (int) |
virtual void | flush (void) override |
virtual mframe::lang::Readable & | getReadable (void) override |
virtual mframe::lang::Appendable & | getAppendable (void) override |
virtual int | avariable (void) const override |
取得輸出緩存內剩餘多少位元組 | |
virtual int | pollByte (char &result) override |
檢索一個字節,並由此緩衝區刪除 | |
virtual int | poll (mframe::lang::Appendable &appendable) override |
檢索至Appendable指定數量字節,並由此緩衝區刪除 | |
virtual int | poll (void *pointer, int length) override |
檢索至pointer指定數量字節,並由此緩衝區刪除 | |
virtual int | skip (int length) override |
跳躍指定的字結數量,並由此緩衝區刪除。 | |
virtual void | lock (bool enable) override |
鎖定緩存,取出不移除。 | |
virtual int | remaining (void) const override |
取得緩衝區剩餘空閒字節數。 | |
virtual int | putByte (const char result) override |
將字節輸入至緩衝區。 | |
virtual int | put (mframe::lang::Readable &readBuffer) override |
將readable內資料輸入至緩衝區。 | |
virtual int | put (const void *buffer, int bufferSize) override |
將指針內資料輸入至緩衝區。 | |
int | limit (void) const |
int | capacity (void) const |
int | position (void) const |
ByteBuffer & | reset (void) |
ByteBuffer & | mark (void) |
ByteBuffer & | rewind (void) |
bool | pollByte (uint8 &result) |
Get the Byte object. | |
bool | pollShort (uint16 &result) |
Get the Short object. | |
bool | pollInt (uint32 &result) |
Get the Int object. | |
mframe::lang::Memory & | memory (void) |
bool | limit (int newLimit) |
bool | position (int newPosition) |
void | flip (void) |
void | move (int position) |
bool | put (const char *string) |
bool | put (const mframe::lang::Strings &string) |
int | putFormat (const char *format,...) |
int | putFormat (const char *format, va_list args) |
bool | putShort (const short value) |
bool | putInt (const int value) |
bool | putFloat (const float value) |
bool | pollShort (short &result) |
Get the Short object. | |
bool | pollInt (int &result) |
Get the Int object. | |
bool | pollFloat (float &result) |
Get the Float object. | |
![]() | |
Object (void) | |
Construct a new Object object. | |
virtual | ~Object (void) override |
Destroy the Object object. | |
void * | operator new (size_t n) |
void * | operator new (size_t n, void *p) |
mframe::lang::Object & | getObject (void) override |
取得類Object | |
void | delay (int milliseconds) const |
函數 delay 等待內核滴答中指定的時間段。 對於1的值,系統等待直到下一個計時器滴答發生。 實際時間延遲最多可能比指定時間少一個計時器滴答聲,即在下一個系統滴答聲發生之前立即調用 osDelay(1),線程會立即重新安排。 | |
bool | equals (Object *object) const |
函數 delay 等待內核滴答中指定的時間段。 對於1的值,系統等待直到下一個計時器滴答發生。 實際時間延遲最多可能比指定時間少一個計時器滴答聲,即在下一個系統滴答聲發生之前立即調用 osDelay(1),線程會立即重新安排。 | |
bool | equals (Object &object) const |
函數 delay 等待內核滴答中指定的時間段。 對於1的值,系統等待直到下一個計時器滴答發生。 實際時間延遲最多可能比指定時間少一個計時器滴答聲,即在下一個系統滴答聲發生之前立即調用 osDelay(1),線程會立即重新安排。 | |
void | wait (void) const |
導致當前線程等待,直到另一個線程調用此對象的notify()方法或notifyAll()方法,或指定的時間 已過。 | |
bool | wait (int timeout) const |
導致當前線程等待,直到另一個線程調用此對象的 notify()方法或 notifyAll()方法,或其他一些線 程中斷當前線程,或一定量的實時時間。 | |
bool | yield (void) const |
函數yield()將控制權傳遞給處於READY狀態且具有相同優先級的下一個線程。 如果在READY狀態下沒有其他優先級相同的線程,則當前線程繼續執行,不會發生線程切換。 | |
int | lock (void) const |
核心鎖定,在調用unlock以前將不會進行執行緒切換 | |
int | unlock (void) const |
核心解鎖。 | |
mframe::sys::Thread * | currentThread (void) const |
取得當前的執行緒 | |
virtual int | hashcode (void) const |
返回對象的哈希碼值。支持這種方法是為了散列表,如HashMap提供的那樣。 | |
![]() | |
virtual | ~Interface (void)=default |
Destroy the struct object. | |
![]() | |
int | put (mframe::lang::Readable &&Readable) |
將Readable內資料輸入至緩衝區。 | |
bool | isFull (void) const |
取得Appendable是否已滿。 | |
![]() | |
bool | isEmpty (void) const |
輸出緩存是否為空? | |
int | poll (mframe::lang::Appendable &&appendable) |
檢索至Appendable,並由此緩衝區刪除 | |
保護屬性 | |
mframe::lang::Memory | vMemory |
int | vPosition |
int | vMark |
int | vLimit |
bool | vUnlock |
mframe::io::ByteBuffer::ByteBuffer | ( | const mframe::lang::Memory & | memory | ) |
Construct a new Byte Buffer object.
memory |
mframe::io::ByteBuffer::ByteBuffer | ( | int | length | ) |
Construct a new Byte Buffer object.
length |
|
inlineoverridevirtual |
|
inline |
|
overridevirtual |
Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush
is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.
If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
The flush
method of OutputStream
does nothing.
IOException | if an I/O error occurs. |
|
overridevirtual |
|
overridevirtual |
bool mframe::io::ByteBuffer::limit | ( | int | newLimit | ) |
newLimit |
|
inline |
|
overridevirtual |
|
inline |
|
inline |
void mframe::io::ByteBuffer::move | ( | int | position | ) |
position |
|
inline |
|
inline |
|
inline |
shift |
|
inline |
|
inline |
|
inline |
shift |
|
inline |
c |
|
inline |
string |
|
inline |
v |
|
inline |
string |
|
inline |
s |
|
inline |
v |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
inline |
Get the Byte object.
result |
bool mframe::io::ByteBuffer::pollFloat | ( | float & | result | ) |
Get the Float object.
result |
bool mframe::io::ByteBuffer::pollInt | ( | int & | result | ) |
Get the Int object.
result |
|
inline |
Get the Int object.
result |
bool mframe::io::ByteBuffer::pollShort | ( | short & | result | ) |
Get the Short object.
result |
|
inline |
Get the Short object.
result |
bool mframe::io::ByteBuffer::position | ( | int | newPosition | ) |
newPosition |
|
inline |
bool mframe::io::ByteBuffer::put | ( | const char * | string | ) |
string |
bool mframe::io::ByteBuffer::put | ( | const mframe::lang::Strings & | string | ) |
string |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
bool mframe::io::ByteBuffer::putFloat | ( | const float | value | ) |
value |
int mframe::io::ByteBuffer::putFormat | ( | const char * | format, |
va_list | args ) |
format | |
args |
int mframe::io::ByteBuffer::putFormat | ( | const char * | format, |
... ) |
format | |
... |
bool mframe::io::ByteBuffer::putInt | ( | const int | value | ) |
value |
bool mframe::io::ByteBuffer::putShort | ( | const short | value | ) |
value |
|
overridevirtual |
|
inline |
|
inline |
|
overridevirtual |