OpenSDN source code
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() [1/2]

LabelBlock::LabelBlock ( uint32_t  first,
uint32_t  last 
)

Definition at line 54 of file label_block.cc.

◆ LabelBlock() [2/2]

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

Definition at line 62 of file label_block.cc.

◆ ~LabelBlock()

LabelBlock::~LabelBlock ( )

Definition at line 71 of file label_block.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AllocateLabel()

uint32_t LabelBlock::AllocateLabel ( )

Definition at line 77 of file label_block.cc.

Here is the call graph for this function:

◆ block_manager()

LabelBlockManagerPtr LabelBlock::block_manager ( )
inline

Definition at line 90 of file label_block.h.

◆ first()

uint32_t LabelBlock::first ( )
inline

Definition at line 88 of file label_block.h.

◆ last()

uint32_t LabelBlock::last ( )
inline

Definition at line 89 of file label_block.h.

◆ ReleaseLabel()

void LabelBlock::ReleaseLabel ( uint32_t  value)

Definition at line 98 of file label_block.cc.

Here is the call graph for this function:

◆ ToString()

string LabelBlock::ToString ( ) const

Definition at line 106 of file label_block.cc.

Friends And Related Function Documentation

◆ intrusive_ptr_add_ref

void intrusive_ptr_add_ref ( LabelBlock block)
friend

Definition at line 109 of file label_block.h.

◆ intrusive_ptr_release

void intrusive_ptr_release ( LabelBlock block)
friend

Definition at line 112 of file label_block.h.

◆ LabelBlockManager

friend class LabelBlockManager
friend

Definition at line 93 of file label_block.h.

◆ LabelBlockTest

friend class LabelBlockTest
friend

Definition at line 94 of file label_block.h.

Member Data Documentation

◆ block_manager_

LabelBlockManagerPtr LabelBlock::block_manager_
private

Definition at line 98 of file label_block.h.

◆ first_

uint32_t LabelBlock::first_
private

Definition at line 99 of file label_block.h.

◆ last_

uint32_t LabelBlock::last_
private

Definition at line 99 of file label_block.h.

◆ mutex_

tbb::mutex LabelBlock::mutex_
private

Definition at line 105 of file label_block.h.

◆ prev_pos_

size_t LabelBlock::prev_pos_
private

Definition at line 100 of file label_block.h.

◆ refcount_

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

Definition at line 101 of file label_block.h.

◆ used_bitset_

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: