VR-Forces 4.1 Class Documentation
debugDrawerSharedMemoryManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include "vlutil/vlShmPool.h"
14 #include "vlutil/vlString.h"
15 #include <vector>
16 
18 struct DtDebugMemoryBlockHeader;
19 
22 
24 {
25  public:
26  static const int DtDebugDrawerSharedMemoryNoType = 0;
27  static const int DtDebugDrawerSharedMemoryAllType = 1;
28  static const int DtDebugDrawerSharedMemoryVRFType = 2;
29  static const int DtDebugDrawerSharedMemoryBHaveType = 3;
30 
31  typedef DtDebugMemoryBlockHeader DtMemoryHeader;
32 
35 
39 
40  virtual void readLock();
41  virtual void readUnlock();
42 
52  virtual void init(int memoryType, bool clearMemory=false, unsigned long memorySize=3*10485670);
53 
66  virtual void push(DtDebugDrawerGeometryMemory* shape);
67 
72 
73  virtual void advanceFrameCount();
74  virtual unsigned long frameCount() const;
76 
80  virtual unsigned int numEmtries();
81 
84  virtual unsigned long currentSize();
85 
105  virtual const char* getNext(const char* previousPtr, DtDebugDrawerGeometryMemory** shape);
106 
109  virtual const std::vector<int> getMemoryBlockIndexList();
110 
113  virtual DtString getMemoryBlockName(int index);
114 
122  virtual bool pointToMemoryBlock(DtString name);
123 
126  virtual void startNewFrame();
127 
128  protected:
129 
130 
133  unsigned long myMaxSize;
134 
138  unsigned long myCurrentSize;
139 
143 
145  char* myMemoryPtr;
146 
149 
151  DtSharedMemoryPoolManager* myManager;
152  DtSharedMemoryPoolClient* myClient;
153 
156 
158 
160 
162 };
163 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)