VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
gdb
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
;
18
class
DtExtentTriangleIndirect
;
19
class
DtGroup
;
20
class
DtStaticCoordinateSystem
;
21
class
DtGdbCulturalFeature
;
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
33
class
DT_DLL_gdb
DtMemoryManager
34
{
35
public
:
36
37
// default constructor
38
DtMemoryManager
();
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
103
static
int
theNumberOfPolyIndPerBucket
;
104
static
int
theNumberOfTriIndPerBucket
;
105
static
int
theNumberOfExtentTriIndPerBucket
;
106
static
int
theNumberOfGroupsPerBucket
;
107
static
int
theNumberOfStaticCoordSysPerBucket
;
108
static
int
theNumberOfCulturalFeaturesPerBucket
;
109
static
int
theNumberOfTerrainFeaturesPerBucket
;
110
static
int
theNumberOfBuildingsPerBucket
;
111
static
int
theNumberOfTreesPerBucket
;
112
static
int
theNumberOfRefGroupsPerBucket
;
113
static
int
theNumberOfIndicesPerBucket
;
114
115
protected
:
116
117
DtList
myPolyIndBuckets
;
118
DtList
myExtentTriIndBuckets
;
119
DtList
myTriIndBuckets
;
120
DtList
myGroupBuckets
;
121
DtList
myStatCoordSysBuckets
;
122
DtList
myCulturalFeatureBuckets
;
123
DtList
myTerrainFeatureBuckets
;
124
DtList
myBuildingBuckets
;
125
DtList
myTreeBuckets
;
126
DtList
myRefGroupBuckets
;
127
DtList
myIndexBuckets
;
128
129
int
myRemainingPolyIndInCurrBucket
;
130
int
myRemainingExtentTriIndInCurrBucket
;
131
int
myRemainingTriIndInCurrBucket
;
132
int
myRemainingGroupsInCurrBucket
;
133
int
myRemainingStatCoordSysInCurrBucket
;
134
int
myRemainingCulturalFeaturesInCurrBucket
;
135
int
myRemainingTerrainFeaturesInCurrBucket
;
136
int
myRemainingBuildingsInCurrBucket
;
137
int
myRemainingTreesInCurrBucket
;
138
int
myRemainingRefGroupsInCurrBucket
;
139
int
myRemainingIndicesInCurrBucket
;
140
};
141
142
#endif
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)