xrootd
Public Member Functions | Private Attributes
XrdCl::Message Class Reference

The message representation used throughout the system. More...

#include <XrdClMessage.hh>

Inheritance diagram for XrdCl::Message:
Inheritance graph
[legend]
Collaboration diagram for XrdCl::Message:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Message (uint32_t size=0)
 Constructor.
virtual ~Message ()
 Destructor.
bool IsMarshalled () const
 Check if the message is marshalled.
void SetIsMarshalled (bool isMarshalled)
 Set the marshalling status.
void SetDescription (const std::string &description)
 Set the description of the message.
const std::string & GetDescription () const
 Get the description of the message.
void SetSessionId (uint64_t sessionId)
 Set the session ID which this message is meant for.
uint64_t GetSessionId () const
 Get the session ID the message is meant for.
- Public Member Functions inherited from XrdCl::Buffer
 Buffer (uint32_t size=0)
 Constructor.
virtual ~Buffer ()
 Destructor.
const char * GetBuffer (uint32_t offset=0) const
 Get the message buffer.
char * GetBuffer (uint32_t offset=0)
 Get the message buffer.
void ReAllocate (uint32_t size)
 Reallocate the buffer to a new location of a given size.
void Free ()
 Free the buffer.
void Allocate (uint32_t size)
 Allocate the buffer.
void Zero ()
 Zero.
uint32_t GetSize () const
 Get the size of the message.
uint32_t GetCursor () const
 Get append cursor.
void SetCursor (uint32_t cursor)
 Set the cursor.
void AdvanceCursor (uint32_t delta)
 Advance the cursor.
void Append (const char *buffer, uint32_t size)
 Append data at the position pointed to by the append cursor.
void Append (const char *buffer, uint32_t size, uint32_t offset)
 Append data at the given offset.
char * GetBufferAtCursor ()
 Get the buffer pointer at the append cursor.
const char * GetBufferAtCursor () const
 Get the buffer pointer at the append cursor.
void FromString (const std::string str)
 Fill the buffer from a string.
std::string ToString () const
 Convert the buffer to a string.
void Grab (char *buffer, uint32_t size)
 Grab a buffer allocated outside.
char * Release ()
 Release the buffer.

Private Attributes

bool pIsMarshalled
uint64_t pSessionId
std::string pDescription

Detailed Description

The message representation used throughout the system.


Constructor & Destructor Documentation

XrdCl::Message::Message ( uint32_t  size = 0)
inline

Constructor.

References XrdCl::Buffer::Zero().

virtual XrdCl::Message::~Message ( )
inlinevirtual

Destructor.


Member Function Documentation

const std::string& XrdCl::Message::GetDescription ( ) const
inline
uint64_t XrdCl::Message::GetSessionId ( ) const
inline
bool XrdCl::Message::IsMarshalled ( ) const
inline

Check if the message is marshalled.

References pIsMarshalled.

void XrdCl::Message::SetDescription ( const std::string &  description)
inline

Set the description of the message.

References pDescription.

Referenced by XrdCl::XRootDTransport::SetDescription().

void XrdCl::Message::SetIsMarshalled ( bool  isMarshalled)
inline

Set the marshalling status.

References pIsMarshalled.

void XrdCl::Message::SetSessionId ( uint64_t  sessionId)
inline

Set the session ID which this message is meant for.

References pSessionId.

Referenced by XrdCl::FileStateHandler::Close(), XrdCl::Stream::OnIncoming(), and XrdCl::FileStateHandler::SendOrQueue().


Member Data Documentation

std::string XrdCl::Message::pDescription
private

Referenced by GetDescription(), and SetDescription().

bool XrdCl::Message::pIsMarshalled
private

Referenced by IsMarshalled(), and SetIsMarshalled().

uint64_t XrdCl::Message::pSessionId
private

Referenced by GetSessionId(), and SetSessionId().


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