LLSDMessageBuilder Class Reference

#include <llsdmessagebuilder.h>

Inheritance diagram for LLSDMessageBuilder:

Inheritance graph
[legend]
Collaboration diagram for LLSDMessageBuilder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLSDMessageBuilder ()
virtual ~LLSDMessageBuilder ()
virtual void newMessage (const char *name)
virtual void nextBlock (const char *blockname)
virtual BOOL removeLastBlock ()
virtual void addBinaryData (const char *varname, const void *data, S32 size)
virtual void addBOOL (const char *varname, BOOL b)
virtual void addS8 (const char *varname, S8 s)
virtual void addU8 (const char *varname, U8 u)
virtual void addS16 (const char *varname, S16 i)
virtual void addU16 (const char *varname, U16 i)
virtual void addF32 (const char *varname, F32 f)
virtual void addS32 (const char *varname, S32 s)
virtual void addU32 (const char *varname, U32 u)
virtual void addU64 (const char *varname, U64 lu)
virtual void addF64 (const char *varname, F64 d)
virtual void addVector3 (const char *varname, const LLVector3 &vec)
virtual void addVector4 (const char *varname, const LLVector4 &vec)
virtual void addVector3d (const char *varname, const LLVector3d &vec)
virtual void addQuat (const char *varname, const LLQuaternion &quat)
virtual void addUUID (const char *varname, const LLUUID &uuid)
virtual void addIPAddr (const char *varname, const U32 ip)
virtual void addIPPort (const char *varname, const U16 port)
virtual void addString (const char *varname, const char *s)
virtual void addString (const char *varname, const std::string &s)
virtual BOOL isMessageFull (const char *blockname) const
virtual void compressMessage (U8 *&buf_ptr, U32 &buffer_length)
virtual BOOL isBuilt () const
virtual BOOL isClear () const
virtual U32 buildMessage (U8 *buffer, U32 buffer_size, U8 offset_to_data)
virtual void clearMessage ()
virtual void setBuilt (BOOL b)
virtual S32 getMessageSize ()
virtual const char * getMessageName () const
virtual void copyFromMessageData (const LLMsgData &data)
virtual void copyFromLLSD (const LLSD &msg)
const LLSDgetMessage () const

Private Attributes

LLSD mCurrentMessage
LLSDmCurrentBlock
std::string mCurrentMessageName
std::string mCurrentBlockName
BOOL mbSBuilt
BOOL mbSClear

Detailed Description

Definition at line 44 of file llsdmessagebuilder.h.


Constructor & Destructor Documentation

LLSDMessageBuilder::LLSDMessageBuilder (  ) 

Definition at line 45 of file llsdmessagebuilder.cpp.

LLSDMessageBuilder::~LLSDMessageBuilder (  )  [virtual]

Definition at line 56 of file llsdmessagebuilder.cpp.


Member Function Documentation

void LLSDMessageBuilder::addBinaryData ( const char *  varname,
const void data,
S32  size 
) [virtual]

All add* methods expect pointers to canonical varname strings.

Implements LLMessageBuilder.

Definition at line 108 of file llsdmessagebuilder.cpp.

References v.

void LLSDMessageBuilder::addBOOL ( const char *  varname,
BOOL  b 
) [virtual]

Implements LLMessageBuilder.

Definition at line 174 of file llsdmessagebuilder.cpp.

References TRUE.

void LLSDMessageBuilder::addF32 ( const char *  varname,
F32  f 
) [virtual]

Implements LLMessageBuilder.

Definition at line 139 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::addF64 ( const char *  varname,
F64  d 
) [virtual]

Implements LLMessageBuilder.

Definition at line 159 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::addIPAddr ( const char *  varname,
const U32  ip 
) [virtual]

Implements LLMessageBuilder.

Definition at line 164 of file llsdmessagebuilder.cpp.

References ll_sd_from_ipaddr().

void LLSDMessageBuilder::addIPPort ( const char *  varname,
const U16  port 
) [virtual]

Implements LLMessageBuilder.

Definition at line 169 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::addQuat ( const char *  varname,
const LLQuaternion quat 
) [virtual]

Implements LLMessageBuilder.

Definition at line 210 of file llsdmessagebuilder.cpp.

References ll_sd_from_quaternion(), and v.

void LLSDMessageBuilder::addS16 ( const char *  varname,
S16  i 
) [virtual]

Implements LLMessageBuilder.

Definition at line 129 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::addS32 ( const char *  varname,
S32  s 
) [virtual]

Implements LLMessageBuilder.

Definition at line 144 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::addS8 ( const char *  varname,
S8  s 
) [virtual]

Implements LLMessageBuilder.

Definition at line 119 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::addString ( const char *  varname,
const std::string &  s 
) [virtual]

Implements LLMessageBuilder.

Definition at line 187 of file llsdmessagebuilder.cpp.

References mCurrentBlock.

void LLSDMessageBuilder::addString ( const char *  varname,
const char *  s 
) [virtual]

Implements LLMessageBuilder.

Definition at line 179 of file llsdmessagebuilder.cpp.

References mCurrentBlock.

void LLSDMessageBuilder::addU16 ( const char *  varname,
U16  i 
) [virtual]

Implements LLMessageBuilder.

Definition at line 134 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::addU32 ( const char *  varname,
U32  u 
) [virtual]

Implements LLMessageBuilder.

Definition at line 149 of file llsdmessagebuilder.cpp.

References ll_sd_from_U32().

void LLSDMessageBuilder::addU64 ( const char *  varname,
U64  lu 
) [virtual]

Implements LLMessageBuilder.

Definition at line 154 of file llsdmessagebuilder.cpp.

References ll_sd_from_U64().

void LLSDMessageBuilder::addU8 ( const char *  varname,
U8  u 
) [virtual]

Implements LLMessageBuilder.

Definition at line 124 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::addUUID ( const char *  varname,
const LLUUID uuid 
) [virtual]

Implements LLMessageBuilder.

Definition at line 215 of file llsdmessagebuilder.cpp.

References v.

void LLSDMessageBuilder::addVector3 ( const char *  varname,
const LLVector3 vec 
) [virtual]

Implements LLMessageBuilder.

Definition at line 195 of file llsdmessagebuilder.cpp.

References ll_sd_from_vector3(), and v.

void LLSDMessageBuilder::addVector3d ( const char *  varname,
const LLVector3d vec 
) [virtual]

Implements LLMessageBuilder.

Definition at line 205 of file llsdmessagebuilder.cpp.

References ll_sd_from_vector3d(), and v.

void LLSDMessageBuilder::addVector4 ( const char *  varname,
const LLVector4 vec 
) [virtual]

Implements LLMessageBuilder.

Definition at line 200 of file llsdmessagebuilder.cpp.

References ll_sd_from_vector4(), and v.

U32 LLSDMessageBuilder::buildMessage ( U8 buffer,
U32  buffer_size,
U8  offset_to_data 
) [virtual]

Null implementation which returns 0.

Implements LLMessageBuilder.

Definition at line 229 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::clearMessage (  )  [virtual]

Implements LLMessageBuilder.

Definition at line 72 of file llsdmessagebuilder.cpp.

References LLSD::emptyMap(), FALSE, mbSBuilt, mbSClear, mCurrentMessage, mCurrentMessageName, and TRUE.

void LLSDMessageBuilder::compressMessage ( U8 *&  buf_ptr,
U32 buffer_length 
) [virtual]

Implements LLMessageBuilder.

Definition at line 220 of file llsdmessagebuilder.cpp.

void LLSDMessageBuilder::copyFromLLSD ( const LLSD msg  )  [virtual]

Implements LLMessageBuilder.

Definition at line 279 of file llsdmessagebuilder.cpp.

References lldebugs, llendl, and mCurrentMessage.

void LLSDMessageBuilder::copyFromMessageData ( const LLMsgData data  )  [virtual]

Implements LLMessageBuilder.

Definition at line 234 of file llsdmessagebuilder.cpp.

References end, LLMsgData::mMemberBlocks, nextBlock(), NULL, and S32.

const LLSD & LLSDMessageBuilder::getMessage (  )  const

Definition at line 285 of file llsdmessagebuilder.cpp.

References mCurrentMessage.

Referenced by LLMessageSystem::sendMessage(), and tut::LLSDMessageBuilderTestData::setReader().

const char * LLSDMessageBuilder::getMessageName (  )  const [virtual]

Implements LLMessageBuilder.

Definition at line 309 of file llsdmessagebuilder.cpp.

References mCurrentMessageName.

Referenced by LLMessageSystem::sendMessage().

S32 LLSDMessageBuilder::getMessageSize (  )  [virtual]

Implements LLMessageBuilder.

Definition at line 300 of file llsdmessagebuilder.cpp.

References mCurrentMessage, and LLSD::size().

BOOL LLSDMessageBuilder::isBuilt (  )  const [virtual]

Implements LLMessageBuilder.

Definition at line 294 of file llsdmessagebuilder.cpp.

References mbSBuilt.

BOOL LLSDMessageBuilder::isClear (  )  const [virtual]

Implements LLMessageBuilder.

Definition at line 297 of file llsdmessagebuilder.cpp.

References mbSClear.

BOOL LLSDMessageBuilder::isMessageFull ( const char *  blockname  )  const [virtual]

Implements LLMessageBuilder.

Definition at line 224 of file llsdmessagebuilder.cpp.

References FALSE.

void LLSDMessageBuilder::newMessage ( const char *  name  )  [virtual]

Implements LLMessageBuilder.

Definition at line 62 of file llsdmessagebuilder.cpp.

References LLSD::emptyMap(), FALSE, mbSBuilt, mbSClear, mCurrentMessage, and mCurrentMessageName.

Referenced by tut::LLSDMessageBuilderTestData::defaultBuilder().

void LLSDMessageBuilder::nextBlock ( const char *  blockname  )  [virtual]

Implements LLMessageBuilder.

Definition at line 82 of file llsdmessagebuilder.cpp.

References LLSD::emptyMap(), LLSD::isArray(), LLSD::isUndefined(), llendl, llerrs, mCurrentBlock, mCurrentMessage, and LLSD::size().

Referenced by copyFromMessageData(), and tut::LLSDMessageBuilderTestData::defaultBuilder().

BOOL LLSDMessageBuilder::removeLastBlock (  )  [virtual]

Implements LLMessageBuilder.

Definition at line 102 of file llsdmessagebuilder.cpp.

References FALSE.

void LLSDMessageBuilder::setBuilt ( BOOL  b  )  [virtual]

Implements LLMessageBuilder.

Definition at line 291 of file llsdmessagebuilder.cpp.

References mbSBuilt.


Member Data Documentation

BOOL LLSDMessageBuilder::mbSBuilt [private]

Definition at line 127 of file llsdmessagebuilder.h.

Referenced by clearMessage(), isBuilt(), newMessage(), and setBuilt().

BOOL LLSDMessageBuilder::mbSClear [private]

Definition at line 128 of file llsdmessagebuilder.h.

Referenced by clearMessage(), isClear(), and newMessage().

LLSD* LLSDMessageBuilder::mCurrentBlock [private]

Definition at line 124 of file llsdmessagebuilder.h.

Referenced by addString(), and nextBlock().

std::string LLSDMessageBuilder::mCurrentBlockName [private]

Definition at line 126 of file llsdmessagebuilder.h.

LLSD LLSDMessageBuilder::mCurrentMessage [private]

Definition at line 123 of file llsdmessagebuilder.h.

Referenced by clearMessage(), copyFromLLSD(), getMessage(), getMessageSize(), newMessage(), and nextBlock().

std::string LLSDMessageBuilder::mCurrentMessageName [private]

Definition at line 125 of file llsdmessagebuilder.h.

Referenced by clearMessage(), getMessageName(), and newMessage().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:45 2010 for Second Life Viewer by  doxygen 1.4.7