VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
memoryManager.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: memMgr.h,v $ $Revision: 1.9 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef memoryManager_H_
10 #define memoryManager_H_
11 
12 #include "gdb/gdbDefines.h"
13 #include <vlutil/vlList.h>
14 
15 // forward declarations
16 class DtPolygonIndirect;
17 class DtTriangleIndirect;
19 class DtGroup;
22 class DtTerrainFeature;
23 class DtBuilding;
24 class DtTree;
25 class DtRefGroup;
26 
27 // class DtMemoryManager:
28 //
29 // DtMemoryManager is a class that manages the allocation of nodes
30 // of certain types: indirect polygons, groups and features
31 // of various kinds.
32 
34 {
35 public:
36 
37  // default constructor
39 
40  // destructor
41  virtual ~DtMemoryManager();
42 
43  // returns a newly allocated DtPolygonIndirect
44  // \throws std::bad_alloc if there is not enough memory to allocate
45  virtual DtPolygonIndirect* allocatePolyIndirect();
46 
47  // returns a newly allocated DtPolygonIndirect
48  // \throws std::bad_alloc if there is not enough memory to allocate
49  virtual DtPolygonIndirect* allocatePolyIndirect(int n);
50 
51  // returns a newly allocated DtTriangleIndirect
52  // \throws std::bad_alloc if there is not enough memory to allocate
53  virtual DtTriangleIndirect* allocateTriIndirect();
54 
55  // returns a newly allocated DtExtentTriangleIndirect
56  // \throws std::bad_alloc if there is not enough memory to allocate
57  virtual DtExtentTriangleIndirect* allocateExtentTriIndirect();
58 
59  // returns a newly allocated DtGroup
60  // \throws std::bad_alloc if there is not enough memory to allocate
61  virtual DtGroup* allocateGroup();
62 
63  // returns a newly allocated DtStaticCoordinateSystem
64  // \throws std::bad_alloc if there is not enough memory to allocate
65  virtual DtStaticCoordinateSystem* allocateStaticCoordSystem();
66 
67  // returns a newly allocated DtGdbCulturalFeature
68  // \throws std::bad_alloc if there is not enough memory to allocate
69  virtual DtGdbCulturalFeature* allocateCulturalFeature();
70 
71  // returns a newly allocated DtTerrainFeature
72  // \throws std::bad_alloc if there is not enough memory to allocate
73  virtual DtTerrainFeature* allocateTerrainFeature();
74 
75  // returns a newly allocated building
76  // \throws std::bad_alloc if there is not enough memory to allocate
77  virtual DtBuilding* allocateBuilding();
78 
79  // returns a newly allocated tree
80  // \throws std::bad_alloc if there is not enough memory to allocate
81  virtual DtTree* allocateTree();
82 
83  // returns a newly allocated DtRefGroup
84  // \throws std::bad_alloc if there is not enough memory to allocate
85  virtual DtRefGroup* allocateRefGroup();
86 
87  // returns an array of integers of the specified size.
88  // \throws std::bad_alloc if there is not enough memory to allocate
89  virtual int* allocateIndexArray(int n);
90 
91  virtual int sizeInBytes() const;
92 
93 protected:
94 
95  // copy constructor
96  DtMemoryManager(const DtMemoryManager& orig);
97 
98  // assignment operator
99  DtMemoryManager& operator=(const DtMemoryManager& orig);
100 
101 protected:
102 
114 
115 protected:
116 
128 
140 };
141 
142 #endif
DtList myGroupBuckets
Definition: memoryManager.h:120
static int theNumberOfExtentTriIndPerBucket
Definition: memoryManager.h:105
Definition: memoryManager.h:33
Definition: group.h:28
Definition: refGroup.h:21
static int theNumberOfTriIndPerBucket
Definition: memoryManager.h:104
int myRemainingTriIndInCurrBucket
Definition: memoryManager.h:131
Definition: triangleIndirect.h:31
static int theNumberOfRefGroupsPerBucket
Definition: memoryManager.h:112
int myRemainingRefGroupsInCurrBucket
Definition: memoryManager.h:138
Definition: gdbCulturalFeature.h:22
int myRemainingGroupsInCurrBucket
Definition: memoryManager.h:132
static int theNumberOfBuildingsPerBucket
Definition: memoryManager.h:110
DtList myRefGroupBuckets
Definition: memoryManager.h:126
DtList myTriIndBuckets
Definition: memoryManager.h:119
Definition: building.h:89
#define DT_DLL_gdb
Definition: gdbDefines.h:25
static int theNumberOfTreesPerBucket
Definition: memoryManager.h:111
DtList myPolyIndBuckets
Definition: memoryManager.h:117
DtList myIndexBuckets
Definition: memoryManager.h:127
int myRemainingStatCoordSysInCurrBucket
Definition: memoryManager.h:133
Definition: baseCoordinateSystem.h:254
Definition: terrainFeature.h:20
Definition: tree.h:26
static int theNumberOfStaticCoordSysPerBucket
Definition: memoryManager.h:107
static int theNumberOfPolyIndPerBucket
Definition: memoryManager.h:103
int myRemainingTreesInCurrBucket
Definition: memoryManager.h:137
DtList myTreeBuckets
Definition: memoryManager.h:125
DtList myCulturalFeatureBuckets
Definition: memoryManager.h:122
Definition: extentTriangleIndirect.h:34
static int theNumberOfCulturalFeaturesPerBucket
Definition: memoryManager.h:108
int myRemainingIndicesInCurrBucket
Definition: memoryManager.h:139
static int theNumberOfTerrainFeaturesPerBucket
Definition: memoryManager.h:109
static int theNumberOfIndicesPerBucket
Definition: memoryManager.h:113
int myRemainingBuildingsInCurrBucket
Definition: memoryManager.h:136
Definition: polygonIndirect.h:29
int myRemainingCulturalFeaturesInCurrBucket
Definition: memoryManager.h:134
int myRemainingTerrainFeaturesInCurrBucket
Definition: memoryManager.h:135
static int theNumberOfGroupsPerBucket
Definition: memoryManager.h:106
DtList myStatCoordSysBuckets
Definition: memoryManager.h:121
DtList myTerrainFeatureBuckets
Definition: memoryManager.h:123
int myRemainingPolyIndInCurrBucket
Definition: memoryManager.h:129
int myRemainingExtentTriIndInCurrBucket
Definition: memoryManager.h:130
DtList myBuildingBuckets
Definition: memoryManager.h:124
DtList myExtentTriIndBuckets
Definition: memoryManager.h:118

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)