LLXMLNode Class Reference

#include <llxmlnode.h>

Inheritance diagram for LLXMLNode:

Inheritance graph
[legend]
Collaboration diagram for LLXMLNode:

Collaboration graph
[legend]
List of all members.

Public Types

 TYPE_CONTAINER
 TYPE_UNKNOWN
 TYPE_BOOLEAN
 TYPE_INTEGER
 TYPE_FLOAT
 TYPE_STRING
 TYPE_UUID
 TYPE_NODEREF
 ENCODING_DEFAULT = 0
 ENCODING_DECIMAL
 ENCODING_HEX
enum  ValueType {
  TYPE_CONTAINER, TYPE_UNKNOWN, TYPE_BOOLEAN, TYPE_INTEGER,
  TYPE_FLOAT, TYPE_STRING, TYPE_UUID, TYPE_NODEREF
}
enum  Encoding { ENCODING_DEFAULT = 0, ENCODING_DECIMAL, ENCODING_HEX }

Public Member Functions

 LLXMLNode ()
 LLXMLNode (const LLString &name, BOOL is_attribute)
 LLXMLNode (LLStringTableEntry *name, BOOL is_attribute)
BOOL isNull ()
BOOL deleteChild (LLXMLNode *child)
void addChild (LLXMLNodePtr new_parent)
void setParent (LLXMLNodePtr new_parent)
void writeToFile (FILE *fOut, LLString indent=LLString())
void writeToOstream (std::ostream &output_stream, const LLString &indent=LLString())
void findName (const LLString &name, LLXMLNodeList &results)
void findName (LLStringTableEntry *name, LLXMLNodeList &results)
void findID (const LLString &id, LLXMLNodeList &results)
virtual LLXMLNodePtr createChild (const LLString &name, BOOL is_attribute)
virtual LLXMLNodePtr createChild (LLStringTableEntry *name, BOOL is_attribute)
U32 getBoolValue (U32 expected_length, BOOL *array)
U32 getByteValue (U32 expected_length, U8 *array, Encoding encoding=ENCODING_DEFAULT)
U32 getIntValue (U32 expected_length, S32 *array, Encoding encoding=ENCODING_DEFAULT)
U32 getUnsignedValue (U32 expected_length, U32 *array, Encoding encoding=ENCODING_DEFAULT)
U32 getLongValue (U32 expected_length, U64 *array, Encoding encoding=ENCODING_DEFAULT)
U32 getFloatValue (U32 expected_length, F32 *array, Encoding encoding=ENCODING_DEFAULT)
U32 getDoubleValue (U32 expected_length, F64 *array, Encoding encoding=ENCODING_DEFAULT)
U32 getStringValue (U32 expected_length, LLString *array)
U32 getUUIDValue (U32 expected_length, LLUUID *array)
U32 getNodeRefValue (U32 expected_length, LLXMLNode **array)
BOOL hasAttribute (const LLString &name)
BOOL getAttributeBOOL (const LLString &name, BOOL &value)
BOOL getAttributeU8 (const LLString &name, U8 &value)
BOOL getAttributeS8 (const LLString &name, S8 &value)
BOOL getAttributeU16 (const LLString &name, U16 &value)
BOOL getAttributeS16 (const LLString &name, S16 &value)
BOOL getAttributeU32 (const LLString &name, U32 &value)
BOOL getAttributeS32 (const LLString &name, S32 &value)
BOOL getAttributeF32 (const LLString &name, F32 &value)
BOOL getAttributeF64 (const LLString &name, F64 &value)
BOOL getAttributeColor (const LLString &name, LLColor4 &value)
BOOL getAttributeColor4 (const LLString &name, LLColor4 &value)
BOOL getAttributeColor4U (const LLString &name, LLColor4U &value)
BOOL getAttributeVector3 (const LLString &name, LLVector3 &value)
BOOL getAttributeVector3d (const LLString &name, LLVector3d &value)
BOOL getAttributeQuat (const LLString &name, LLQuaternion &value)
BOOL getAttributeUUID (const LLString &name, LLUUID &value)
BOOL getAttributeString (const LLString &name, LLString &value)
const ValueTypegetType () const
U32 getLength () const
U32 getPrecision () const
const LLStringgetValue () const
LLString getTextContents () const
const LLStringTableEntrygetName () const
BOOL hasName (const char *name) const
BOOL hasName (LLString name) const
const LLStringgetID () const
U32 getChildCount () const
bool getChild (const LLString &name, LLXMLNodePtr &node, BOOL use_default_if_missing=TRUE)
bool getChild (const LLStringTableEntry *name, LLXMLNodePtr &node, BOOL use_default_if_missing=TRUE)
void getChildren (const LLString &name, LLXMLNodeList &children, BOOL use_default_if_missing=TRUE) const
void getChildren (const LLStringTableEntry *name, LLXMLNodeList &children, BOOL use_default_if_missing=TRUE) const
bool getAttribute (const LLString &name, LLXMLNodePtr &node, BOOL use_default_if_missing=TRUE)
bool getAttribute (const LLStringTableEntry *name, LLXMLNodePtr &node, BOOL use_default_if_missing=TRUE)
LLXMLNodePtr getFirstChild ()
LLXMLNodePtr getNextSibling ()
LLXMLNodePtr getRoot ()
bool setAttributeString (const LLString &attr, const LLString &value)
void setBoolValue (const BOOL value)
void setByteValue (const U8 value, Encoding encoding=ENCODING_DEFAULT)
void setIntValue (const S32 value, Encoding encoding=ENCODING_DEFAULT)
void setUnsignedValue (const U32 value, Encoding encoding=ENCODING_DEFAULT)
void setLongValue (const U64 value, Encoding encoding=ENCODING_DEFAULT)
void setFloatValue (const F32 value, Encoding encoding=ENCODING_DEFAULT, U32 precision=0)
void setDoubleValue (const F64 value, Encoding encoding=ENCODING_DEFAULT, U32 precision=0)
void setStringValue (const LLString value)
void setUUIDValue (const LLUUID value)
void setNodeRefValue (const LLXMLNode *value)
void setBoolValue (U32 length, const BOOL *array)
void setByteValue (U32 length, const U8 *array, Encoding encoding=ENCODING_DEFAULT)
void setIntValue (U32 length, const S32 *array, Encoding encoding=ENCODING_DEFAULT)
void setUnsignedValue (U32 length, const U32 *array, Encoding encoding=ENCODING_DEFAULT)
void setLongValue (U32 length, const U64 *array, Encoding encoding=ENCODING_DEFAULT)
void setFloatValue (U32 length, const F32 *array, Encoding encoding=ENCODING_DEFAULT, U32 precision=0)
void setDoubleValue (U32 length, const F64 *array, Encoding encoding=ENCODING_DEFAULT, U32 precision=0)
void setStringValue (U32 length, const LLString *array)
void setUUIDValue (U32 length, const LLUUID *array)
void setNodeRefValue (U32 length, const LLXMLNode **array)
void setValue (const LLString &value)
void setName (const LLString &name)
void setName (LLStringTableEntry *name)
void setDefault (LLXMLNode *default_node)
void findDefault (LLXMLNode *defaults_list)
void updateDefault ()
void scrubToTree (LLXMLNode *tree)
BOOL deleteChildren (const LLString &name)
BOOL deleteChildren (LLStringTableEntry *name)
void setAttributes (ValueType type, U32 precision, Encoding encoding, U32 length)
void appendValue (const LLString &value)
void createUnitTest (S32 max_num_children)
BOOL performUnitTest (LLString &error_buffer)

Static Public Member Functions

static bool parseFile (LLString filename, LLXMLNodePtr &node, LLXMLNode *defaults_tree)
static bool parseBuffer (U8 *buffer, U32 length, LLXMLNodePtr &node, LLXMLNode *defaults)
static bool parseStream (std::istream &str, LLXMLNodePtr &node, LLXMLNode *defaults)
static bool updateNode (LLXMLNodePtr &node, LLXMLNodePtr &update_node)
static void writeHeaderToFile (FILE *fOut)
static LLString escapeXML (const LLString &xml)

Public Attributes

LLString mID
XML_Parser * mParser
BOOL mIsAttribute
U32 mVersionMajor
U32 mVersionMinor
U32 mLength
U32 mPrecision
ValueType mType
Encoding mEncoding
LLXMLNodemParent
LLXMLChildrenmChildren
LLXMLAttribList mAttributes
LLXMLNodePtr mPrev
LLXMLNodePtr mNext

Static Public Attributes

static BOOL sStripEscapedStrings = TRUE
static BOOL sStripWhitespaceValues = FALSE

Protected Member Functions

 ~LLXMLNode ()
BOOL removeChild (LLXMLNode *child)
BOOL isFullyDefault ()

Static Protected Member Functions

static const char * skipWhitespace (const char *str)
static const char * skipNonWhitespace (const char *str)
static const char * parseInteger (const char *str, U64 *dest, BOOL *is_negative, U32 precision, Encoding encoding)
static const char * parseFloat (const char *str, F64 *dest, U32 precision, Encoding encoding)

Protected Attributes

LLStringTableEntrymName
LLString mValue
LLXMLNodePtr mDefault

Detailed Description

Definition at line 80 of file llxmlnode.h.


Member Enumeration Documentation

enum LLXMLNode::Encoding

Enumerator:
ENCODING_DEFAULT 
ENCODING_DECIMAL 
ENCODING_HEX 

Definition at line 95 of file llxmlnode.h.

enum LLXMLNode::ValueType

Enumerator:
TYPE_CONTAINER 
TYPE_UNKNOWN 
TYPE_BOOLEAN 
TYPE_INTEGER 
TYPE_FLOAT 
TYPE_STRING 
TYPE_UUID 
TYPE_NODEREF 

Definition at line 83 of file llxmlnode.h.


Constructor & Destructor Documentation

LLXMLNode::~LLXMLNode (  )  [protected]

Definition at line 108 of file llxmlnode.cpp.

References LLXMLChildren::head, llassert, LLXMLChildren::map, mAttributes, mChildren, mDefault, mParent, NULL, and LLXMLChildren::tail.

LLXMLNode::LLXMLNode (  ) 

Definition at line 56 of file llxmlnode.cpp.

Referenced by createChild(), getAttribute(), getChild(), parseBuffer(), parseFile(), and parseStream().

LLXMLNode::LLXMLNode ( const LLString name,
BOOL  is_attribute 
)

Definition at line 73 of file llxmlnode.cpp.

References LLStringTable::addStringEntry(), gStringTable, and mName.

LLXMLNode::LLXMLNode ( LLStringTableEntry name,
BOOL  is_attribute 
)

Definition at line 90 of file llxmlnode.cpp.


Member Function Documentation

void LLXMLNode::addChild ( LLXMLNodePtr  new_parent  ) 

Definition at line 201 of file llxmlnode.cpp.

References LLXMLChildren::head, LLXMLChildren::map, mAttributes, mChildren, NULL, and LLXMLChildren::tail.

Referenced by createChild(), setName(), and StartXMLNode().

void LLXMLNode::appendValue ( const LLString value  ) 

Definition at line 2515 of file llxmlnode.cpp.

References mValue.

LLXMLNodePtr LLXMLNode::createChild ( LLStringTableEntry name,
BOOL  is_attribute 
) [virtual]

Definition at line 245 of file llxmlnode.cpp.

References addChild(), LLXMLNode(), and mID.

LLXMLNodePtr LLXMLNode::createChild ( const LLString name,
BOOL  is_attribute 
) [virtual]

Definition at line 239 of file llxmlnode.cpp.

References LLStringTable::addStringEntry(), and gStringTable.

Referenced by createUnitTest(), LLSaleInfo::exportFileXML(), LLPermissions::exportFileXML(), LLInventoryItem::exportFileXML(), LLVolumeXml::exportPathParams(), and LLVolumeXml::exportProfileParams().

void LLXMLNode::createUnitTest ( S32  max_num_children  ) 

Definition at line 2565 of file llxmlnode.cpp.

References createChild(), createUnitTest(), ENCODING_DECIMAL, ENCODING_HEX, FALSE, get_rand(), get_rand_node(), getRoot(), LLUUID::mData, mID, mName, LLStringTableEntry::mString, S32, setBoolValue(), setDoubleValue(), setFloatValue(), setLongValue(), setNodeRefValue(), setStringValue(), setUnsignedValue(), setUUIDValue(), TRUE, type, and UUID_BYTES.

Referenced by createUnitTest().

BOOL LLXMLNode::deleteChild ( LLXMLNode child  ) 

Definition at line 253 of file llxmlnode.cpp.

References FALSE, removeChild(), and TRUE.

Referenced by deleteChildren().

BOOL LLXMLNode::deleteChildren ( LLStringTableEntry name  ) 

Definition at line 2464 of file llxmlnode.cpp.

References deleteChild(), FALSE, findName(), and TRUE.

BOOL LLXMLNode::deleteChildren ( const LLString name  ) 

Definition at line 2442 of file llxmlnode.cpp.

References deleteChild(), FALSE, findName(), and TRUE.

LLString LLXMLNode::escapeXML ( const LLString xml  )  [static]

Definition at line 2328 of file llxmlnode.cpp.

References c, and i.

Referenced by LLView::escapeXML(), setStringValue(), and writeToOstream().

void LLXMLNode::findDefault ( LLXMLNode defaults_list  ) 

Definition at line 2419 of file llxmlnode.cpp.

References getChildren(), mDefault, mName, LLStringTableEntry::mString, mVersionMajor, mVersionMinor, and NULL.

Referenced by updateDefault().

void LLXMLNode::findID ( const LLString id,
LLXMLNodeList results 
)

Definition at line 955 of file llxmlnode.cpp.

References LLXMLChildren::map, mChildren, and mID.

void LLXMLNode::findName ( LLStringTableEntry name,
LLXMLNodeList results 
)

Definition at line 936 of file llxmlnode.cpp.

References LLXMLChildren::map, mChildren, and mName.

void LLXMLNode::findName ( const LLString name,
LLXMLNodeList results 
)

Definition at line 916 of file llxmlnode.cpp.

References LLStringTable::checkStringEntry(), gStringTable, LLXMLChildren::map, mChildren, and mName.

Referenced by deleteChildren().

bool LLXMLNode::getAttribute ( const LLStringTableEntry name,
LLXMLNodePtr node,
BOOL  use_default_if_missing = TRUE 
)

Definition at line 1078 of file llxmlnode.cpp.

References FALSE, LLPointer< Type >::isNull(), LLXMLNode(), mAttributes, and mDefault.

bool LLXMLNode::getAttribute ( const LLString name,
LLXMLNodePtr node,
BOOL  use_default_if_missing = TRUE 
)

Definition at line 1073 of file llxmlnode.cpp.

References LLStringTable::checkStringEntry(), and gStringTable.

Referenced by getAttributeBOOL(), getAttributeColor(), getAttributeColor4(), getAttributeColor4U(), getAttributeF32(), getAttributeF64(), getAttributeQuat(), getAttributeS16(), getAttributeS32(), getAttributeS8(), getAttributeString(), getAttributeU16(), getAttributeU32(), getAttributeU8(), getAttributeUUID(), getAttributeVector3(), getAttributeVector3d(), hasAttribute(), and performUnitTest().

BOOL LLXMLNode::getAttributeBOOL ( const LLString name,
BOOL value 
)

Definition at line 1113 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeColor ( const LLString name,
LLColor4 value 
)

Definition at line 1185 of file llxmlnode.cpp.

References getAttribute(), and LLColor4::mV.

BOOL LLXMLNode::getAttributeColor4 ( const LLString name,
LLColor4 value 
)

Definition at line 1191 of file llxmlnode.cpp.

References getAttribute(), and LLColor4::mV.

BOOL LLXMLNode::getAttributeColor4U ( const LLString name,
LLColor4U value 
)

Definition at line 1197 of file llxmlnode.cpp.

References getAttribute(), and LLColor4U::mV.

BOOL LLXMLNode::getAttributeF32 ( const LLString name,
F32 value 
)

Definition at line 1173 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeF64 ( const LLString name,
F64 value 
)

Definition at line 1179 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeQuat ( const LLString name,
LLQuaternion value 
)

Definition at line 1215 of file llxmlnode.cpp.

References getAttribute(), and LLQuaternion::mQ.

BOOL LLXMLNode::getAttributeS16 ( const LLString name,
S16 value 
)

Definition at line 1149 of file llxmlnode.cpp.

References getAttribute(), and S32.

BOOL LLXMLNode::getAttributeS32 ( const LLString name,
S32 value 
)

Definition at line 1167 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeS8 ( const LLString name,
S8 value 
)

Definition at line 1125 of file llxmlnode.cpp.

References getAttribute(), and S32.

BOOL LLXMLNode::getAttributeString ( const LLString name,
LLString value 
)

Definition at line 1227 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeU16 ( const LLString name,
U16 value 
)

Definition at line 1137 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeU32 ( const LLString name,
U32 value 
)

Definition at line 1161 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeU8 ( const LLString name,
U8 value 
)

Definition at line 1119 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeUUID ( const LLString name,
LLUUID value 
)

Definition at line 1221 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::getAttributeVector3 ( const LLString name,
LLVector3 value 
)

Definition at line 1203 of file llxmlnode.cpp.

References getAttribute(), and LLVector3::mV.

BOOL LLXMLNode::getAttributeVector3d ( const LLString name,
LLVector3d value 
)

Definition at line 1209 of file llxmlnode.cpp.

References getAttribute(), and LLVector3d::mdV.

U32 LLXMLNode::getBoolValue ( U32  expected_length,
BOOL array 
)

Definition at line 1529 of file llxmlnode.cpp.

References FALSE, getStringValue(), i, llassert, lldebugs, llendl, mName, LLStringTableEntry::mString, mType, LLStringBase< char >::toLower(), TRUE, TYPE_BOOLEAN, TYPE_STRING, and TYPE_UNKNOWN.

U32 LLXMLNode::getByteValue ( U32  expected_length,
U8 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 1570 of file llxmlnode.cpp.

References ENCODING_DEFAULT, i, llassert, lldebugs, llendl, llwarns, mEncoding, mLength, mName, LLStringTableEntry::mString, mType, mValue, NULL, parseInteger(), TYPE_INTEGER, and TYPE_UNKNOWN.

bool LLXMLNode::getChild ( const LLStringTableEntry name,
LLXMLNodePtr node,
BOOL  use_default_if_missing = TRUE 
)

Definition at line 1023 of file llxmlnode.cpp.

References FALSE, LLPointer< Type >::isNull(), LLXMLNode(), LLXMLChildren::map, mChildren, and mDefault.

bool LLXMLNode::getChild ( const LLString name,
LLXMLNodePtr node,
BOOL  use_default_if_missing = TRUE 
)

Definition at line 1018 of file llxmlnode.cpp.

References LLStringTable::checkStringEntry(), and gStringTable.

Referenced by LLSaleInfo::importXML(), LLPermissions::importXML(), and LLInventoryItem::importXML().

U32 LLXMLNode::getChildCount (  )  const

Definition at line 2520 of file llxmlnode.cpp.

References LLXMLChildren::map, and mChildren.

void LLXMLNode::getChildren ( const LLStringTableEntry name,
LLXMLNodeList children,
BOOL  use_default_if_missing = TRUE 
) const

Definition at line 1047 of file llxmlnode.cpp.

References FALSE, LLPointer< Type >::isNull(), LLXMLChildren::map, mChildren, and mDefault.

void LLXMLNode::getChildren ( const LLString name,
LLXMLNodeList children,
BOOL  use_default_if_missing = TRUE 
) const

Definition at line 1042 of file llxmlnode.cpp.

References LLStringTable::checkStringEntry(), and gStringTable.

Referenced by findDefault(), and getTextContents().

U32 LLXMLNode::getDoubleValue ( U32  expected_length,
F64 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 1830 of file llxmlnode.cpp.

References ENCODING_DEFAULT, i, llassert, lldebugs, llendl, llwarns, mEncoding, mLength, mName, LLStringTableEntry::mString, mType, mValue, NULL, parseFloat(), TYPE_FLOAT, and TYPE_UNKNOWN.

LLXMLNodePtr LLXMLNode::getFirstChild (  ) 

Definition at line 3011 of file llxmlnode.cpp.

References LLXMLChildren::head, mChildren, and NULL.

Referenced by writeToOstream().

U32 LLXMLNode::getFloatValue ( U32  expected_length,
F32 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 1785 of file llxmlnode.cpp.

References ENCODING_DEFAULT, i, llassert, lldebugs, llendl, llwarns, mEncoding, mLength, mName, LLStringTableEntry::mString, mType, mValue, NULL, parseFloat(), TYPE_FLOAT, and TYPE_UNKNOWN.

const LLString& LLXMLNode::getID (  )  const [inline]

Definition at line 188 of file llxmlnode.h.

References mID.

U32 LLXMLNode::getIntValue ( U32  expected_length,
S32 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 1623 of file llxmlnode.cpp.

References ENCODING_DEFAULT, i, llassert, lldebugs, llendl, llwarns, mEncoding, mLength, mName, LLStringTableEntry::mString, mType, mValue, NULL, parseInteger(), S32, TYPE_INTEGER, and TYPE_UNKNOWN.

U32 LLXMLNode::getLength (  )  const [inline]

Definition at line 181 of file llxmlnode.h.

References mLength.

U32 LLXMLNode::getLongValue ( U32  expected_length,
U64 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 1731 of file llxmlnode.cpp.

References ENCODING_DEFAULT, i, llassert, lldebugs, llendl, llwarns, mEncoding, mLength, mName, LLStringTableEntry::mString, mType, mValue, NULL, parseInteger(), TYPE_INTEGER, and TYPE_UNKNOWN.

const LLStringTableEntry* LLXMLNode::getName ( void   )  const [inline]

Definition at line 185 of file llxmlnode.h.

References mName.

Referenced by LLSaleInfo::importXML(), LLPermissions::importXML(), and LLInventoryItem::importXML().

LLXMLNodePtr LLXMLNode::getNextSibling (  ) 

Definition at line 3018 of file llxmlnode.cpp.

References mNext.

U32 LLXMLNode::getNodeRefValue ( U32  expected_length,
LLXMLNode **  array 
)

Definition at line 1968 of file llxmlnode.cpp.

References getRoot(), getStringValue(), llassert, llendl, llwarns, mType, TYPE_NODEREF, and TYPE_UNKNOWN.

U32 LLXMLNode::getPrecision (  )  const [inline]

Definition at line 182 of file llxmlnode.h.

References mPrecision.

LLXMLNodePtr LLXMLNode::getRoot (  ) 

Definition at line 1238 of file llxmlnode.cpp.

References getRoot(), mParent, and NULL.

Referenced by createUnitTest(), getNodeRefValue(), and getRoot().

U32 LLXMLNode::getStringValue ( U32  expected_length,
LLString array 
)

Definition at line 1875 of file llxmlnode.cpp.

References llassert, lldebugs, llendl, llwarns, m, mLength, mName, LLStringTableEntry::mString, mValue, and n.

Referenced by getBoolValue(), and getNodeRefValue().

LLString LLXMLNode::getTextContents (  )  const

Definition at line 3024 of file llxmlnode.cpp.

References end, getChildren(), m, mValue, n, p, S32, start, t, and utf8str_removeCRLF().

Referenced by writeToOstream().

const ValueType& LLXMLNode::getType (  )  const [inline]

Definition at line 180 of file llxmlnode.h.

References mType.

U32 LLXMLNode::getUnsignedValue ( U32  expected_length,
U32 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 1676 of file llxmlnode.cpp.

References ENCODING_DEFAULT, i, llassert, lldebugs, llendl, llwarns, mEncoding, mLength, mName, LLStringTableEntry::mString, mType, mValue, NULL, parseInteger(), TYPE_INTEGER, and TYPE_UNKNOWN.

U32 LLXMLNode::getUUIDValue ( U32  expected_length,
LLUUID array 
)

Definition at line 1924 of file llxmlnode.cpp.

References i, llassert, lldebugs, llendl, mName, LLStringTableEntry::mString, mType, mValue, LLUUID::parseUUID(), skipWhitespace(), TYPE_UNKNOWN, TYPE_UUID, and UUID_STR_LENGTH.

const LLString& LLXMLNode::getValue (  )  const [inline]

Definition at line 183 of file llxmlnode.h.

References mValue.

Referenced by EndXMLNode(), and XMLData().

BOOL LLXMLNode::hasAttribute ( const LLString name  ) 

Definition at line 1107 of file llxmlnode.cpp.

References getAttribute().

BOOL LLXMLNode::hasName ( LLString  name  )  const [inline]

Definition at line 187 of file llxmlnode.h.

References LLStringTable::checkStringEntry(), gStringTable, and mName.

BOOL LLXMLNode::hasName ( const char *  name  )  const [inline]

Definition at line 186 of file llxmlnode.h.

References LLStringTable::checkStringEntry(), gStringTable, and mName.

BOOL LLXMLNode::isFullyDefault (  )  [protected]

Definition at line 704 of file llxmlnode.cpp.

References FALSE, LLPointer< Type >::isNull(), mChildren, mDefault, mEncoding, mIsAttribute, mLength, mPrecision, mType, mValue, and TRUE.

Referenced by writeToFile(), and writeToOstream().

BOOL LLXMLNode::isNull (  ) 

Definition at line 138 of file llxmlnode.cpp.

References mName, and NULL.

bool LLXMLNode::parseBuffer ( U8 buffer,
U32  length,
LLXMLNodePtr node,
LLXMLNode defaults 
) [static]

Definition at line 596 of file llxmlnode.cpp.

References EndXMLNode(), FALSE, llendl, llwarns, LLXMLNode(), NULL, setDefault(), StartXMLNode(), TRUE, updateDefault(), and XMLData().

Referenced by parseFile().

bool LLXMLNode::parseFile ( LLString  filename,
LLXMLNodePtr node,
LLXMLNode defaults_tree 
) [static]

Definition at line 569 of file llxmlnode.cpp.

References LLFile::fopen(), LLXMLNode(), NULL, and parseBuffer().

Referenced by LLUICtrlFactory::getLayeredXMLNode(), idle_startup(), LLFloaterImport::LLFloaterImport(), and LLUICtrlFactory::setupPaths().

const char * LLXMLNode::parseFloat ( const char *  str,
F64 dest,
U32  precision,
Encoding  encoding 
) [static, protected]

Definition at line 1361 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_DEFAULT, ENCODING_HEX, float_coeff_table, float_coeff_table_2, NULL, parseInteger(), and skipWhitespace().

Referenced by getDoubleValue(), and getFloatValue().

const char * LLXMLNode::parseInteger ( const char *  str,
U64 dest,
BOOL is_negative,
U32  precision,
Encoding  encoding 
) [static, protected]

Definition at line 1264 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_DEFAULT, ENCODING_HEX, FALSE, NULL, skipNonWhitespace(), skipWhitespace(), and TRUE.

Referenced by getByteValue(), getIntValue(), getLongValue(), getUnsignedValue(), and parseFloat().

bool LLXMLNode::parseStream ( std::istream &  str,
LLXMLNodePtr node,
LLXMLNode defaults 
) [static]

Definition at line 645 of file llxmlnode.cpp.

References BUFSIZE, count, EndXMLNode(), FALSE, llendl, llwarns, LLXMLNode(), NULL, setDefault(), StartXMLNode(), updateDefault(), and XMLData().

BOOL LLXMLNode::performUnitTest ( LLString error_buffer  ) 

Definition at line 2750 of file llxmlnode.cpp.

References LLUUID::asString(), ENCODING_HEX, FALSE, getAttribute(), llformat(), LLXMLChildren::map, mChildren, LLUUID::mData, mName, LLStringTableEntry::mString, S32, TRUE, TYPE_BOOLEAN, TYPE_CONTAINER, TYPE_FLOAT, TYPE_INTEGER, TYPE_NODEREF, TYPE_STRING, TYPE_UNKNOWN, TYPE_UUID, and UUID_BYTES.

BOOL LLXMLNode::removeChild ( LLXMLNode child  )  [protected]

Definition at line 144 of file llxmlnode.cpp.

References FALSE, LLXMLChildren::head, LLXMLChildren::map, mAttributes, mChildren, mIsAttribute, mName, mNext, mParent, mPrev, LLPointer< Type >::notNull(), NULL, and TRUE.

Referenced by deleteChild(), and setName().

void LLXMLNode::scrubToTree ( LLXMLNode tree  ) 

Definition at line 974 of file llxmlnode.cpp.

References LLXMLChildren::map, mChildren, and NULL.

void LLXMLNode::setAttributes ( ValueType  type,
U32  precision,
Encoding  encoding,
U32  length 
)

Definition at line 2486 of file llxmlnode.cpp.

References mEncoding, mLength, mPrecision, and mType.

bool LLXMLNode::setAttributeString ( const LLString attr,
const LLString value 
)

Definition at line 1094 of file llxmlnode.cpp.

References LLStringTable::checkStringEntry(), gStringTable, and mAttributes.

void LLXMLNode::setBoolValue ( U32  length,
const BOOL array 
)

Definition at line 2014 of file llxmlnode.cpp.

References ENCODING_DEFAULT, llformat(), mEncoding, mLength, mType, mValue, and TYPE_BOOLEAN.

void LLXMLNode::setBoolValue ( const BOOL  value  )  [inline]

Definition at line 211 of file llxmlnode.h.

Referenced by createUnitTest().

void LLXMLNode::setByteValue ( U32  length,
const U8 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 2037 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_DEFAULT, ENCODING_HEX, llformat(), mEncoding, mLength, mPrecision, mType, mValue, and TYPE_INTEGER.

void LLXMLNode::setByteValue ( const U8  value,
Encoding  encoding = ENCODING_DEFAULT 
) [inline]

Definition at line 212 of file llxmlnode.h.

void LLXMLNode::setDefault ( LLXMLNode default_node  ) 

Definition at line 2414 of file llxmlnode.cpp.

References mDefault.

Referenced by parseBuffer(), and parseStream().

void LLXMLNode::setDoubleValue ( U32  length,
const F64 array,
Encoding  encoding = ENCODING_DEFAULT,
U32  precision = 0 
)

Definition at line 2276 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_DEFAULT, ENCODING_HEX, llformat(), mEncoding, mLength, mPrecision, mType, mValue, setLongValue(), and TYPE_FLOAT.

void LLXMLNode::setDoubleValue ( const F64  value,
Encoding  encoding = ENCODING_DEFAULT,
U32  precision = 0 
) [inline]

Definition at line 217 of file llxmlnode.h.

Referenced by createUnitTest().

void LLXMLNode::setFloatValue ( U32  length,
const F32 array,
Encoding  encoding = ENCODING_DEFAULT,
U32  precision = 0 
)

Definition at line 2225 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_DEFAULT, ENCODING_HEX, llformat(), mEncoding, mLength, mPrecision, mType, mValue, setUnsignedValue(), and TYPE_FLOAT.

void LLXMLNode::setFloatValue ( const F32  value,
Encoding  encoding = ENCODING_DEFAULT,
U32  precision = 0 
) [inline]

Definition at line 216 of file llxmlnode.h.

Referenced by createUnitTest().

void LLXMLNode::setIntValue ( U32  length,
const S32 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 2080 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_DEFAULT, ENCODING_HEX, llformat(), mEncoding, mLength, mPrecision, mType, mValue, and TYPE_INTEGER.

void LLXMLNode::setIntValue ( const S32  value,
Encoding  encoding = ENCODING_DEFAULT 
) [inline]

Definition at line 213 of file llxmlnode.h.

void LLXMLNode::setLongValue ( U32  length,
const U64 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 2176 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_DEFAULT, ENCODING_HEX, llformat(), mEncoding, mLength, mPrecision, mType, mValue, PU64, and TYPE_INTEGER.

void LLXMLNode::setLongValue ( const U64  value,
Encoding  encoding = ENCODING_DEFAULT 
) [inline]

Definition at line 215 of file llxmlnode.h.

Referenced by createUnitTest(), and setDoubleValue().

void LLXMLNode::setName ( LLStringTableEntry name  ) 

Definition at line 2499 of file llxmlnode.cpp.

References addChild(), mName, mParent, and removeChild().

void LLXMLNode::setName ( const LLString name  ) 

Definition at line 2494 of file llxmlnode.cpp.

References LLStringTable::addStringEntry(), and gStringTable.

void LLXMLNode::setNodeRefValue ( U32  length,
const LLXMLNode **  array 
)

Definition at line 2381 of file llxmlnode.cpp.

References ENCODING_DEFAULT, mEncoding, mID, mLength, mType, mValue, and TYPE_NODEREF.

void LLXMLNode::setNodeRefValue ( const LLXMLNode value  )  [inline]

Definition at line 220 of file llxmlnode.h.

Referenced by createUnitTest().

void LLXMLNode::setParent ( LLXMLNodePtr  new_parent  ) 

Definition at line 262 of file llxmlnode.cpp.

References mParent, LLPointer< Type >::notNull(), and NULL.

Referenced by LLInventoryItem::exportFileXML().

void LLXMLNode::setStringValue ( U32  length,
const LLString array 
)

Definition at line 2347 of file llxmlnode.cpp.

References ENCODING_DEFAULT, escapeXML(), mEncoding, mLength, mType, mValue, and TYPE_STRING.

void LLXMLNode::setStringValue ( const LLString  value  )  [inline]

Definition at line 218 of file llxmlnode.h.

Referenced by createUnitTest().

void LLXMLNode::setUnsignedValue ( U32  length,
const U32 array,
Encoding  encoding = ENCODING_DEFAULT 
)

Definition at line 2127 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_DEFAULT, ENCODING_HEX, llformat(), mEncoding, mLength, mPrecision, mType, mValue, and TYPE_INTEGER.

void LLXMLNode::setUnsignedValue ( const U32  value,
Encoding  encoding = ENCODING_DEFAULT 
) [inline]

Definition at line 214 of file llxmlnode.h.

Referenced by createUnitTest(), and setFloatValue().

void LLXMLNode::setUUIDValue ( U32  length,
const LLUUID array 
)

Definition at line 2364 of file llxmlnode.cpp.

References LLUUID::asString(), ENCODING_DEFAULT, mEncoding, mLength, mType, mValue, and TYPE_UUID.

void LLXMLNode::setUUIDValue ( const LLUUID  value  )  [inline]

Definition at line 219 of file llxmlnode.h.

Referenced by createUnitTest().

void LLXMLNode::setValue ( const LLString value  ) 

Definition at line 2405 of file llxmlnode.cpp.

References mType, mValue, TYPE_CONTAINER, and TYPE_UNKNOWN.

Referenced by EndXMLNode(), and XMLData().

const char * LLXMLNode::skipNonWhitespace ( const char *  str  )  [static, protected]

Definition at line 1256 of file llxmlnode.cpp.

Referenced by parseInteger().

const char * LLXMLNode::skipWhitespace ( const char *  str  )  [static, protected]

Definition at line 1248 of file llxmlnode.cpp.

Referenced by getUUIDValue(), parseFloat(), and parseInteger().

void LLXMLNode::updateDefault (  ) 

Definition at line 280 of file llxmlnode.cpp.

References findDefault(), LLPointer< Type >::isNull(), LLXMLChildren::map, mChildren, mDefault, mParent, and NULL.

Referenced by parseBuffer(), and parseStream().

bool LLXMLNode::updateNode ( LLXMLNodePtr node,
LLXMLNodePtr update_node 
) [static]

Definition at line 499 of file llxmlnode.cpp.

References FALSE, llendl, llwarns, LLPointer< Type >::notNull(), and TRUE.

Referenced by LLUICtrlFactory::getLayeredXMLNode().

void LLXMLNode::writeHeaderToFile ( FILE *  fOut  )  [static]

Definition at line 744 of file llxmlnode.cpp.

void LLXMLNode::writeToFile ( FILE *  fOut,
LLString  indent = LLString() 
)

Definition at line 749 of file llxmlnode.cpp.

References isFullyDefault(), llendl, llwarns, and writeToOstream().

void LLXMLNode::writeToOstream ( std::ostream &  output_stream,
const LLString indent = LLString() 
)

Definition at line 766 of file llxmlnode.cpp.

References ENCODING_DECIMAL, ENCODING_HEX, escapeXML(), FALSE, getFirstChild(), getTextContents(), isFullyDefault(), LLPointer< Type >::isNull(), llformat(), mAttributes, MAX_COLUMN_WIDTH, mChildren, mDefault, mEncoding, mID, mLength, mName, mPrecision, LLStringTableEntry::mString, mType, mValue, mVersionMajor, mVersionMinor, S32, TYPE_BOOLEAN, TYPE_FLOAT, TYPE_INTEGER, TYPE_NODEREF, TYPE_STRING, and TYPE_UUID.

Referenced by writeToFile().


Member Data Documentation

LLXMLAttribList LLXMLNode::mAttributes

Definition at line 278 of file llxmlnode.h.

Referenced by addChild(), getAttribute(), removeChild(), setAttributeString(), writeToOstream(), and ~LLXMLNode().

LLXMLChildren* LLXMLNode::mChildren

Definition at line 277 of file llxmlnode.h.

Referenced by addChild(), findID(), findName(), get_rand_node(), getChild(), getChildCount(), getChildren(), getFirstChild(), isFullyDefault(), performUnitTest(), removeChild(), scrubToTree(), updateDefault(), writeToOstream(), and ~LLXMLNode().

LLXMLNodePtr LLXMLNode::mDefault [protected]

Definition at line 289 of file llxmlnode.h.

Referenced by findDefault(), getAttribute(), getChild(), getChildren(), isFullyDefault(), setDefault(), updateDefault(), writeToOstream(), and ~LLXMLNode().

Encoding LLXMLNode::mEncoding

Definition at line 274 of file llxmlnode.h.

Referenced by getByteValue(), getDoubleValue(), getFloatValue(), getIntValue(), getLongValue(), getUnsignedValue(), isFullyDefault(), setAttributes(), setBoolValue(), setByteValue(), setDoubleValue(), setFloatValue(), setIntValue(), setLongValue(), setNodeRefValue(), setStringValue(), setUnsignedValue(), setUUIDValue(), and writeToOstream().

LLString LLXMLNode::mID

Definition at line 264 of file llxmlnode.h.

Referenced by createChild(), createUnitTest(), findID(), getID(), setNodeRefValue(), and writeToOstream().

BOOL LLXMLNode::mIsAttribute

Definition at line 268 of file llxmlnode.h.

Referenced by isFullyDefault(), and removeChild().

U32 LLXMLNode::mLength

Definition at line 271 of file llxmlnode.h.

Referenced by getByteValue(), getDoubleValue(), getFloatValue(), getIntValue(), getLength(), getLongValue(), getStringValue(), getUnsignedValue(), isFullyDefault(), setAttributes(), setBoolValue(), setByteValue(), setDoubleValue(), setFloatValue(), setIntValue(), setLongValue(), setNodeRefValue(), setStringValue(), setUnsignedValue(), setUUIDValue(), and writeToOstream().

LLStringTableEntry* LLXMLNode::mName [protected]

Definition at line 286 of file llxmlnode.h.

Referenced by createUnitTest(), findDefault(), findName(), getBoolValue(), getByteValue(), getDoubleValue(), getFloatValue(), getIntValue(), getLongValue(), getName(), getStringValue(), getUnsignedValue(), getUUIDValue(), hasName(), isNull(), LLXMLNode(), performUnitTest(), removeChild(), setName(), and writeToOstream().

LLXMLNodePtr LLXMLNode::mNext

Definition at line 280 of file llxmlnode.h.

Referenced by getNextSibling(), and removeChild().

LLXMLNode* LLXMLNode::mParent

Definition at line 276 of file llxmlnode.h.

Referenced by EndXMLNode(), getRoot(), removeChild(), setName(), setParent(), updateDefault(), and ~LLXMLNode().

XML_Parser* LLXMLNode::mParser

Definition at line 266 of file llxmlnode.h.

Referenced by EndXMLNode(), and StartXMLNode().

U32 LLXMLNode::mPrecision

Definition at line 272 of file llxmlnode.h.

Referenced by getPrecision(), isFullyDefault(), setAttributes(), setByteValue(), setDoubleValue(), setFloatValue(), setIntValue(), setLongValue(), setUnsignedValue(), and writeToOstream().

LLXMLNodePtr LLXMLNode::mPrev

Definition at line 279 of file llxmlnode.h.

Referenced by removeChild().

ValueType LLXMLNode::mType

Definition at line 273 of file llxmlnode.h.

Referenced by getBoolValue(), getByteValue(), getDoubleValue(), getFloatValue(), getIntValue(), getLongValue(), getNodeRefValue(), getType(), getUnsignedValue(), getUUIDValue(), isFullyDefault(), setAttributes(), setBoolValue(), setByteValue(), setDoubleValue(), setFloatValue(), setIntValue(), setLongValue(), setNodeRefValue(), setStringValue(), setUnsignedValue(), setUUIDValue(), setValue(), and writeToOstream().

LLString LLXMLNode::mValue [protected]

Definition at line 287 of file llxmlnode.h.

Referenced by appendValue(), getByteValue(), getDoubleValue(), getFloatValue(), getIntValue(), getLongValue(), getStringValue(), getTextContents(), getUnsignedValue(), getUUIDValue(), getValue(), isFullyDefault(), setBoolValue(), setByteValue(), setDoubleValue(), setFloatValue(), setIntValue(), setLongValue(), setNodeRefValue(), setStringValue(), setUnsignedValue(), setUUIDValue(), setValue(), and writeToOstream().

U32 LLXMLNode::mVersionMajor

Definition at line 269 of file llxmlnode.h.

Referenced by findDefault(), and writeToOstream().

U32 LLXMLNode::mVersionMinor

Definition at line 270 of file llxmlnode.h.

Referenced by findDefault(), and writeToOstream().

BOOL LLXMLNode::sStripEscapedStrings = TRUE [static]

Definition at line 282 of file llxmlnode.h.

Referenced by XMLData().

BOOL LLXMLNode::sStripWhitespaceValues = FALSE [static]

Definition at line 283 of file llxmlnode.h.

Referenced by EndXMLNode().


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