|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLNET::CMessage Class ReferenceMessage memory stream for network.
More...
#include <message.h>
Inheritance diagram for NLNET::CMessage
[legend]Collaboration diagram for NLNET::CMessage:
[legend]List of all members.
Detailed Description
Message memory stream for network.
Can be serialized to/from (see SerialBuffer()). Can be sent or received over a network, using the NeL network engine. If MESSAGES_PLAIN_TEXT is defined, the messages will be serialized to/from plain text (human-readable), instead of binary. Warning: if you don't give a "sida", the message type will not be associated with id so, it'll not be optimized
-
Author(s):
-
Vianney Lecroart , Nevrax France
-
Date:
-
2001
Definition at line 66 of file message.h.
Constructor & Destructor Documentation
NLNET::CMessage::CMessage (
|
NLMISC::CStringIdArray & sida,
|
|
const std::string & name = "",
|
|
bool inputStream = false,
|
|
uint32 defaultCapacity = 0 ) [inline]
|
|
NLNET::CMessage::CMessage (
|
const std::string & name = "",
|
|
bool inputStream = false,
|
|
uint32 defaultCapacity = 0 ) [inline]
|
|
NLNET::CMessage::CMessage (
|
const CMessage & other ) [inline]
|
|
Member Function Documentation
void NLNET::CMessage::clear (
|
void ) [inline, virtual]
|
|
uint32 NLNET::CMessage::getHeaderSize (
|
) [inline]
|
|
|
Returns the size, in byte of the header that contains the type name of the message or the type number.
Definition at line 215 of file message.h. |
|
Returns the type id of this message is available.
Definition at line 260 of file message.h. |
std::string NLNET::CMessage::getName (
|
) const [inline]
|
|
|
Returns the type name in string if available. Be sure that the message have the name of the message type.
Definition at line 257 of file message.h. |
CMessage & NLNET::CMessage::operator= (
|
const CMessage & other ) [inline]
|
|
|
Assignment operator.
Definition at line 130 of file message.h. |
void NLNET::CMessage::readType (
|
) [inline]
|
|
void NLNET::CMessage::setType (
|
const std::string & name ) [inline]
|
|
|
Sets the message type as a string and put it in the buffer if we are in writing mode.
Definition at line 174 of file message.h. |
|
Sets the message type as a number (in range 0..32767) and put it in the buffer if we are in writing mode.
Definition at line 139 of file message.h. |
std::string NLNET::CMessage::toString (
|
) const [inline]
|
|
|
Returns a readable string to display it to the screen.
It's only for debugging purpose! Don't use it for anything else than to debugging, the string format could change in the futur
Definition at line 265 of file message.h. |
bool NLNET::CMessage::typeIsSet (
|
) const [inline]
|
|
Member Data Documentation
bool NLNET::CMessage::TypeHasAName
|
|
bool NLNET::CMessage::TypeHasAnId
|
|
uint32 NLNET::CMessage::_HeaderSize [private]
|
|
std::string NLNET::CMessage::_Name [private]
|
|
bool NLNET::CMessage::_TypeSet [private]
|
|
The documentation for this class was generated from the following file:
|
|