Protocols::BitTorrent::Bencoding::BList Class Reference

#include <BList.h> [code]

Inherits Protocols::BitTorrent::Bencoding::BItem.

Inheritance diagram for Protocols::BitTorrent::Bencoding::BList:

Inheritance graph
[legend]
Collaboration diagram for Protocols::BitTorrent::Bencoding::BList:

Collaboration graph
[legend]
List of all members.

Detailed Description

Represents the bencoding list type.

A derived from BItem class representing the bencoding list type. Contains a list of pointers to objects of to BItem.

Definition at line 39 of file BList.h.

Public Member Functions

 BList ()
 Constructs an invalid BList object.
 ~BList ()
 BList destructor.
const BItemitem (int index) const
 Returns the BItem on index index.
int size () const
 Returns the number of elements in the list.
void append (BItem *item)
 Appends an item to the list.

Protected Member Functions

bool read (BinaryReader &)
 Reads and loads a bencoded list item from the reader.

Protected Attributes

QList< const BItem * > list
const BErrorItem errorItem


Constructor & Destructor Documentation

BList::BList  ) 
 

Constructs an invalid BList object.

Definition at line 30 of file BList.cpp.

BList::~BList  ) 
 

BList destructor.

Deletes all the elements in the list;

Definition at line 39 of file BList.cpp.


Member Function Documentation

void BList::append BItem item  ) 
 

Appends an item to the list.

Appends the item item to the list.

Definition at line 49 of file BList.cpp.

const BItem * Protocols::BitTorrent::Bencoding::BList::item int  index  )  const [inline]
 

Returns the BItem on index index.

If an BItem on index exists - returns it. Otherwise returns an invalid BItem object.

Definition at line 61 of file BList.h.

bool BList::read BinaryReader reader  )  [protected, virtual]
 

Reads and loads a bencoded list item from the reader.

Returns true if all the loaded data is correct (every item of the list), false otherwise.

Implements Protocols::BitTorrent::Bencoding::BItem.

Definition at line 59 of file BList.cpp.

int Protocols::BitTorrent::Bencoding::BList::size  )  const [inline]
 

Returns the number of elements in the list.

Same as QList::size().

Definition at line 70 of file BList.h.


Member Data Documentation

const BErrorItem Protocols::BitTorrent::Bencoding::BList::errorItem [protected]
 

Definition at line 53 of file BList.h.

QList<const BItem *> Protocols::BitTorrent::Bencoding::BList::list [protected]
 

Definition at line 52 of file BList.h.


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