tuningfork:: VectorStream
#include <protobuf_nano_util.h>
以 vec
為單位檢視向量。
摘要
未佔用擁有權。
詳細資料 | |||
---|---|---|---|
參數 |
|
公開屬性 |
|
---|---|
it
|
size_t
在解碼或編碼時,向量中目前的位置。
|
vec
|
std::vector< uint8_t > *
在呼叫
Read 或 Write 時,必須有效的位元組向量。 |
公開靜態函式 |
|
---|---|
Read(pb_istream_t *stream, uint8_t *buf, size_t count)
|
bool
讀取串流中的
count 個位元組到指定的緩衝區。 |
Write(pb_ostream_t *stream, const uint8_t *buf, size_t count)
|
bool
將指定緩衝區中的
count 個位元組寫入串流。 |
公開屬性
it
size_t tuningfork::VectorStream::it
在解碼或編碼時,向量中目前的位置。
vec
std::vector< uint8_t > * tuningfork::VectorStream::vec
在呼叫 Read
或 Write
時,必須有效的位元組向量。
Write
會根據需求調整向量大小。
公開靜態函式
讀取
bool tuningfork::VectorStream::Read( pb_istream_t *stream, uint8_t *buf, size_t count )
讀取串流中的 count
個位元組到指定的緩衝區。
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
傳回 |
True 表示成功,False 表示讀取錯誤。
|
寫入
bool tuningfork::VectorStream::Write( pb_ostream_t *stream, const uint8_t *buf, size_t count )
將指定緩衝區中的 count
個位元組寫入串流。
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
傳回 |
True 表示成功,False 表示寫入錯誤。
|