ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::nsp_handle_print< TDerived > Class Template Reference

NSP消息处理的调试打印辅助模板。 More...

#include <nsp.h>

Static Public Member Functions

template<typename TRECV>
static void print (const char *aname, const TDerived *aactor, const TRECV *arecv)
 打印接收到的NSP消息调试信息。
template<typename TACTOR, typename TX>
static void msg_info (TX &adata)
 设置消息路由信息字符串,格式为"Derived类型:Actor类型:消息类型"。

Detailed Description

template<typename TDerived>
class ngl::nsp_handle_print< TDerived >

NSP消息处理的调试打印辅助模板。

提供静态方法用于在调试日志中打印NSP消息的接收信息和消息路由信息。

Template Parameters
TDerived派生Actor类型

Member Function Documentation

◆ msg_info()

template<typename TDerived>
template<typename TACTOR, typename TX>
void ngl::nsp_handle_print< TDerived >::msg_info ( TX & adata)
inlinestatic

设置消息路由信息字符串,格式为"Derived类型:Actor类型:消息类型"。

Template Parameters
TACTOR消息来源Actor类型
TX消息包装类型
Parameters
adata消息包装对象,其m_msg字段将被填充路由信息

◆ print()

template<typename TDerived>
template<typename TRECV>
void ngl::nsp_handle_print< TDerived >::print ( const char * aname,
const TDerived * aactor,
const TRECV * arecv )
inlinestatic

打印接收到的NSP消息调试信息。

Template Parameters
TRECV接收到的protobuf消息类型
Parameters
aname处理器名称(用于日志标识)
aactor目标Actor指针
arecv接收到的消息指针

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