ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::ser::serialize_pop Class Reference

反序列化(读取)实现类。 More...

#include <nserialize.h>

Inheritance diagram for ngl::ser::serialize_pop:
ngl::ser::serialize< const char * >

Public Member Functions

 serialize_pop (const char *abuff, int32_t alen)
 构造函数。
virtual bool basetype (void *adata, int32_t abytes)
 从缓冲区读取数据。
Public Member Functions inherited from ngl::ser::serialize< const char * >
 serialize (const char *abuff, int32_t alen)
 构造函数。
const char * buff ()
 获取缓冲区指针。
int & pos ()
 获取当前读写位置。
int & len ()
 获取缓冲区总长度。
int move_pos (int abytes)
 移动读写位置。

Detailed Description

反序列化(读取)实现类。

该类实现了从缓冲区读取数据的功能,用于反序列化操作。 提供了边界检查和错误处理,确保读取操作的安全性。

Constructor & Destructor Documentation

◆ serialize_pop()

ngl::ser::serialize_pop::serialize_pop ( const char * abuff,
int32_t alen )
inline

构造函数。

Parameters
abuff只读缓冲区指针
alen缓冲区长度

Member Function Documentation

◆ basetype()

virtual bool ngl::ser::serialize_pop::basetype ( void * adata,
int32_t abytes )
inlinevirtual

从缓冲区读取数据。

Parameters
adata数据指针
abytes数据字节数
Returns
bool 读取是否成功
Note
包含完整的边界检查和错误处理

Implements ngl::ser::serialize< const char * >.


The documentation for this class was generated from the following file: