本文整理汇总了C++中net::CBuffer::read方法的典型用法代码示例。如果您正苦于以下问题:C++ CBuffer::read方法的具体用法?C++ CBuffer::read怎么用?C++ CBuffer::read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net::CBuffer
的用法示例。
在下文中一共展示了CBuffer::read方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deserialize
void CMessageHoundCharge::deserialize(Net::CBuffer& buffer) {
buffer.read( &_isActive, sizeof(_isActive) );
// Solo si la habilidad esta activa se mandan el resto
// de los atributos
if(_isActive) {
buffer.read( &_filterMask, sizeof(_filterMask) );
buffer.read( &_force, sizeof(_force) );
}
}
示例2: deserialize
void CMessageInt::deserialize(Net::CBuffer &data)
{
CMessage::deserialize(data);
data.read(&_int, sizeof(_int));
} // deserialize
示例3: deserialize
void CMessageBool::deserialize(Net::CBuffer &data)
{
CMessage::deserialize(data);
data.read(&_bool, sizeof(_bool));
} // deserialize
示例4: deserialize
void CMessageSetOwner::deserialize(Net::CBuffer& buffer) {
TEntityID id;
// Por problemas con enumerados utilizamos directamente
// el read en vez del deserialize
buffer.read( &id, sizeof(id) );
_entity = Logic::CServer::getSingletonPtr()->getMap()->getEntityByID(id);
}
示例5: deserialize
void CMessageTF::deserialize(Net::CBuffer &data)
{
CMessage::deserialize(data);
for(int i = 0; i < 4; ++i)
for(int j = 0; j < 4; ++j)
data.read(&_transform[i][j], sizeof(_transform[i][j]));
} // deserialize
示例6: deserialize
void CMessageAudio::deserialize(Net::CBuffer &data) {
unsigned int size;
data.read(&size, sizeof(size));
char* aux = new char[size];
data.read(aux, size);
_path.assign(aux,size);
delete[] aux;
unsigned int size1;
data.read(&size1, sizeof(size1));
char* aux1 = new char[size1];
data.read(aux1, size1);
_id.assign(aux1,size1);
delete[] aux1;
data.read(&_position.x, sizeof(_position.x));
data.read(&_position.y, sizeof(_position.y));
data.read(&_position.z, sizeof(_position.z));
data.read(&_notIfPlay, sizeof(_notIfPlay));
data.read(&_isPlayer, sizeof(_isPlayer));
}
示例7: deserialize
void CMessageControl::deserialize(Net::CBuffer& buffer) {
buffer.deserialize(_seq);
buffer.read(&_controlType, sizeof(_controlType));
}