kget
bt::ChunkCounter Class Reference
#include <chunkcounter.h>
Detailed Description
Class to keep track of how many peers have a chunk.
Definition at line 35 of file chunkcounter.h.
Public Member Functions | |
| ChunkCounter (Uint32 num_chunks) | |
| void | dec (Uint32 idx) |
| void | decBitSet (const BitSet &bs) |
| Uint32 | get (Uint32 idx) const |
| void | inc (Uint32 idx) |
| void | incBitSet (const BitSet &bs) |
| void | reset () |
| virtual | ~ChunkCounter () |
Constructor & Destructor Documentation
| bt::ChunkCounter::ChunkCounter | ( | Uint32 | num_chunks | ) |
Definition at line 26 of file chunkcounter.cpp.
| bt::ChunkCounter::~ChunkCounter | ( | ) | [virtual] |
Definition at line 33 of file chunkcounter.cpp.
Member Function Documentation
| void bt::ChunkCounter::dec | ( | Uint32 | idx | ) |
Decrement the counter for the idx'th chunk.
- Parameters:
-
idx Index of the chunk
Definition at line 66 of file chunkcounter.cpp.
| void bt::ChunkCounter::decBitSet | ( | const BitSet & | bs | ) |
If a bit in the bitset is one, decrement the corresponding counter.
- Parameters:
-
bs The BitSet
Definition at line 51 of file chunkcounter.cpp.
Get the counter for the idx'th chunk.
- Parameters:
-
idx Index of the chunk
Definition at line 72 of file chunkcounter.cpp.
| void bt::ChunkCounter::inc | ( | Uint32 | idx | ) |
Increment the counter for the idx'th chunk.
- Parameters:
-
idx Index of the chunk
Definition at line 60 of file chunkcounter.cpp.
| void bt::ChunkCounter::incBitSet | ( | const BitSet & | bs | ) |
If a bit in the bitset is one, increment the corresponding counter.
- Parameters:
-
bs The BitSet
Definition at line 42 of file chunkcounter.cpp.
| void bt::ChunkCounter::reset | ( | ) |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference