Point Cloud Library (PCL)  1.11.0
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
ON_SimpleFixedSizePool::SizeofElement
std::size_t SizeofElement() const
Definition: opennurbs_fsp_defs.h:41
ON_SimpleFixedSizePool::FirstBlock
T * FirstBlock(std::size_t *block_element_count)
Definition: opennurbs_fsp_defs.h:95
ON_SimpleFixedSizePool::SetHeap
void SetHeap(ON_MEMORY_POOL *heap)
Definition: opennurbs_fsp_defs.h:113
ON_SimpleFixedSizePool::AllocateElement
T * AllocateElement()
Definition: opennurbs_fsp_defs.h:47
ON_SimpleFixedSizePool::FirstElement
T * FirstElement()
Definition: opennurbs_fsp_defs.h:83
ON_SimpleFixedSizePool::Destroy
void Destroy()
Definition: opennurbs_fsp_defs.h:65
ON_FixedSizePool::Heap
ON_MEMORY_POOL * Heap()
ON_FixedSizePool::FirstBlock
void * FirstBlock(std::size_t *block_element_count)
ON_FixedSizePool::Destroy
void Destroy()
ON_FixedSizePool
Definition: opennurbs_fsp.h:19
ON_FixedSizePool::NextBlock
void * NextBlock(std::size_t *block_element_count)
ON_FixedSizePool::NextElement
void * NextElement()
ON_SimpleFixedSizePool::Create
bool Create(std::size_t element_count_estimate, std::size_t block_element_count)
Definition: opennurbs_fsp_defs.h:32
ON_SimpleFixedSizePool::NextElement
T * NextElement()
Definition: opennurbs_fsp_defs.h:89
ON_FixedSizePool::TotalElementCount
std::size_t TotalElementCount() const
ON_FixedSizePool::Create
bool Create(std::size_t sizeof_element, std::size_t element_count_estimate, std::size_t block_element_capacity)
ON_FixedSizePool::SetHeap
void SetHeap(ON_MEMORY_POOL *heap)
ON_SimpleFixedSizePool::Heap
ON_MEMORY_POOL * Heap()
Definition: opennurbs_fsp_defs.h:119
ON_FixedSizePool::SizeofElement
std::size_t SizeofElement() const
ON_SimpleFixedSizePool::TotalElementCount
std::size_t TotalElementCount() const
Definition: opennurbs_fsp_defs.h:77
ON_SimpleFixedSizePool::EmergencyDestroy
void EmergencyDestroy()
Definition: opennurbs_fsp_defs.h:125
ON_SimpleFixedSizePool::ReturnAll
void ReturnAll()
Definition: opennurbs_fsp_defs.h:59
ON_SimpleFixedSizePool::ReturnElement
void ReturnElement(T *p)
Definition: opennurbs_fsp_defs.h:53
ON_FixedSizePool::ReturnAll
void ReturnAll()
ON_FixedSizePool::ActiveElementCount
std::size_t ActiveElementCount() const
ON_SimpleFixedSizePool::NextBlock
T * NextBlock(std::size_t *block_element_count)
Definition: opennurbs_fsp_defs.h:101
ON_SimpleFixedSizePool::~ON_SimpleFixedSizePool
~ON_SimpleFixedSizePool()
Definition: opennurbs_fsp_defs.h:26
ON_FixedSizePool::AllocateElement
void * AllocateElement()
ON_FixedSizePool::Element
void * Element(std::size_t element_index) const
ON_SimpleFixedSizePool::ActiveElementCount
std::size_t ActiveElementCount() const
Definition: opennurbs_fsp_defs.h:71
ON_FixedSizePool::ReturnElement
void ReturnElement(void *p)
ON_FixedSizePool::EmergencyDestroy
void EmergencyDestroy()
ON_SimpleFixedSizePool::ON_SimpleFixedSizePool
ON_SimpleFixedSizePool()
Definition: opennurbs_fsp_defs.h:21
ON_SimpleFixedSizePool::Element
T * Element(std::size_t element_index) const
Definition: opennurbs_fsp_defs.h:107
ON_FixedSizePool::FirstElement
void * FirstElement()