diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llmessage/llnamevalue.h | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/llmessage/llnamevalue.h')
-rw-r--r-- | linden/indra/llmessage/llnamevalue.h | 53 |
1 files changed, 19 insertions, 34 deletions
diff --git a/linden/indra/llmessage/llnamevalue.h b/linden/indra/llmessage/llnamevalue.h index c58172a..52beb07 100644 --- a/linden/indra/llmessage/llnamevalue.h +++ b/linden/indra/llmessage/llnamevalue.h | |||
@@ -32,15 +32,27 @@ | |||
32 | #ifndef LL_LLNAMEVALUE_H | 32 | #ifndef LL_LLNAMEVALUE_H |
33 | #define LL_LLNAMEVALUE_H | 33 | #define LL_LLNAMEVALUE_H |
34 | 34 | ||
35 | // As of January 2008, I believe we only use the following name-value | ||
36 | // pairs. This is hard to prove because they are initialized from | ||
37 | // strings. JC | ||
38 | // | ||
39 | // FirstName STRING | ||
40 | // LastName STRING | ||
41 | // AttachPt U32 | ||
42 | // AttachmentItemId STRING | ||
43 | // Title STRING | ||
44 | // AttachmentOffset VEC3 | ||
45 | // AttachmentOrientation VEC3 | ||
46 | // SitObject STRING | ||
47 | // SitPosition VEC3 | ||
48 | |||
35 | #include "string_table.h" | 49 | #include "string_table.h" |
36 | #include "llmath.h" | 50 | #include "llmath.h" |
37 | #include "v3math.h" | 51 | #include "v3math.h" |
38 | #include "lldbstrings.h" | 52 | #include "lldbstrings.h" |
39 | 53 | ||
40 | class LLNameValue; | 54 | class LLNameValue; |
41 | typedef void (*TNameValueCallback)(LLNameValue *changed, void **user_data); | 55 | class LLStringTable; |
42 | |||
43 | void add_use_callback(char *name, TNameValueCallback ucb, void **user_data); | ||
44 | 56 | ||
45 | typedef enum e_name_value_types | 57 | typedef enum e_name_value_types |
46 | { | 58 | { |
@@ -61,7 +73,6 @@ typedef enum e_name_value_class | |||
61 | NVC_NULL, | 73 | NVC_NULL, |
62 | NVC_READ_ONLY, | 74 | NVC_READ_ONLY, |
63 | NVC_READ_WRITE, | 75 | NVC_READ_WRITE, |
64 | NVC_CALLBACK, | ||
65 | NVC_EOF | 76 | NVC_EOF |
66 | } ENameValueClass; | 77 | } ENameValueClass; |
67 | 78 | ||
@@ -110,17 +121,13 @@ class LLNameValue | |||
110 | { | 121 | { |
111 | public: | 122 | public: |
112 | void baseInit(); | 123 | void baseInit(); |
113 | void init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto, | 124 | void init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto ); |
114 | TNameValueCallback nvcb = NULL, void **user_data = NULL); | ||
115 | 125 | ||
116 | LLNameValue(); | 126 | LLNameValue(); |
117 | LLNameValue(const char *data); | 127 | LLNameValue(const char *data); |
118 | LLNameValue(const char *name, const char *type, const char *nvclass, | 128 | LLNameValue(const char *name, const char *type, const char *nvclass ); |
119 | TNameValueCallback nvcb = NULL, void **user_data = NULL); | 129 | LLNameValue(const char *name, const char *data, const char *type, const char *nvclass ); |
120 | LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, | 130 | LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto ); |
121 | TNameValueCallback nvcb = NULL, void **user_data = NULL); | ||
122 | LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto, | ||
123 | TNameValueCallback nvcb = NULL, void **user_data = NULL); | ||
124 | 131 | ||
125 | ~LLNameValue(); | 132 | ~LLNameValue(); |
126 | 133 | ||
@@ -130,7 +137,6 @@ public: | |||
130 | S32 *getS32(); | 137 | S32 *getS32(); |
131 | void getVec3(LLVector3 &vec); | 138 | void getVec3(LLVector3 &vec); |
132 | LLVector3 *getVec3(); | 139 | LLVector3 *getVec3(); |
133 | F32 magnitude(); | ||
134 | U32 *getU32(); | 140 | U32 *getU32(); |
135 | U64 *getU64(); | 141 | U64 *getU64(); |
136 | 142 | ||
@@ -157,27 +163,8 @@ public: | |||
157 | void setVec3(const LLVector3 &a); | 163 | void setVec3(const LLVector3 &a); |
158 | void setU32(const U32 a); | 164 | void setU32(const U32 a); |
159 | 165 | ||
160 | BOOL nonzero(); | ||
161 | |||
162 | friend std::ostream& operator<<(std::ostream& s, const LLNameValue &a); | 166 | friend std::ostream& operator<<(std::ostream& s, const LLNameValue &a); |
163 | 167 | ||
164 | friend LLNameValue &operator+(const LLNameValue &a, const LLNameValue &b); | ||
165 | friend LLNameValue &operator-(const LLNameValue &a, const LLNameValue &b); | ||
166 | friend LLNameValue &operator*(const LLNameValue &a, const LLNameValue &b); | ||
167 | friend LLNameValue &operator/(const LLNameValue &a, const LLNameValue &b); | ||
168 | friend LLNameValue &operator%(const LLNameValue &a, const LLNameValue &b); | ||
169 | friend LLNameValue &operator*(const LLNameValue &a, F32 k); | ||
170 | friend LLNameValue &operator*(F32 k, const LLNameValue &a); | ||
171 | |||
172 | friend bool operator==(const LLNameValue &a, const LLNameValue &b); | ||
173 | friend bool operator<=(const LLNameValue &a, const LLNameValue &b); | ||
174 | friend bool operator>=(const LLNameValue &a, const LLNameValue &b); | ||
175 | friend bool operator<(const LLNameValue &a, const LLNameValue &b); | ||
176 | friend bool operator>(const LLNameValue &a, const LLNameValue &b); | ||
177 | friend bool operator!=(const LLNameValue &a, const LLNameValue &b); | ||
178 | |||
179 | friend LLNameValue &operator-(const LLNameValue &a); | ||
180 | |||
181 | private: | 168 | private: |
182 | void printNameValue(std::ostream& s); | 169 | void printNameValue(std::ostream& s); |
183 | 170 | ||
@@ -193,8 +180,6 @@ public: | |||
193 | 180 | ||
194 | UNameValueReference mNameValueReference; | 181 | UNameValueReference mNameValueReference; |
195 | LLStringTable *mNVNameTable; | 182 | LLStringTable *mNVNameTable; |
196 | TNameValueCallback mNameValueCB; | ||
197 | void **mUserData; | ||
198 | }; | 183 | }; |
199 | 184 | ||
200 | extern LLStringTable gNVNameTable; | 185 | extern LLStringTable gNVNameTable; |