Represents a list in bencoded data.
More...
#include <bnode.h>
|
| BListNode (Uint32 off) |
|
void | append (BNode *node) |
|
QByteArray | getByteArray (Uint32 idx) |
| Same as getValue, except directly returns an QByteArray, if something goes wrong, an error will be thrown.
|
|
BNode * | getChild (Uint32 idx) |
|
BDictNode * | getDict (Uint32 idx) |
|
int | getInt (Uint32 idx) |
| Same as getValue, except directly returns an int, if something goes wrong, an error will be thrown.
|
|
qint64 | getInt64 (Uint32 idx) |
| Same as getValue, except directly returns a qint64, if something goes wrong, an error will be thrown.
|
|
BListNode * | getList (Uint32 idx) |
|
Uint32 | getNumChildren () const |
| Get the number of nodes in the list.
|
|
QString | getString (Uint32 idx, QTextCodec *tc) |
| Same as getValue, except directly returns a QString, if something goes wrong, an error will be thrown.
|
|
BValueNode * | getValue (Uint32 idx) |
|
void | printDebugInfo () override |
| Print some debugging info.
|
|
| 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.
|
|
void | setLength (Uint32 l) |
| Set the length.
|
|
|
enum | Type { VALUE,
DICT,
LIST
} |
|
- Author
- Joris Guisson
Definition at line 188 of file bnode.h.
◆ append()
void bt::BListNode::append |
( |
BNode * |
node | ) |
|
Append a node to the list.
- Parameters
-
◆ getChild()
BNode* bt::BListNode::getChild |
( |
Uint32 |
idx | ) |
|
|
inline |
Get a node from the list
- Parameters
-
- Returns
- The node or 0 if idx is out of bounds
Definition at line 210 of file bnode.h.
◆ getDict()
BDictNode* bt::BListNode::getDict |
( |
Uint32 |
idx | ) |
|
Get a BDictNode.
- Parameters
-
- Returns
- The node or 0 if the index is out of bounds or the element at postion idx isn't a BDictNode.
◆ getList()
BListNode* bt::BListNode::getList |
( |
Uint32 |
idx | ) |
|
Get a BListNode.
- Parameters
-
- Returns
- The node or 0 if the index is out of bounds or the element at postion idx isn't a BListNode.
◆ getValue()
Get a BValueNode.
- Parameters
-
- Returns
- The node or 0 if the index is out of bounds or the element at postion idx isn't a BValueNode.
The documentation for this class was generated from the following file: