summaryrefslogtreecommitdiff
path: root/indra/newview/llvocache.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvocache.h')
-rw-r--r--indra/newview/llvocache.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
new file mode 100644
index 0000000000..7dc06a0b49
--- /dev/null
+++ b/indra/newview/llvocache.h
@@ -0,0 +1,51 @@
+/**
+ * @file llvocache.h
+ * @brief Cache of objects on the viewer.
+ *
+ * Copyright (c) 2003-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#ifndef LL_LLVOCACHE_H
+#define LL_LLVOCACHE_H
+
+#include "lluuid.h"
+#include "lldatapacker.h"
+#include "lldlinked.h"
+
+
+//---------------------------------------------------------------------------
+// Cache entries
+class LLVOCacheEntry;
+
+class LLVOCacheEntry : public LLDLinked<LLVOCacheEntry>
+{
+public:
+ LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer &dp);
+ LLVOCacheEntry(FILE *fp);
+ LLVOCacheEntry();
+ ~LLVOCacheEntry();
+
+ U32 getLocalID() const { return mLocalID; }
+ U32 getCRC() const { return mCRC; }
+ S32 getHitCount() const { return mHitCount; }
+ S32 getCRCChangeCount() const { return mCRCChangeCount; }
+
+ void dump() const;
+ void writeToFile(FILE *fp) const;
+ void assignCRC(U32 crc, LLDataPackerBinaryBuffer &dp);
+ LLDataPackerBinaryBuffer *getDP(U32 crc);
+ void recordHit();
+ void recordDupe() { mDupeCount++; }
+
+protected:
+ U32 mLocalID;
+ U32 mCRC;
+ S32 mHitCount;
+ S32 mDupeCount;
+ S32 mCRCChangeCount;
+ LLDataPackerBinaryBuffer mDP;
+ U8 *mBuffer;
+};
+
+#endif