#include <lldatapacker.h>
Public Member Functions | |
LLDataPackerAsciiBuffer (char *bufferp, S32 size) | |
LLDataPackerAsciiBuffer () | |
BOOL | packString (const char *value, const char *name) |
BOOL | unpackString (std::string &value, const char *name) |
BOOL | packBinaryData (const U8 *value, S32 size, const char *name) |
BOOL | unpackBinaryData (U8 *value, S32 &size, const char *name) |
BOOL | packBinaryDataFixed (const U8 *value, S32 size, const char *name) |
BOOL | unpackBinaryDataFixed (U8 *value, S32 size, const char *name) |
BOOL | packU8 (const U8 value, const char *name) |
BOOL | unpackU8 (U8 &value, const char *name) |
BOOL | packU16 (const U16 value, const char *name) |
BOOL | unpackU16 (U16 &value, const char *name) |
BOOL | packU32 (const U32 value, const char *name) |
BOOL | unpackU32 (U32 &value, const char *name) |
BOOL | packS32 (const S32 value, const char *name) |
BOOL | unpackS32 (S32 &value, const char *name) |
BOOL | packF32 (const F32 value, const char *name) |
BOOL | unpackF32 (F32 &value, const char *name) |
BOOL | packColor4 (const LLColor4 &value, const char *name) |
BOOL | unpackColor4 (LLColor4 &value, const char *name) |
BOOL | packColor4U (const LLColor4U &value, const char *name) |
BOOL | unpackColor4U (LLColor4U &value, const char *name) |
BOOL | packVector2 (const LLVector2 &value, const char *name) |
BOOL | unpackVector2 (LLVector2 &value, const char *name) |
BOOL | packVector3 (const LLVector3 &value, const char *name) |
BOOL | unpackVector3 (LLVector3 &value, const char *name) |
BOOL | packVector4 (const LLVector4 &value, const char *name) |
BOOL | unpackVector4 (LLVector4 &value, const char *name) |
BOOL | packUUID (const LLUUID &value, const char *name) |
BOOL | unpackUUID (LLUUID &value, const char *name) |
void | setIncludeNames (BOOL b) |
S32 | getCurrentSize () const |
S32 | getBufferSize () const |
void | reset () |
BOOL | hasNext () const |
void | freeBuffer () |
void | assignBuffer (char *bufferp, S32 size) |
void | dump () |
Protected Member Functions | |
void | writeIndentedName (const char *name) |
BOOL | getValueStr (const char *name, char *out_value, const S32 value_len) |
BOOL | verifyLength (const S32 data_size, const char *name) |
Protected Attributes | |
char * | mBufferp |
char * | mCurBufferp |
S32 | mBufferSize |
BOOL | mIncludeNames |
Definition at line 209 of file lldatapacker.h.
LLDataPackerAsciiBuffer::LLDataPackerAsciiBuffer | ( | char * | bufferp, | |
S32 | size | |||
) | [inline] |
Definition at line 212 of file lldatapacker.h.
References FALSE, LLDataPackerBinaryBuffer::mBufferp, LLDataPackerBinaryBuffer::mBufferSize, LLDataPackerBinaryBuffer::mCurBufferp, LLDataPacker::mPassFlags, LLDataPacker::mWriteEnabled, and TRUE.
LLDataPackerAsciiBuffer::LLDataPackerAsciiBuffer | ( | ) | [inline] |
Definition at line 222 of file lldatapacker.h.
References FALSE, LLDataPackerBinaryBuffer::mBufferp, LLDataPackerBinaryBuffer::mBufferSize, LLDataPackerBinaryBuffer::mCurBufferp, LLDataPacker::mPassFlags, LLDataPacker::mWriteEnabled, and NULL.
BOOL LLDataPackerAsciiBuffer::packString | ( | const char * | value, | |
const char * | name | |||
) | [virtual] |
Implements LLDataPacker.
Definition at line 580 of file lldatapacker.cpp.
References getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, S32, TRUE, and writeIndentedName().
BOOL LLDataPackerAsciiBuffer::unpackString | ( | std::string & | value, | |
const char * | name | |||
) | [virtual] |
Implements LLDataPacker.
Definition at line 610 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), and TRUE.
BOOL LLDataPackerAsciiBuffer::packBinaryData | ( | const U8 * | value, | |
S32 | size, | |||
const char * | name | |||
) | [virtual] |
Implements LLDataPacker.
Definition at line 624 of file lldatapacker.cpp.
References FALSE, getBufferSize(), getCurrentSize(), i, llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, S32, TRUE, and writeIndentedName().
BOOL LLDataPackerAsciiBuffer::unpackBinaryData | ( | U8 * | value, | |
S32 & | size, | |||
const char * | name | |||
) | [virtual] |
Implements LLDataPacker.
Definition at line 689 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), i, S32, and TRUE.
BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed | ( | const U8 * | value, | |
S32 | size, | |||
const char * | name | |||
) | [virtual] |
Implements LLDataPacker.
Definition at line 714 of file lldatapacker.cpp.
References FALSE, getBufferSize(), getCurrentSize(), i, llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, S32, TRUE, and writeIndentedName().
BOOL LLDataPackerAsciiBuffer::unpackBinaryDataFixed | ( | U8 * | value, | |
S32 | size, | |||
const char * | name | |||
) | [virtual] |
Implements LLDataPacker.
Definition at line 761 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), i, S32, and TRUE.
Implements LLDataPacker.
Definition at line 785 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 818 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), S32, and TRUE.
Implements LLDataPacker.
Definition at line 833 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 865 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), S32, and TRUE.
Implements LLDataPacker.
Definition at line 881 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 911 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), and TRUE.
Implements LLDataPacker.
Definition at line 925 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 955 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), and TRUE.
Implements LLDataPacker.
Definition at line 969 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 999 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), and TRUE.
Implements LLDataPacker.
Definition at line 1013 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLColor4::mV, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 1043 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), LLColor4::mV, and TRUE.
Implements LLDataPacker.
Definition at line 1056 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLColor4U::mV, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 1086 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), LLColor4U::mV, r, S32, and TRUE.
Implements LLDataPacker.
Definition at line 1106 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLVector2::mV, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 1136 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), LLVector2::mV, and TRUE.
Implements LLDataPacker.
Definition at line 1150 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLVector3::mV, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 1180 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), LLVector3::mV, and TRUE.
Implements LLDataPacker.
Definition at line 1193 of file lldatapacker.cpp.
References DUMMY_BUFFER, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLVector4::mV, LLDataPacker::mWriteEnabled, TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 1223 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), LLVector4::mV, and TRUE.
Implements LLDataPacker.
Definition at line 1237 of file lldatapacker.cpp.
References FALSE, getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, LLDataPacker::mWriteEnabled, LLUUID::toString(), TRUE, and writeIndentedName().
Implements LLDataPacker.
Definition at line 1270 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, getValueStr(), LLUUID::set(), and TRUE.
void LLDataPackerAsciiBuffer::setIncludeNames | ( | BOOL | b | ) | [inline] |
Definition at line 275 of file lldatapacker.h.
S32 LLDataPackerAsciiBuffer::getCurrentSize | ( | ) | const [inline] |
Definition at line 278 of file lldatapacker.h.
References LLDataPackerBinaryBuffer::mBufferp, LLDataPackerBinaryBuffer::mCurBufferp, and S32.
Referenced by packBinaryData(), packBinaryDataFixed(), packColor4(), packColor4U(), packF32(), packS32(), packString(), packU16(), packU32(), packU8(), packUUID(), packVector2(), packVector3(), packVector4(), LLPreviewGesture::saveIfNeeded(), and writeIndentedName().
S32 LLDataPackerAsciiBuffer::getBufferSize | ( | ) | const [inline] |
Definition at line 280 of file lldatapacker.h.
References LLDataPackerBinaryBuffer::mBufferSize.
Referenced by packBinaryData(), packBinaryDataFixed(), packColor4(), packColor4U(), packF32(), packS32(), packString(), packU16(), packU32(), packU8(), packUUID(), packVector2(), packVector3(), packVector4(), and writeIndentedName().
void LLDataPackerAsciiBuffer::reset | ( | ) | [inline, virtual] |
Reimplemented from LLDataPacker.
Definition at line 281 of file lldatapacker.h.
References LLDataPackerBinaryBuffer::mBufferp, LLDataPackerBinaryBuffer::mCurBufferp, LLDataPacker::mWriteEnabled, and NULL.
BOOL LLDataPackerAsciiBuffer::hasNext | ( | ) | const [inline, virtual] |
Implements LLDataPacker.
Definition at line 283 of file lldatapacker.h.
References LLDataPackerBinaryBuffer::getBufferSize(), and LLDataPackerBinaryBuffer::getCurrentSize().
void LLDataPackerAsciiBuffer::freeBuffer | ( | ) | [inline] |
Definition at line 302 of file lldatapacker.h.
References FALSE, mBufferp, mBufferSize, mCurBufferp, LLDataPacker::mWriteEnabled, and NULL.
void LLDataPackerAsciiBuffer::assignBuffer | ( | char * | bufferp, | |
S32 | size | |||
) | [inline] |
Definition at line 310 of file lldatapacker.h.
References mBufferp, mBufferSize, mCurBufferp, LLDataPacker::mWriteEnabled, and TRUE.
void LLDataPackerAsciiBuffer::dump | ( | ) |
void LLDataPackerAsciiBuffer::writeIndentedName | ( | const char * | name | ) | [protected] |
Definition at line 1291 of file lldatapacker.cpp.
References getBufferSize(), getCurrentSize(), llendl, llwarns, mCurBufferp, mIncludeNames, LLDataPacker::mWriteEnabled, and S32.
Referenced by packBinaryData(), packBinaryDataFixed(), packColor4(), packColor4U(), packF32(), packS32(), packString(), packU16(), packU32(), packU8(), packUUID(), packVector2(), packVector3(), and packVector4().
BOOL LLDataPackerAsciiBuffer::getValueStr | ( | const char * | name, | |
char * | out_value, | |||
const S32 | value_len | |||
) | [protected] |
Definition at line 1321 of file lldatapacker.cpp.
References DP_BUFSIZE, FALSE, llendl, llmin(), llwarns, mCurBufferp, mIncludeNames, S32, and TRUE.
Referenced by unpackBinaryData(), unpackBinaryDataFixed(), unpackColor4(), unpackColor4U(), unpackF32(), unpackS32(), unpackString(), unpackU16(), unpackU32(), unpackU8(), unpackUUID(), unpackVector2(), unpackVector3(), and unpackVector4().
BOOL LLDataPackerAsciiBuffer::verifyLength | ( | const S32 | data_size, | |
const char * | name | |||
) | [inline, protected] |
Definition at line 318 of file lldatapacker.h.
References FALSE, llendl, llwarns, mBufferp, mBufferSize, mCurBufferp, LLDataPacker::mWriteEnabled, and TRUE.
char* LLDataPackerAsciiBuffer::mBufferp [protected] |
Definition at line 296 of file lldatapacker.h.
Referenced by assignBuffer(), dump(), freeBuffer(), and verifyLength().
char* LLDataPackerAsciiBuffer::mCurBufferp [protected] |
Definition at line 297 of file lldatapacker.h.
Referenced by assignBuffer(), freeBuffer(), getValueStr(), packBinaryData(), packBinaryDataFixed(), packColor4(), packColor4U(), packF32(), packS32(), packString(), packU16(), packU32(), packU8(), packUUID(), packVector2(), packVector3(), packVector4(), verifyLength(), and writeIndentedName().
S32 LLDataPackerAsciiBuffer::mBufferSize [protected] |
Definition at line 298 of file lldatapacker.h.
Referenced by assignBuffer(), freeBuffer(), and verifyLength().
BOOL LLDataPackerAsciiBuffer::mIncludeNames [protected] |
Definition at line 299 of file lldatapacker.h.
Referenced by getValueStr(), and writeIndentedName().