Furrent
Public Member Functions | List of all members
fur::bencode::BencodeDict Class Reference

#include <bencode_value.hpp>

Inheritance diagram for fur::bencode::BencodeDict:
Inheritance graph
[legend]
Collaboration diagram for fur::bencode::BencodeDict:
Collaboration graph
[legend]

Public Member Functions

 BencodeDict (std::map< std::string, std::unique_ptr< BencodeValue >> data)
 Constructs a BencodeDict object from a map of strings and BencodeValue. More...
 
std::string to_string () const override
 Returns the string representation of the bencode value. More...
 
BencodeType get_type () const override
 Returns the type of the bencode value as a BencodeType enum. More...
 
std::map< std::string, std::unique_ptr< BencodeValue > > & value ()
 
- Public Member Functions inherited from fur::bencode::BencodeValue
virtual ~BencodeValue ()=default
 

Constructor & Destructor Documentation

◆ BencodeDict()

BencodeDict::BencodeDict ( std::map< std::string, std::unique_ptr< BencodeValue >>  data)
explicit

Constructs a BencodeDict object from a map of strings and BencodeValue.

Member Function Documentation

◆ get_type()

BencodeType BencodeDict::get_type ( ) const
overridevirtual

Returns the type of the bencode value as a BencodeType enum.

Implements fur::bencode::BencodeValue.

◆ to_string()

std::string BencodeDict::to_string ( ) const
overridevirtual

Returns the string representation of the bencode value.

Implements fur::bencode::BencodeValue.

◆ value()

std::map< std::string, std::unique_ptr< BencodeValue > > & BencodeDict::value ( )

Returns the dictionary of BencodeValue objects that are contained in the dict


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