3D Forest
Software for analysis of Lidar data from forest environment.
VectorFile< T, F > Class Template Reference

#include <VectorFile.hpp>

Classes

class  Page
 

Public Member Functions

 VectorFile ()
 
 ~VectorFile ()
 
void create (const std::string &path, size_t pageSize=1000, size_t cacheSize=1000)
 
void open (const std::string &path, size_t pageSize=1000, size_t cacheSize=1000)
 
void close ()
 
void flush ()
 
bool empty () const
 
size_t size () const
 
T & operator[] (size_t pos)
 
const T & operator[] (size_t pos) const
 
T & at (size_t pos, bool modify=true)
 
const T & at (size_t pos) const
 
void push_back (const T &e)
 
void push_back (T &&e)
 
void clear ()
 
std::string dumpToString () const
 

Static Public Attributes

static const size_t npos {SIZE_MAX}
 

Private Member Functions

void init (size_t pageSize, size_t cacheSize)
 
void seek (size_t pos) const
 
void readPage (size_t id) const
 
void readPage (size_t id, Page &page) const
 
void writePage (Page &page) const
 
void createIndex ()
 

Private Attributes

size_t size_
 
size_t pageSize_
 
size_t cacheSize_
 
uint64_t timestamp_
 
File file_
 
std::vector< std::shared_ptr< Page > > pages_
 
std::vector< size_t > index_
 
std::vector< uint8_t > buffer_
 

Constructor & Destructor Documentation

◆ VectorFile()

template<class T , class F >
VectorFile< T, F >::VectorFile ( )
inline

◆ ~VectorFile()

template<class T , class F >
VectorFile< T, F >::~VectorFile ( )
inline

Member Function Documentation

◆ at() [1/2]

template<class T , class F >
const T & VectorFile< T, F >::at ( size_t pos) const

◆ at() [2/2]

template<class T , class F >
T & VectorFile< T, F >::at ( size_t pos,
bool modify = true )

◆ clear()

template<class T , class F >
void VectorFile< T, F >::clear ( )
inline

Referenced by Points::clear().

◆ close()

template<class T , class F >
void VectorFile< T, F >::close ( )
inline

Referenced by Points::~Points().

◆ create()

template<class T , class F >
void VectorFile< T, F >::create ( const std::string & path,
size_t pageSize = 1000,
size_t cacheSize = 1000 )
inline

Referenced by Points::Points().

◆ createIndex()

template<class T , class F >
void VectorFile< T, F >::createIndex ( )
inlineprivate

◆ dumpToString()

template<class T , class F >
std::string VectorFile< T, F >::dumpToString ( ) const
inline

◆ empty()

template<class T , class F >
bool VectorFile< T, F >::empty ( ) const
inline

◆ flush()

template<class T , class F >
void VectorFile< T, F >::flush ( )
inline

◆ init()

template<class T , class F >
void VectorFile< T, F >::init ( size_t pageSize,
size_t cacheSize )
inlineprivate

◆ open()

template<class T , class F >
void VectorFile< T, F >::open ( const std::string & path,
size_t pageSize = 1000,
size_t cacheSize = 1000 )
inline

◆ operator[]() [1/2]

template<class T , class F >
T & VectorFile< T, F >::operator[] ( size_t pos)
inline

◆ operator[]() [2/2]

template<class T , class F >
const T & VectorFile< T, F >::operator[] ( size_t pos) const
inline

◆ push_back() [1/2]

template<class T , class F >
void VectorFile< T, F >::push_back ( const T & e)
inline

◆ push_back() [2/2]

template<class T , class F >
void VectorFile< T, F >::push_back ( T && e)
inline

◆ readPage() [1/2]

template<class T , class F >
void VectorFile< T, F >::readPage ( size_t id) const
inlineprivate

◆ readPage() [2/2]

template<class T , class F >
void VectorFile< T, F >::readPage ( size_t id,
Page & page ) const
inlineprivate

◆ seek()

template<class T , class F >
void VectorFile< T, F >::seek ( size_t pos) const
inlineprivate

◆ size()

template<class T , class F >
size_t VectorFile< T, F >::size ( ) const
inline

◆ writePage()

template<class T , class F >
void VectorFile< T, F >::writePage ( Page & page) const
inlineprivate

Member Data Documentation

◆ buffer_

template<class T , class F >
std::vector<uint8_t> VectorFile< T, F >::buffer_
mutableprivate

◆ cacheSize_

template<class T , class F >
size_t VectorFile< T, F >::cacheSize_
private

◆ file_

template<class T , class F >
File VectorFile< T, F >::file_
mutableprivate

◆ index_

template<class T , class F >
std::vector<size_t> VectorFile< T, F >::index_
mutableprivate

◆ npos

template<class T , class F >
const size_t VectorFile< T, F >::npos {SIZE_MAX}
static

◆ pages_

template<class T , class F >
std::vector<std::shared_ptr<Page> > VectorFile< T, F >::pages_
mutableprivate

◆ pageSize_

template<class T , class F >
size_t VectorFile< T, F >::pageSize_
private

◆ size_

template<class T , class F >
size_t VectorFile< T, F >::size_
private

◆ timestamp_

template<class T , class F >
uint64_t VectorFile< T, F >::timestamp_
mutableprivate

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