PageRenderTime 15ms CodeModel.GetById 2ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llvlmanager.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 79 lines | 37 code | 16 blank | 26 comment | 0 complexity | 548874ed8c7a70eb9ee49ff074dca8c9 MD5 | raw file
 1/** 
 2 * @file llvlmanager.h
 3 * @brief LLVLManager class definition
 4 *
 5 * $LicenseInfo:firstyear=2002&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LL_LLVLMANAGER_H
28#define LL_LLVLMANAGER_H
29
30// This class manages the data coming in for viewer layers from the network.
31
32#include "stdtypes.h"
33#include "lldarray.h"
34
35class LLVLData;
36class LLViewerRegion;
37
38class LLVLManager
39{
40public:
41	~LLVLManager();
42
43	void addLayerData(LLVLData *vl_datap, const S32 mesg_size);
44
45	void unpackData(const S32 num_packets = 10);
46
47	S32 getTotalBytes() const;
48
49	S32 getLandBits() const;
50	S32 getWindBits() const;
51	S32 getCloudBits() const;
52
53	void resetBitCounts();
54
55	void cleanupData(LLViewerRegion *regionp);
56protected:
57
58	LLDynamicArray<LLVLData *> mPacketData;
59	U32 mLandBits;
60	U32 mWindBits;
61	U32 mCloudBits;
62};
63
64class LLVLData
65{
66public:
67	LLVLData(LLViewerRegion *regionp,
68			 const S8 type, U8 *data, const S32 size);
69	~LLVLData();
70
71	S8 mType;
72	U8 *mData;
73	S32 mSize;
74	LLViewerRegion *mRegionp;
75};
76
77extern LLVLManager gVLManager;
78
79#endif // LL_LLVIEWERLAYERMANAGER_H