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

#include <label_block.h>

Collaboration diagram for LabelBlock:

Public Member Functions

 LabelBlock (uint32_t first, uint32_t last)
 
 LabelBlock (LabelBlockManager *block_manager, uint32_t first, uint32_t last)
 
 ~LabelBlock ()
 
uint32_t AllocateLabel ()
 
void ReleaseLabel (uint32_t value)
 
std::string ToString () const
 
uint32_t first ()
 
uint32_t last ()
 
LabelBlockManagerPtr block_manager ()
 

Private Attributes

LabelBlockManagerPtr block_manager_
 
uint32_t first_
 
uint32_t last_
 
size_t prev_pos_
 
tbb::atomic< int > refcount_
 
tbb::mutex mutex_
 
BitSet used_bitset_
 

Friends

class LabelBlockManager
 
class LabelBlockTest
 
void intrusive_ptr_add_ref (LabelBlock *block)
 
void intrusive_ptr_release (LabelBlock *block)
 

Detailed Description

Definition at line 79 of file label_block.h.

Constructor & Destructor Documentation

LabelBlock::LabelBlock ( uint32_t  first,
uint32_t  last 
)

Definition at line 54 of file label_block.cc.

LabelBlock::LabelBlock ( LabelBlockManager block_manager,
uint32_t  first,
uint32_t  last 
)

Definition at line 62 of file label_block.cc.

LabelBlock::~LabelBlock ( )

Definition at line 71 of file label_block.cc.

Here is the call graph for this function:

Member Function Documentation

uint32_t LabelBlock::AllocateLabel ( )

Definition at line 77 of file label_block.cc.

Here is the call graph for this function:

LabelBlockManagerPtr LabelBlock::block_manager ( )
inline

Definition at line 90 of file label_block.h.

uint32_t LabelBlock::first ( )
inline

Definition at line 88 of file label_block.h.

uint32_t LabelBlock::last ( )
inline

Definition at line 89 of file label_block.h.

void LabelBlock::ReleaseLabel ( uint32_t  value)

Definition at line 98 of file label_block.cc.

Here is the call graph for this function:

string LabelBlock::ToString ( ) const

Definition at line 106 of file label_block.cc.

Friends And Related Function Documentation

void intrusive_ptr_add_ref ( LabelBlock block)
friend

Definition at line 109 of file label_block.h.

void intrusive_ptr_release ( LabelBlock block)
friend

Definition at line 112 of file label_block.h.

friend class LabelBlockManager
friend

Definition at line 93 of file label_block.h.

friend class LabelBlockTest
friend

Definition at line 94 of file label_block.h.

Member Data Documentation

LabelBlockManagerPtr LabelBlock::block_manager_
private

Definition at line 98 of file label_block.h.

uint32_t LabelBlock::first_
private

Definition at line 99 of file label_block.h.

uint32_t LabelBlock::last_
private

Definition at line 99 of file label_block.h.

tbb::mutex LabelBlock::mutex_
private

Definition at line 105 of file label_block.h.

size_t LabelBlock::prev_pos_
private

Definition at line 100 of file label_block.h.

tbb::atomic<int> LabelBlock::refcount_
private

Definition at line 101 of file label_block.h.

BitSet LabelBlock::used_bitset_
private

Definition at line 106 of file label_block.h.


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