libktorrent  2.2.0
Public Types | Public Member Functions | List of all members
bt::BNode Class Referenceabstract

Base class for a node in a b-encoded piece of data. More...

#include <bnode.h>

Inheritance diagram for bt::BNode:
Inheritance graph
[legend]

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.
 

Detailed Description

Author
Joris Guisson

There are 3 possible pieces of data in b-encoded piece of data. This is the base class for all those 3 things.

Definition at line 42 of file bnode.h.

Constructor & Destructor Documentation

◆ BNode()

bt::BNode::BNode ( Type  type,
Uint32  off 
)

Constructor, sets the Type, and the offset into the data.

Parameters
typeType of node
offThe offset into the data

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