Point Cloud Library (PCL)  1.9.1-dev
opennurbs_fsp_defs.h
1 /* $NoKeywords: $ */
2 /*
3 //
4 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
5 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
6 // McNeel & Associates.
7 //
8 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
9 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
10 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
11 //
12 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
13 //
14 ////////////////////////////////////////////////////////////////
15 */
16 
17 #if !defined(ON_FSP_DEFS_INC_)
18 #define ON_FSP_DEFS_INC_
19 
20 template <class T>
23 {}
24 
25 template <class T>
27 {
29 }
30 
31 template <class T>
33  std::size_t element_count_estimate,
34  std::size_t block_element_count
35  )
36 {
37  return ON_FixedSizePool::Create(sizeof(T),element_count_estimate,block_element_count);
38 }
39 
40 template <class T>
42 {
44 }
45 
46 template <class T>
48 {
50 }
51 
52 template <class T>
54 {
56 }
57 
58 template <class T>
60 {
62 }
63 
64 template <class T>
66 {
68 }
69 
70 template <class T>
72 {
74 }
75 
76 template <class T>
78 {
80 }
81 
82 template <class T>
84 {
85  return (T *)ON_FixedSizePool::FirstElement();
86 }
87 
88 template <class T>
90 {
91  return (T *)ON_FixedSizePool::NextElement();
92 }
93 
94 template <class T>
95 T* ON_SimpleFixedSizePool<T>::FirstBlock( std::size_t* block_element_count )
96 {
97  return (T *)ON_FixedSizePool::FirstBlock(block_element_count);
98 }
99 
100 template <class T>
101 T* ON_SimpleFixedSizePool<T>::NextBlock( std::size_t* block_element_count )
102 {
103  return (T *)ON_FixedSizePool::NextBlock(block_element_count);
104 }
105 
106 template <class T>
107 T* ON_SimpleFixedSizePool<T>::Element(std::size_t element_index) const
108 {
109  return (T *)ON_FixedSizePool::Element(element_index);
110 }
111 
112 template <class T>
113 void ON_SimpleFixedSizePool<T>::SetHeap( ON_MEMORY_POOL* heap )
114 {
116 }
117 
118 template <class T>
120 {
121  return ON_FixedSizePool::Heap();
122 }
123 
124 template <class T>
126 {
128 }
129 
130 #endif
T * FirstBlock(std::size_t *block_element_count)
void SetHeap(ON_MEMORY_POOL *heap)
void * FirstElement()
bool Create(std::size_t element_count_estimate, std::size_t block_element_count)
void * Element(std::size_t element_index) const
std::size_t TotalElementCount() const
ON_MEMORY_POOL * Heap()
void EmergencyDestroy()
T * NextBlock(std::size_t *block_element_count)
void * NextBlock(std::size_t *block_element_count)
void * FirstBlock(std::size_t *block_element_count)
bool Create(std::size_t sizeof_element, std::size_t element_count_estimate, std::size_t block_element_capacity)
void SetHeap(ON_MEMORY_POOL *heap)
std::size_t ActiveElementCount() const
std::size_t TotalElementCount() const
ON_MEMORY_POOL * Heap()
std::size_t SizeofElement() const
std::size_t ActiveElementCount() const
T * Element(std::size_t element_index) const
void * NextElement()
void * AllocateElement()
std::size_t SizeofElement() const
void ReturnElement(void *p)