ok we started moving stuff over but for now it's not all working yet
This commit is contained in:
59
srcs/ConfigParser.hpp
Normal file
59
srcs/ConfigParser.hpp
Normal file
@@ -0,0 +1,59 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ConfigParser.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: me <erlazo@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/07/11 23:01:41 by me #+# #+# */
|
||||
/* Updated: 2022/07/23 15:53:19 by me ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef CONFIGPARSER_HPP
|
||||
# define CONFIGPARSER_HPP
|
||||
|
||||
# include "Webserv.hpp" // easier to just do this?
|
||||
|
||||
|
||||
class ConfigParser {
|
||||
|
||||
public:
|
||||
|
||||
// canonical
|
||||
|
||||
ConfigParser(const char* path); // a string?
|
||||
~ConfigParser();
|
||||
|
||||
// ideally i wouldn't have one cuz it makes no sense, when would i use it?
|
||||
// ConfigParser & operator=(const ConfigParser& rhs);
|
||||
|
||||
// void parse(); // return void cuz throw exceptions.
|
||||
std::vector<Server> * parse(); // const?
|
||||
|
||||
// other parses?
|
||||
|
||||
|
||||
private:
|
||||
std::string _content;
|
||||
|
||||
// explicit?
|
||||
// what exaclty does explicit do again?
|
||||
ConfigParser(); // might need a path as arg?
|
||||
// should this be in private since it always needs a path?
|
||||
|
||||
|
||||
void _check_proper_line_end(size_t prev, size_t curr); // const?
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user