VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)