📄 msgchat.h
字号:
#ifndef MSGCHAT_H
#define MSGCHAT_H
#include <stddef.h>
#include <string.h>
#include <sstream>
#include <iostream>
using namespace std;
#include "socket_api.h"
#include "message.h"
#include "client.h"
class MsgChat : public Message
{
public:
MsgChat();
MsgChat( const string& __msg );
~MsgChat();
public:
static int* getTypePtr(void)
{
return &_type;
}
int getType(void) const
{
return _type;
}
int value_size(void);
bool load( Buffer& __buffer );//return true for successed
bool save( Buffer& __buffer ) const;//return true for successed
bool preProcess( Connection* __conn, Remote* __remote, World* __world, shared_ptr<Message>& __this );//return true to be queued
bool process( shared_ptr<Message>& __this );//return true to be removed from the queue
protected:
static int _type;
string _name;
string _msg;
Client* _client;
World* _world;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -