piscine_cpp/cpp01/ex04/sed.hpp

37 lines
1.3 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* sed.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/05 15:27:45 by rparodi #+# #+# */
/* Updated: 2024/12/23 12:36:59 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SED_HPP
#define SED_HPP
#include <iostream>
#include <streambuf>
#include <string>
#include <fstream>
#include "err_msg.hpp"
class Sed
{
public:
Sed(char **argv, std::ifstream *input);
~Sed();
bool line(std::ofstream& output);
const char *getFilename();
private:
std::string _filename;
std::string _to_replace;
std::string _by_word;
std::ifstream *_input;
};
#endif