CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BigVector< Item > Class Template Reference

#include <bigvector.h>

Inheritance diagram for BigVector< Item >:
Collaboration diagram for BigVector< Item >:

Public Member Functions

 BigVector ()
 
 BigVector (const size_t num_items)
 
 BigVector (const BigVector< Item > &other)
 
BigVector< Item > & operator= (const BigVector< Item > &other)
 
 ~BigVector ()
 
Item At (const size_t index) const
 
const Item * AtPtr (const size_t index) const
 
void PushBack (const Item &item)
 
bool IsEmpty () const
 
void Clear ()
 
void ShareBuffer (Item **duplicate, bool *large_alloc)
 
void DoubleCapacity ()
 
void SetSize (const size_t new_size)
 
size_t size () const
 
size_t capacity () const
 

Private Member Functions

void Alloc (const size_t num_elements)
 
void Dealloc ()
 
void FreeBuffer (Item *buf, const size_t size, const bool large)
 
void CopyFrom (const BigVector< Item > &other)
 

Private Attributes

Item * buffer_
 
size_t size_
 
size_t capacity_
 
bool large_alloc_
 
bool shared_buffer_
 

Static Private Attributes

static const size_t kNumInit = 16
 
static const size_t kMmapThreshold = 128*1024
 

Detailed Description

template<class Item>
class BigVector< Item >

This file is part of the CernVM File System.

Dynamic array, allocate with mmap for large arrays.

Definition at line 16 of file bigvector.h.

Constructor & Destructor Documentation

template<class Item>
BigVector< Item >::BigVector ( )
inline

Definition at line 18 of file bigvector.h.

template<class Item>
BigVector< Item >::BigVector ( const size_t  num_items)
inlineexplicit

Definition at line 24 of file bigvector.h.

template<class Item>
BigVector< Item >::BigVector ( const BigVector< Item > &  other)
inline

Definition at line 31 of file bigvector.h.

template<class Item>
BigVector< Item >::~BigVector ( )
inline

Definition at line 45 of file bigvector.h.

Member Function Documentation

template<class Item>
void BigVector< Item >::Alloc ( const size_t  num_elements)
inlineprivate

Definition at line 107 of file bigvector.h.

Referenced by BigVector< uint64_t >::BigVector(), BigVector< uint64_t >::Clear(), BigVector< uint64_t >::CopyFrom(), and BigVector< uint64_t >::DoubleCapacity().

Here is the caller graph for this function:

template<class Item>
Item BigVector< Item >::At ( const size_t  index) const
inline
template<class Item>
size_t BigVector< Item >::capacity ( ) const
inline

Definition at line 101 of file bigvector.h.

Referenced by cvmfs::AddToDirListing().

Here is the caller graph for this function:

template<class Item>
void BigVector< Item >::Clear ( )
inline

Definition at line 71 of file bigvector.h.

Referenced by FuseInvalidator::MainInvalidator().

Here is the caller graph for this function:

template<class Item>
void BigVector< Item >::CopyFrom ( const BigVector< Item > &  other)
inlineprivate

Definition at line 138 of file bigvector.h.

Referenced by BigVector< uint64_t >::BigVector(), and BigVector< uint64_t >::operator=().

Here is the caller graph for this function:

template<class Item>
void BigVector< Item >::Dealloc ( )
inlineprivate

Definition at line 119 of file bigvector.h.

Referenced by BigVector< uint64_t >::Clear(), BigVector< uint64_t >::operator=(), and BigVector< uint64_t >::~BigVector().

Here is the caller graph for this function:

template<class Item>
void BigVector< Item >::DoubleCapacity ( )
inline

Definition at line 82 of file bigvector.h.

Referenced by cvmfs::AddToDirListing(), and BigVector< uint64_t >::PushBack().

Here is the caller graph for this function:

template<class Item>
void BigVector< Item >::FreeBuffer ( Item *  buf,
const size_t  size,
const bool  large 
)
inlineprivate

Definition at line 126 of file bigvector.h.

Referenced by BigVector< uint64_t >::Dealloc(), and BigVector< uint64_t >::DoubleCapacity().

Here is the caller graph for this function:

template<class Item>
BigVector<Item>& BigVector< Item >::operator= ( const BigVector< Item > &  other)
inline

Definition at line 35 of file bigvector.h.

template<class Item>
void BigVector< Item >::SetSize ( const size_t  new_size)
inline

Definition at line 95 of file bigvector.h.

Referenced by cvmfs::AddToDirListing().

Here is the caller graph for this function:

template<class Item>
void BigVector< Item >::ShareBuffer ( Item **  duplicate,
bool *  large_alloc 
)
inline

Definition at line 76 of file bigvector.h.

Referenced by cvmfs::AddToDirListing().

Here is the caller graph for this function:

Member Data Documentation

template<class Item>
const size_t BigVector< Item >::kMmapThreshold = 128*1024
staticprivate

Definition at line 105 of file bigvector.h.

Referenced by BigVector< uint64_t >::Alloc().

template<class Item>
const size_t BigVector< Item >::kNumInit = 16
staticprivate

Definition at line 104 of file bigvector.h.

Referenced by BigVector< uint64_t >::BigVector(), and BigVector< uint64_t >::Clear().

template<class Item>
bool BigVector< Item >::large_alloc_
private

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