OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IndexAllocator Class Reference

#include <index_allocator.h>

Collaboration diagram for IndexAllocator:

Public Member Functions

 IndexAllocator (size_t max_index)
 
size_t AllocIndex ()
 
void FreeIndex (size_t index)
 
bool NoneIndexSet ()
 
bool AnyIndexSet ()
 

Private Attributes

BitSet bitset_
 
size_t max_index_
 
size_t last_index_
 

Detailed Description

Definition at line 14 of file index_allocator.h.

Constructor & Destructor Documentation

IndexAllocator::IndexAllocator ( size_t  max_index)
inline

Definition at line 16 of file index_allocator.h.

Member Function Documentation

size_t IndexAllocator::AllocIndex ( )

Definition at line 7 of file index_allocator.cc.

Here is the call graph for this function:

bool IndexAllocator::AnyIndexSet ( )

Definition at line 35 of file index_allocator.cc.

Here is the call graph for this function:

void IndexAllocator::FreeIndex ( size_t  index)

Definition at line 26 of file index_allocator.cc.

Here is the call graph for this function:

bool IndexAllocator::NoneIndexSet ( )

Definition at line 31 of file index_allocator.cc.

Here is the call graph for this function:

Member Data Documentation

BitSet IndexAllocator::bitset_
private

Definition at line 25 of file index_allocator.h.

size_t IndexAllocator::last_index_
private

Definition at line 27 of file index_allocator.h.

size_t IndexAllocator::max_index_
private

Definition at line 26 of file index_allocator.h.


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