8 #ifndef BENCODING_ENCODER_H 9 #define BENCODING_ENCODER_H 31 static std::unique_ptr<Encoder>
create();
33 std::string
encode(std::shared_ptr<BItem> data);
53 std::string
encode(std::shared_ptr<BItem> data);
Representation of an integer.
Definition: BInteger.h:23
std::string encode(std::shared_ptr< BItem > data)
Encodes the given data and returns them.
Definition: Encoder.cpp:33
Base class for all visitors of the BItem subclasses.
Base class for all visitors of the BItem subclasses.
Definition: BItemVisitor.h:25
std::string encode(std::shared_ptr< BItem > data)
Encodes the given data and returns them.
Definition: Encoder.cpp:82
Representation of a dictionary.
Definition: BDictionary.h:39
static std::unique_ptr< Encoder > create()
Creates a new encoder.
Definition: Encoder.cpp:26
std::string encodedData
Encoded items.
Definition: Encoder.h:48
virtual void visit(BDictionary *bDictionary) override
Definition: Encoder.cpp:38
Encoder()
Constructs an encoder.
Definition: Encoder.cpp:21
Main namespace of the bencoding library.
Data encoder.
Definition: Encoder.h:29
Representation of a string.
Definition: BString.h:23
Representation of a list.
Definition: BList.h:26