LLDataPackerAsciiFile Class Reference

#include <lldatapacker.h>

Inheritance diagram for LLDataPackerAsciiFile:

Inheritance graph
[legend]
Collaboration diagram for LLDataPackerAsciiFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLDataPackerAsciiFile (FILE *fp, const S32 indent=2)
 LLDataPackerAsciiFile (std::ostream &output_stream, const S32 indent=2)
 LLDataPackerAsciiFile (std::istream &input_stream, const S32 indent=2)
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)

Protected Member Functions

void writeIndentedName (const char *name)
BOOL getValueStr (const char *name, char *out_value, const S32 value_len)
BOOL hasNext () const

Protected Attributes

S32 mIndent
FILE * mFP
std::ostream * mOutputStream
std::istream * mInputStream

Detailed Description

Definition at line 330 of file lldatapacker.h.


Constructor & Destructor Documentation

LLDataPackerAsciiFile::LLDataPackerAsciiFile ( FILE *  fp,
const S32  indent = 2 
) [inline]

Definition at line 333 of file lldatapacker.h.

LLDataPackerAsciiFile::LLDataPackerAsciiFile ( std::ostream &  output_stream,
const S32  indent = 2 
) [inline]

Definition at line 342 of file lldatapacker.h.

References LLDataPacker::mWriteEnabled, and TRUE.

LLDataPackerAsciiFile::LLDataPackerAsciiFile ( std::istream &  input_stream,
const S32  indent = 2 
) [inline]

Definition at line 352 of file lldatapacker.h.


Member Function Documentation

BOOL LLDataPackerAsciiFile::getValueStr ( const char *  name,
char *  out_value,
const S32  value_len 
) [protected]

Definition at line 1884 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, llendl, llmin(), llwarns, mFP, mInputStream, NULL, S32, and TRUE.

Referenced by unpackBinaryData(), unpackBinaryDataFixed(), unpackColor4(), unpackColor4U(), unpackF32(), unpackS32(), unpackString(), unpackU16(), unpackU32(), unpackU8(), unpackUUID(), unpackVector2(), unpackVector3(), and unpackVector4().

BOOL LLDataPackerAsciiFile::hasNext (  )  const [inline, protected, virtual]

Implements LLDataPacker.

Definition at line 406 of file lldatapacker.h.

BOOL LLDataPackerAsciiFile::packBinaryData ( const U8 value,
S32  size,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1407 of file lldatapacker.cpp.

References i, mFP, mOutputStream, S32, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packBinaryDataFixed ( const U8 value,
S32  size,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1466 of file lldatapacker.cpp.

References i, mFP, mOutputStream, S32, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packColor4 ( const LLColor4 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1674 of file lldatapacker.cpp.

References convertF32ToString(), mFP, mOutputStream, LLColor4::mV, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packColor4U ( const LLColor4U value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1703 of file lldatapacker.cpp.

References mFP, mOutputStream, LLColor4U::mV, S32, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packF32 ( const F32  value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1644 of file lldatapacker.cpp.

References convertF32ToString(), mFP, mOutputStream, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packS32 ( const S32  value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1614 of file lldatapacker.cpp.

References mFP, mOutputStream, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packString ( const char *  value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1379 of file lldatapacker.cpp.

References mFP, mOutputStream, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packU16 ( const U16  value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1552 of file lldatapacker.cpp.

References mFP, mOutputStream, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packU32 ( const U32  value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1584 of file lldatapacker.cpp.

References mFP, mOutputStream, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packU8 ( const U8  value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1519 of file lldatapacker.cpp.

References mFP, mOutputStream, S32, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packUUID ( const LLUUID value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1828 of file lldatapacker.cpp.

References mFP, mOutputStream, LLUUID::toString(), TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packVector2 ( const LLVector2 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1739 of file lldatapacker.cpp.

References convertF32ToString(), mFP, mOutputStream, LLVector2::mV, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packVector3 ( const LLVector3 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1769 of file lldatapacker.cpp.

References convertF32ToString(), mFP, mOutputStream, LLVector3::mV, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::packVector4 ( const LLVector4 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1798 of file lldatapacker.cpp.

References convertF32ToString(), mFP, mOutputStream, LLVector4::mV, TRUE, and writeIndentedName().

BOOL LLDataPackerAsciiFile::unpackBinaryData ( U8 value,
S32 size,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1441 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), i, S32, and TRUE.

BOOL LLDataPackerAsciiFile::unpackBinaryDataFixed ( U8 value,
S32  size,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1495 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), i, S32, and TRUE.

BOOL LLDataPackerAsciiFile::unpackColor4 ( LLColor4 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1690 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), LLColor4::mV, and TRUE.

BOOL LLDataPackerAsciiFile::unpackColor4U ( LLColor4U value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1719 of file lldatapacker.cpp.

References a, b, DP_BUFSIZE, FALSE, g, getValueStr(), LLColor4U::mV, r, S32, and TRUE.

BOOL LLDataPackerAsciiFile::unpackF32 ( F32 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1660 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), and TRUE.

BOOL LLDataPackerAsciiFile::unpackS32 ( S32 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1630 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), and TRUE.

BOOL LLDataPackerAsciiFile::unpackString ( std::string &  value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1394 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), and TRUE.

BOOL LLDataPackerAsciiFile::unpackU16 ( U16 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1568 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), S32, and TRUE.

BOOL LLDataPackerAsciiFile::unpackU32 ( U32 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1600 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), and TRUE.

BOOL LLDataPackerAsciiFile::unpackU8 ( U8 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1537 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), S32, and TRUE.

BOOL LLDataPackerAsciiFile::unpackUUID ( LLUUID value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1846 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), LLUUID::set(), and TRUE.

BOOL LLDataPackerAsciiFile::unpackVector2 ( LLVector2 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1755 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), LLVector2::mV, and TRUE.

BOOL LLDataPackerAsciiFile::unpackVector3 ( LLVector3 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1785 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), LLVector3::mV, and TRUE.

BOOL LLDataPackerAsciiFile::unpackVector4 ( LLVector4 value,
const char *  name 
) [virtual]

Implements LLDataPacker.

Definition at line 1814 of file lldatapacker.cpp.

References DP_BUFSIZE, FALSE, getValueStr(), LLVector4::mV, and TRUE.

void LLDataPackerAsciiFile::writeIndentedName ( const char *  name  )  [protected]

Definition at line 1863 of file lldatapacker.cpp.

References i, mFP, mIndent, mOutputStream, and S32.

Referenced by packBinaryData(), packBinaryDataFixed(), packColor4(), packColor4U(), packF32(), packS32(), packString(), packU16(), packU32(), packU8(), packUUID(), packVector2(), packVector3(), and packVector4().


Member Data Documentation

FILE* LLDataPackerAsciiFile::mFP [protected]

Definition at line 410 of file lldatapacker.h.

Referenced by getValueStr(), packBinaryData(), packBinaryDataFixed(), packColor4(), packColor4U(), packF32(), packS32(), packString(), packU16(), packU32(), packU8(), packUUID(), packVector2(), packVector3(), packVector4(), and writeIndentedName().

S32 LLDataPackerAsciiFile::mIndent [protected]

Definition at line 409 of file lldatapacker.h.

Referenced by writeIndentedName().

std::istream* LLDataPackerAsciiFile::mInputStream [protected]

Definition at line 412 of file lldatapacker.h.

Referenced by getValueStr().

std::ostream* LLDataPackerAsciiFile::mOutputStream [protected]

Definition at line 411 of file lldatapacker.h.

Referenced by packBinaryData(), packBinaryDataFixed(), packColor4(), packColor4U(), packF32(), packS32(), packString(), packU16(), packU32(), packU8(), packUUID(), packVector2(), packVector3(), packVector4(), and writeIndentedName().


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