Protocols::BitTorrent::Bencoding::BInt Class Reference

#include <BInt.h> [code]

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

Inheritance diagram for Protocols::BitTorrent::Bencoding::BInt:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Represents the bencoded int type.

qint64 is used instead of the standard int data type because of possible addressing problems on 32b platforms.

Definition at line 38 of file BInt.h.

Public Member Functions

 BInt (qint64 value=0)
 Constructs a BInt object with the value value.
 ~BInt ()
 BInt destructor.
qint64 value () const
 Returns the int value of the BInt object.

Protected Member Functions

bool read (BinaryReader &)
 Reads and loads a bencoded int value from the reader.

Protected Attributes

qint64 value_


Constructor & Destructor Documentation

Protocols::BitTorrent::Bencoding::BInt::BInt qint64  value = 0  )  [inline]
 

Constructs a BInt object with the value value.

Definition at line 53 of file BInt.h.

Protocols::BitTorrent::Bencoding::BInt::~BInt  )  [inline]
 

BInt destructor.

Definition at line 58 of file BInt.h.


Member Function Documentation

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

Reads and loads a bencoded int value from the reader.

Returns true if the loaded value is correct, false otherwise.

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

Definition at line 31 of file BInt.cpp.

qint64 Protocols::BitTorrent::Bencoding::BInt::value  )  const [inline]
 

Returns the int value of the BInt object.

Definition at line 62 of file BInt.h.


Member Data Documentation

qint64 Protocols::BitTorrent::Bencoding::BInt::value_ [protected]
 

Definition at line 49 of file BInt.h.


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