llnamevalue.cpp File Reference

class for defining name value pairs. More...

#include "linden_common.h"
#include <map>
#include "llnamevalue.h"
#include "u64.h"
#include "llstring.h"
#include "llcamera.h"

Include dependency graph for llnamevalue.cpp:

Go to the source code of this file.

Classes

struct  user_callback_t

Typedefs

typedef std::map< char *,
user_callback_t
user_callback_map_t

Enumerations

enum  { NV_BUFFER_LEN = 2048, U64_BUFFER_LEN = 64 }

Functions

void add_use_callback (char *name, TNameValueCallback ucb, void **user_data)
std::ostream & operator<< (std::ostream &s, const LLNameValue &a)
LLNameValueoperator+ (const LLNameValue &a, const LLNameValue &b)
LLNameValueoperator- (const LLNameValue &a, const LLNameValue &b)
LLNameValueoperator * (const LLNameValue &a, const LLNameValue &b)
LLNameValueoperator/ (const LLNameValue &a, const LLNameValue &b)
LLNameValueoperator% (const LLNameValue &a, const LLNameValue &b)
LLNameValueoperator * (const LLNameValue &a, F32 k)
LLNameValueoperator * (F32 k, const LLNameValue &a)
bool operator== (const LLNameValue &a, const LLNameValue &b)
bool operator<= (const LLNameValue &a, const LLNameValue &b)
bool operator>= (const LLNameValue &a, const LLNameValue &b)
bool operator< (const LLNameValue &a, const LLNameValue &b)
bool operator> (const LLNameValue &a, const LLNameValue &b)
bool operator!= (const LLNameValue &a, const LLNameValue &b)
LLNameValueoperator- (const LLNameValue &a)

Variables

user_callback_map_t gUserCallbackMap
LLStringTable gNVNameTable (16384)
char NameValueTypeStrings [NVT_EOF][NAME_VALUE_TYPE_STRING_LENGTH]
char NameValueClassStrings [NVC_EOF][NAME_VALUE_CLASS_STRING_LENGTH]
char NameValueSendtoStrings [NVS_EOF][NAME_VALUE_SENDTO_STRING_LENGTH]


Detailed Description

class for defining name value pairs.

LicenseInfo
firstyear=2001&license=viewergpl

Copyright (c) 2001-2007, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llnamevalue.cpp.


Typedef Documentation

typedef std::map<char *, user_callback_t> user_callback_map_t

Definition at line 61 of file llnamevalue.cpp.


Enumeration Type Documentation

anonymous enum

Enumerator:
NV_BUFFER_LEN 
U64_BUFFER_LEN 

Definition at line 48 of file llnamevalue.cpp.


Function Documentation

void add_use_callback ( char *  name,
TNameValueCallback  ucb,
void **  user_data 
)

Definition at line 97 of file llnamevalue.cpp.

References LLStringTable::addString(), gNVNameTable, and gUserCallbackMap.

LLNameValue& operator * ( F32  k,
const LLNameValue a 
)

Definition at line 1705 of file llnamevalue.cpp.

References a, u_name_value_reference::f32, llendl, llerrs, LLNameValue::mNameValueReference, LLNameValue::mStringType, LLNameValue::mType, NameValueTypeStrings, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, and u_name_value_reference::vec3.

LLNameValue& operator * ( const LLNameValue a,
F32  k 
)

Definition at line 1665 of file llnamevalue.cpp.

References a, u_name_value_reference::f32, llendl, llerrs, LLNameValue::mNameValueReference, LLNameValue::mStringType, LLNameValue::mType, NameValueTypeStrings, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, and u_name_value_reference::vec3.

LLNameValue& operator * ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1426 of file llnamevalue.cpp.

References a, b, u_name_value_reference::f32, llendl, llerrs, LLNameValue::mNameValueReference, LLNameValue::mStringType, LLNameValue::mType, NameValueTypeStrings, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, S32, u_name_value_reference::s32, and u_name_value_reference::u32.

bool operator!= ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 2061 of file llnamevalue.cpp.

References a, b, FALSE, llendl, llerrs, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, and S32.

LLNameValue& operator% ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1604 of file llnamevalue.cpp.

References a, b, llendl, llerrs, LLNameValue::mNameValueReference, LLNameValue::mStringType, LLNameValue::mType, NameValueTypeStrings, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, S32, u_name_value_reference::s32, u_name_value_reference::u32, and u_name_value_reference::vec3.

LLNameValue& operator+ ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1223 of file llnamevalue.cpp.

References a, b, u_name_value_reference::f32, llendl, llerrs, LLNameValue::mNameValueReference, LLNameValue::mStringType, LLNameValue::mType, NameValueTypeStrings, NULL, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, u_name_value_reference::s32, S32, u_name_value_reference::string, u_name_value_reference::u32, and u_name_value_reference::vec3.

LLNameValue& operator- ( const LLNameValue a  ) 

Definition at line 2129 of file llnamevalue.cpp.

References a, u_name_value_reference::f32, llendl, llerrs, LLNameValue::mNameValueReference, LLNameValue::mStringType, LLNameValue::mType, NameValueTypeStrings, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, S32, u_name_value_reference::s32, and u_name_value_reference::vec3.

LLNameValue& operator- ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1332 of file llnamevalue.cpp.

References a, b, u_name_value_reference::f32, llendl, llerrs, LLNameValue::mNameValueReference, LLNameValue::mStringType, LLNameValue::mType, NameValueTypeStrings, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, S32, u_name_value_reference::s32, u_name_value_reference::u32, and u_name_value_reference::vec3.

LLNameValue& operator/ ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1520 of file llnamevalue.cpp.

References a, b, u_name_value_reference::f32, llendl, llerrs, LLNameValue::mNameValueReference, LLNameValue::mStringType, LLNameValue::mType, NameValueTypeStrings, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, S32, u_name_value_reference::s32, and u_name_value_reference::u32.

bool operator< ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1938 of file llnamevalue.cpp.

References a, b, FALSE, llendl, llerrs, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, and S32.

std::ostream& operator<< ( std::ostream &  s,
const LLNameValue a 
)

Definition at line 1187 of file llnamevalue.cpp.

References a, llendl, llerrs, NVT_ASSET, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_U64, NVT_VEC3, U64_BUFFER_LEN, and U64_to_str().

bool operator<= ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1815 of file llnamevalue.cpp.

References a, b, FALSE, llendl, llerrs, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, and S32.

bool operator== ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1745 of file llnamevalue.cpp.

References a, b, FALSE, llendl, llerrs, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, NVT_VEC3, and S32.

bool operator> ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 2000 of file llnamevalue.cpp.

References a, b, FALSE, llendl, llerrs, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, and S32.

bool operator>= ( const LLNameValue a,
const LLNameValue b 
)

Definition at line 1876 of file llnamevalue.cpp.

References a, b, FALSE, llendl, llerrs, NVT_F32, NVT_S32, NVT_STRING, NVT_U32, and S32.


Variable Documentation

LLStringTable gNVNameTable(16384)

Referenced by add_use_callback(), LLNameValue::baseInit(), LLViewerObject::getNVPair(), LLNameValue::init(), and LLViewerObject::removeNVPair().

user_callback_map_t gUserCallbackMap

Definition at line 62 of file llnamevalue.cpp.

Referenced by add_use_callback(), and LLNameValue::init().

char NameValueClassStrings[NVC_EOF][NAME_VALUE_CLASS_STRING_LENGTH]

Initial value:

 
{
        "NULL",
        "R",                    
        "RW",                   
        "CB"                    
}

Definition at line 79 of file llnamevalue.cpp.

Referenced by LLNameValue::baseInit(), and LLNameValue::LLNameValue().

char NameValueSendtoStrings[NVS_EOF][NAME_VALUE_SENDTO_STRING_LENGTH]

Initial value:

 
{
        "NULL",
        "S",    
        "DS",   
        "SV",   
        "DSV"   
}

Definition at line 87 of file llnamevalue.cpp.

Referenced by LLNameValue::baseInit(), and LLNameValue::LLNameValue().

char NameValueTypeStrings[NVT_EOF][NAME_VALUE_TYPE_STRING_LENGTH]

Initial value:

 
{
        "NULL",
        "STRING",
        "F32",
        "S32",
        "VEC3",
        "U32",
        "CAMERA", 
        "ASSET",
        "U64"
}

Definition at line 66 of file llnamevalue.cpp.

Referenced by LLNameValue::baseInit(), LLNameValue::init(), LLNameValue::LLNameValue(), operator *(), operator%(), operator+(), operator-(), operator/(), and tut::namevalue_test::verifyChange().


Generated on Thu Jul 1 06:10:34 2010 for Second Life Viewer by  doxygen 1.4.7