CPP01 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Harl.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* Harl.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/04/19 22:03:19 by kamitsui #+# #+# */
9/* Updated: 2025/04/23 01:44:40 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
18#ifndef HARL_HPP
19#define HARL_HPP
20
21#include <iostream>
22#include <map>
23#include <string>
24
28class Harl {
29 private:
30 typedef void (Harl::*ComplaintFunc)(void);
31 void debug(void);
32 void info(void);
33 void warning(void);
34 void error(void);
35
36 // NG : No container and No Algorithms (cpp00~07)
37 // static const std::map<std::string, ComplaintFunc> complaintsMap;
38 // static std::map<std::string, ComplaintFunc> initializeComplaintMap();
39
40 public:
44 Harl();
45
49 Harl(const Harl &other);
50
54 Harl &operator=(const Harl &other);
55
59 ~Harl();
60
64 void complain(std::string level);
65};
66
67#endif
Represents a Harl character who can complain at different levels.
Definition Harl.hpp:28
~Harl()
Destructor for the Harl class.
Definition Harl.cpp:54
Harl & operator=(const Harl &other)
Copy assignment operator for the Harl class.
Definition Harl.cpp:44
Harl()
Default constructor for the Harl class.
Definition Harl.cpp:27
void complain(std::string level)
Makes Harl complain based on the specified level.
Definition Harl.cpp:101