BItem.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PROTOCOLS__BIT_TORRENT__BENCODING__B_ITEM_H
00024 #define PROTOCOLS__BIT_TORRENT__BENCODING__B_ITEM_H
00025
00026 #include "Imports.h"
00027
00028 namespace Protocols {
00029 namespace BitTorrent {
00030 namespace Bencoding {
00031
00033
00044 class BItem
00045 {
00046 public:
00047 virtual ~BItem();
00048 static auto_ptr <BItem> readItem (BinaryReader &);
00049
00050 protected :
00051 BItem();
00052 virtual bool read (BinaryReader &) = 0;
00053 bool tryReadInt (BinaryReader&,
00054 qint64 &outValue, char terminator) const;
00055 };
00056
00058 inline BItem::BItem()
00059 {}
00060
00062 inline BItem::~BItem()
00063 {}
00064
00065 }
00066 }
00067 }
00068
00069 #endif // PROTOCOLS__BIT_TORRENT__BENCODING__B_ITEM_H