8 #ifndef BENCODING_BSTRING_H 9 #define BENCODING_BSTRING_H 33 ValueType::size_type
length()
const;
void setValue(ValueType value)
Sets a new value.
Definition: BString.cpp:36
Base class for all items (integers, strings, etc.).
Definition: BItem.h:20
ValueType::size_type length() const
Returns the number of characters in the string.
Definition: BString.cpp:43
virtual void accept(BItemVisitor *visitor) override
Accepts the item by the given visitor.
Definition: BString.cpp:47
Base class for all visitors of the BItem subclasses.
Definition: BItemVisitor.h:25
ValueType value() const
Returns the string's value.
Definition: BString.cpp:29
std::string ValueType
Type of the underlying string value.
Definition: BString.h:26
BString(ValueType value)
Constructs the string with the given value.
Definition: BString.cpp:17
Main namespace of the bencoding library.
static std::unique_ptr< BString > create(ValueType value)
Creates and returns a new string.
Definition: BString.cpp:22
Base class for all items (integers, strings, etc.).
ValueType _value
Definition: BString.h:44
Representation of a string.
Definition: BString.h:23