diff options
Diffstat (limited to 'linden/indra/llmessage/lltemplatemessagebuilder.h')
-rw-r--r-- | linden/indra/llmessage/lltemplatemessagebuilder.h | 72 |
1 files changed, 50 insertions, 22 deletions
diff --git a/linden/indra/llmessage/lltemplatemessagebuilder.h b/linden/indra/llmessage/lltemplatemessagebuilder.h index ae53328..40a2f0d 100644 --- a/linden/indra/llmessage/lltemplatemessagebuilder.h +++ b/linden/indra/llmessage/lltemplatemessagebuilder.h | |||
@@ -1,3 +1,31 @@ | |||
1 | /** | ||
2 | * @file lltemplatemessagebuilder.h | ||
3 | * @brief Declaration of LLTemplateMessageBuilder class. | ||
4 | * | ||
5 | * Copyright (c) 2007-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * Second Life Viewer Source Code | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
9 | * to you under the terms of the GNU General Public License, version 2.0 | ||
10 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
11 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
12 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
13 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
14 | * | ||
15 | * There are special exceptions to the terms and conditions of the GPL as | ||
16 | * it is applied to this Source Code. View the full text of the exception | ||
17 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
18 | * online at http://secondlife.com/developers/opensource/flossexception | ||
19 | * | ||
20 | * By copying, modifying or distributing this software, you acknowledge | ||
21 | * that you have read and understood your obligations described above, | ||
22 | * and agree to abide by those obligations. | ||
23 | * | ||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
26 | * COMPLETENESS OR PERFORMANCE. | ||
27 | */ | ||
28 | |||
1 | #ifndef LL_LLTEMPLATEMESSAGEBUILDER_H | 29 | #ifndef LL_LLTEMPLATEMESSAGEBUILDER_H |
2 | #define LL_LLTEMPLATEMESSAGEBUILDER_H | 30 | #define LL_LLTEMPLATEMESSAGEBUILDER_H |
3 | 31 | ||
@@ -15,12 +43,12 @@ class LLTemplateMessageBuilder : public LLMessageBuilder | |||
15 | { | 43 | { |
16 | public: | 44 | public: |
17 | 45 | ||
18 | typedef std::map<const char *, LLMessageTemplate*> message_template_name_map_t; | 46 | typedef std::map<const char* , LLMessageTemplate*> message_template_name_map_t; |
19 | 47 | ||
20 | LLTemplateMessageBuilder(message_template_name_map_t&); | 48 | LLTemplateMessageBuilder(message_template_name_map_t&); |
21 | virtual ~LLTemplateMessageBuilder(); | 49 | virtual ~LLTemplateMessageBuilder(); |
22 | 50 | ||
23 | virtual void newMessage(const char *name); | 51 | virtual void newMessage(const char* name); |
24 | 52 | ||
25 | virtual void nextBlock(const char* blockname); | 53 | virtual void nextBlock(const char* blockname); |
26 | virtual BOOL removeLastBlock(); // TODO: babbage: remove this horror... | 54 | virtual BOOL removeLastBlock(); // TODO: babbage: remove this horror... |
@@ -29,22 +57,22 @@ public: | |||
29 | virtual void addBinaryData(const char *varname, const void *data, | 57 | virtual void addBinaryData(const char *varname, const void *data, |
30 | S32 size); | 58 | S32 size); |
31 | virtual void addBOOL(const char* varname, BOOL b); | 59 | virtual void addBOOL(const char* varname, BOOL b); |
32 | virtual void addS8(const char *varname, S8 s); | 60 | virtual void addS8(const char* varname, S8 s); |
33 | virtual void addU8(const char *varname, U8 u); | 61 | virtual void addU8(const char* varname, U8 u); |
34 | virtual void addS16(const char *varname, S16 i); | 62 | virtual void addS16(const char* varname, S16 i); |
35 | virtual void addU16(const char *varname, U16 i); | 63 | virtual void addU16(const char* varname, U16 i); |
36 | virtual void addF32(const char *varname, F32 f); | 64 | virtual void addF32(const char* varname, F32 f); |
37 | virtual void addS32(const char *varname, S32 s); | 65 | virtual void addS32(const char* varname, S32 s); |
38 | virtual void addU32(const char *varname, U32 u); | 66 | virtual void addU32(const char* varname, U32 u); |
39 | virtual void addU64(const char *varname, U64 lu); | 67 | virtual void addU64(const char* varname, U64 lu); |
40 | virtual void addF64(const char *varname, F64 d); | 68 | virtual void addF64(const char* varname, F64 d); |
41 | virtual void addVector3(const char *varname, const LLVector3& vec); | 69 | virtual void addVector3(const char* varname, const LLVector3& vec); |
42 | virtual void addVector4(const char *varname, const LLVector4& vec); | 70 | virtual void addVector4(const char* varname, const LLVector4& vec); |
43 | virtual void addVector3d(const char *varname, const LLVector3d& vec); | 71 | virtual void addVector3d(const char* varname, const LLVector3d& vec); |
44 | virtual void addQuat(const char *varname, const LLQuaternion& quat); | 72 | virtual void addQuat(const char* varname, const LLQuaternion& quat); |
45 | virtual void addUUID(const char *varname, const LLUUID& uuid); | 73 | virtual void addUUID(const char* varname, const LLUUID& uuid); |
46 | virtual void addIPAddr(const char *varname, const U32 ip); | 74 | virtual void addIPAddr(const char* varname, const U32 ip); |
47 | virtual void addIPPort(const char *varname, const U16 port); | 75 | virtual void addIPPort(const char* varname, const U16 port); |
48 | virtual void addString(const char* varname, const char* s); | 76 | virtual void addString(const char* varname, const char* s); |
49 | virtual void addString(const char* varname, const std::string& s); | 77 | virtual void addString(const char* varname, const std::string& s); |
50 | 78 | ||
@@ -53,7 +81,7 @@ public: | |||
53 | 81 | ||
54 | virtual BOOL isBuilt() const; | 82 | virtual BOOL isBuilt() const; |
55 | virtual BOOL isClear() const; | 83 | virtual BOOL isClear() const; |
56 | virtual U32 buildMessage(U8* buffer, U32 buffer_size); | 84 | virtual U32 buildMessage(U8* buffer, U32 buffer_size, U8 offset_to_data); |
57 | /**< Return built message size */ | 85 | /**< Return built message size */ |
58 | 86 | ||
59 | virtual void clearMessage(); | 87 | virtual void clearMessage(); |
@@ -68,14 +96,14 @@ public: | |||
68 | virtual void copyFromLLSD(const LLSD&); | 96 | virtual void copyFromLLSD(const LLSD&); |
69 | 97 | ||
70 | private: | 98 | private: |
71 | void addData(const char *varname, const void *data, | 99 | void addData(const char* varname, const void* data, |
72 | EMsgVariableType type, S32 size); | 100 | EMsgVariableType type, S32 size); |
73 | 101 | ||
74 | void addData(const char *varname, const void *data, | 102 | void addData(const char* varname, const void* data, |
75 | EMsgVariableType type); | 103 | EMsgVariableType type); |
76 | 104 | ||
77 | LLMsgData* mCurrentSMessageData; | 105 | LLMsgData* mCurrentSMessageData; |
78 | LLMessageTemplate* mCurrentSMessageTemplate; | 106 | const LLMessageTemplate* mCurrentSMessageTemplate; |
79 | LLMsgBlkData* mCurrentSDataBlock; | 107 | LLMsgBlkData* mCurrentSDataBlock; |
80 | char* mCurrentSMessageName; | 108 | char* mCurrentSMessageName; |
81 | char* mCurrentSBlockName; | 109 | char* mCurrentSBlockName; |