Represents a dictionary in bencoded data.
More...
#include <bnode.h>
|
| BDictNode (Uint32 off) |
|
QByteArray | getByteArray (const QByteArray &key) |
| Same as getValue, except directly returns an QByteArray, if something goes wrong, an error will be thrown.
|
|
BNode * | getData (const QByteArray &key) |
|
BDictNode * | getDict (const QByteArray &key) |
|
int | getInt (const QByteArray &key) |
| Same as getValue, except directly returns an int, if something goes wrong, an error will be thrown.
|
|
qint64 | getInt64 (const QByteArray &key) |
| Same as getValue, except directly returns a qint64, if something goes wrong, an error will be thrown.
|
|
BListNode * | getList (const QByteArray &key) |
|
QString | getString (const QByteArray &key, QTextCodec *tc) |
| Same as getValue, except directly returns a QString, if something goes wrong, an error will be thrown.
|
|
BValueNode * | getValue (const QByteArray &key) |
|
void | insert (const QByteArray &key, BNode *node) |
|
QList< QByteArray > | keys () const |
| Get a list of keys.
|
|
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 119 of file bnode.h.
◆ getData()
BNode* bt::BDictNode::getData |
( |
const QByteArray & |
key | ) |
|
Get a BNode.
- Parameters
-
- Returns
- The node or 0 if there is no node with has key key
◆ getDict()
BDictNode* bt::BDictNode::getDict |
( |
const QByteArray & |
key | ) |
|
Get a BDictNode.
- Parameters
-
- Returns
- The node or 0 if there is no dict node with has key key
◆ getList()
BListNode* bt::BDictNode::getList |
( |
const QByteArray & |
key | ) |
|
Get a BListNode.
- Parameters
-
- Returns
- The node or 0 if there is no list node with has key key
◆ getValue()
BValueNode* bt::BDictNode::getValue |
( |
const QByteArray & |
key | ) |
|
Get a BValueNode.
- Parameters
-
- Returns
- The node or 0 if there is no value node with has key key
◆ insert()
void bt::BDictNode::insert |
( |
const QByteArray & |
key, |
|
|
BNode * |
node |
|
) |
| |
Insert a BNode in the dictionary.
- Parameters
-
The documentation for this class was generated from the following file: