Helios++
Helios software for LiDAR simulations
LightKDTreeNodeBlockAllocator Class Reference

Block allocator for LightKDTreeNode instances. More...

#include <LightKDTreeNodeBlockAllocator.h>

Inheritance diagram for LightKDTreeNodeBlockAllocator:
Collaboration diagram for LightKDTreeNodeBlockAllocator:

Public Member Functions

 LightKDTreeNodeBlockAllocator (size_t const blockSize=256)
 Default constructor for LightKDTreeNodeBlockAllocator. More...
 
virtual ~LightKDTreeNodeBlockAllocator ()=default
 Destructor for LightKDTreeNodeBlockAllocator.
 
- Public Member Functions inherited from BlockAllocator< LightKDTreeNode >
 BlockAllocator (size_t const blockSize=256)
 Default constructor for BlockAllocator. More...
 
virtual ~BlockAllocator ()=default
 Destructor for BlockAllocator.
 
virtual LightKDTreeNodenextNew ()
 Obtain the next new allocated object. More...
 
virtual void setNextBlockSize (std::function< size_t(void)> f)
 Update next block size function. More...
 
virtual vector< LightKDTreeNode * > getBlocks () const
 Obtain a vector with pointers to start of allocated blocks. More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize a LightKDTreeNodeBlockAllocator to a stream of bytes. More...
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from BlockAllocator< LightKDTreeNode >
virtual LightKDTreeNode_new ()
 The allocation itself. More...
 
- Protected Attributes inherited from BlockAllocator< LightKDTreeNode >
size_t blockSize
 How many elements per allocated block.
 
vector< LightKDTreeNode * > blocks
 Vector of allocated blocks. Each pointer in this vectors points to the starting element of a block of blockSize elements. More...
 
size_t lastBlockElements
 The number of already used elements in last block. More...
 
LightKDTreeNodelastBlock
 Pointer to last block in blocks. It is useful to prevent multiple queries for the same block at blocks vector. More...
 
std::function< size_t(void)> _nextBlockSize
 Compute the next block size. By default it preserves blockSize but it can be overridden to provide a dynamic behavior for block size.
 

Detailed Description

Block allocator for LightKDTreeNode instances.

Author
Alberto M. Esmoris Pena
Version
1.0
See also
BlockAllocator
LightKDTreeNode

Constructor & Destructor Documentation

◆ LightKDTreeNodeBlockAllocator()

LightKDTreeNodeBlockAllocator::LightKDTreeNodeBlockAllocator ( size_t const  blockSize = 256)
inline

Member Function Documentation

◆ serialize()

template<class Archive >
void LightKDTreeNodeBlockAllocator::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Serialize a LightKDTreeNodeBlockAllocator to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of bytes
versionVersion number for the LightKDTreeNodeBlockAllocator

The documentation for this class was generated from the following file: