Added parser class

This commit is contained in:
ouafabulous 2025-05-19 15:25:33 +02:00
parent 86531035a8
commit 53a83308de
6 changed files with 105 additions and 17 deletions

30
include/core/parser.hpp Normal file
View file

@ -0,0 +1,30 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parser.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: omoudni <omoudni@student.42paris.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/05/19 14:47:46 by omoudni #+# #+# */
/* Updated: 2025/05/19 15:14:31 by omoudni ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
#include "core.hpp"
#include <string>
class Parser {
private:
unsigned short int _port;
std::string _password;
bool _valid;
std::string _errorMsg;
public:
Parser(int argc, char* argv[]);
bool isValid() const;
unsigned short int getPort() const;
const std::string& getPassword() const;
const std::string& getErrorMsg() const;
};