Added a new type: longlong
TcpClient and TcpServer are now structs intead of classes Starting with UdpClient Added 2 new methods to StringConverter: Split and Trim ConfigReader: Changed ReadNodes return type to void, parameter of operator [] is now a std::string Starting with the VoidNetServer class which is an all in one for Tcp and Udp Finally implemented the methods for the ConfigReader
This commit is contained in:
@ -57,14 +57,17 @@ struct Utility
|
||||
static const std::string &ToString(const std::vector<byte> &bytes);
|
||||
|
||||
static const std::string &ToString(const std::vector<byte> &bytes, uint16 start_index = 0, uint16 lenght = 0);
|
||||
|
||||
static const std::string &Trim(std::string &str, char ch);
|
||||
static std::vector<std::string> Split(const std::string &str, const std::string &delimiter);
|
||||
};
|
||||
|
||||
struct ConfigReader
|
||||
{
|
||||
void ReadConfig(const std::string &file_name);
|
||||
const std::map<std::string, std::string> &ReadNodes();
|
||||
void ReadNodes();
|
||||
|
||||
const std::string &operator[](uint16 index);
|
||||
const std::string &operator[](const std::string &key);
|
||||
|
||||
private:
|
||||
std::map<std::string, std::string> nodes;
|
||||
|
||||
Reference in New Issue
Block a user