PageRenderTime 39ms CodeModel.GetById 18ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLVLMANAGER_H
  27. #define LL_LLVLMANAGER_H
  28. // This class manages the data coming in for viewer layers from the network.
  29. #include "stdtypes.h"
  30. #include "lldarray.h"
  31. class LLVLData;
  32. class LLViewerRegion;
  33. class LLVLManager
  34. {
  35. public:
  36. ~LLVLManager();
  37. void addLayerData(LLVLData *vl_datap, const S32 mesg_size);
  38. void unpackData(const S32 num_packets = 10);
  39. S32 getTotalBytes() const;
  40. S32 getLandBits() const;
  41. S32 getWindBits() const;
  42. S32 getCloudBits() const;
  43. void resetBitCounts();
  44. void cleanupData(LLViewerRegion *regionp);
  45. protected:
  46. LLDynamicArray<LLVLData *> mPacketData;
  47. U32 mLandBits;
  48. U32 mWindBits;
  49. U32 mCloudBits;
  50. };
  51. class LLVLData
  52. {
  53. public:
  54. LLVLData(LLViewerRegion *regionp,
  55. const S8 type, U8 *data, const S32 size);
  56. ~LLVLData();
  57. S8 mType;
  58. U8 *mData;
  59. S32 mSize;
  60. LLViewerRegion *mRegionp;
  61. };
  62. extern LLVLManager gVLManager;
  63. #endif // LL_LLVIEWERLAYERMANAGER_H