libktorrent
2.2.0
|
Base class for a node in a b-encoded piece of data. More...
#include <bnode.h>
Public Types | |
enum | Type { VALUE, DICT, LIST } |
Public Member Functions | |
BNode (Type type, Uint32 off) | |
Uint32 | getLength () const |
Get the length this node takes up in the bytearray. | |
Uint32 | getOffset () const |
Get the offset in the bytearray where this node starts. | |
Type | getType () const |
Get the type of node. | |
virtual void | printDebugInfo ()=0 |
Print some debugging info. | |
void | setLength (Uint32 l) |
Set the length. | |
There are 3 possible pieces of data in b-encoded piece of data. This is the base class for all those 3 things.
bt::BNode::BNode | ( | Type | type, |
Uint32 | off | ||
) |
Constructor, sets the Type, and the offset into the data.
type | Type of node |
off | The offset into the data |