Still trying to get it to compile

This commit is contained in:
Me
2022-07-29 23:29:19 +02:00
parent 3ff62f5ddc
commit 001ad6becf
8 changed files with 209 additions and 147 deletions

View File

@@ -14,6 +14,7 @@
# define CONFIGPARSER_HPP
# include "Webserv.hpp" // easier to just do this?
# include "ServerConfig.hpp"
// add includes properly
@@ -22,6 +23,8 @@
#define MAX_URI_SIZE 64
#define BSIZE 1024
/*
// this can't be here...
enum MethodType
{
GET,
@@ -29,7 +32,7 @@ enum MethodType
DELETE,
INVALID,
};
*/
class ConfigParser {
@@ -45,11 +48,14 @@ public:
// ConfigParser & operator=(const ConfigParser& rhs);
// void parse(); // return void cuz throw exceptions.
//std::vector<Server> * parse(); // const?
std::vector<ServerConfig> parse(); // const?
std::vector<ServerConfig> * parse(); // const?
// std::vector<ServerConfig> parse(); // const?
// other parses?
// i thought if it were an instance of this class you could call
// private member functions from anywhere...
void _print_content() const;
private:
std::string _content;
@@ -76,7 +82,6 @@ private:
static MethodType _str_to_method_type(std::string str);
// just for testing purposes
void _print_content() const;
};