「✨」 feat: finished ex00
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/05/21 10:38:49 by adjoly #+# #+# */
|
||||
/* Updated: 2025/05/30 20:31:26 by adjoly ### ########.fr */
|
||||
/* Updated: 2025/06/03 11:22:28 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#define range(x) \
|
||||
x.begin(); \
|
||||
@ -89,13 +90,31 @@ class CsvParser {
|
||||
class BitcoinExchange {
|
||||
public:
|
||||
BitcoinExchange(void);
|
||||
BitcoinExchange(char *av);
|
||||
BitcoinExchange(const BitcoinExchange &);
|
||||
~BitcoinExchange(void);
|
||||
|
||||
BitcoinExchange &operator=(const BitcoinExchange &);
|
||||
|
||||
void print(void);
|
||||
|
||||
protected:
|
||||
private:
|
||||
void _nextToken(void);
|
||||
std::string _peekToken(void) const;
|
||||
std::ifstream _is;
|
||||
std::string _filename;
|
||||
std::string _line;
|
||||
CsvParser *_csv;
|
||||
|
||||
std::pair<Date, float> _parseLine(void);
|
||||
void _printPair(std::pair<Date, float>);
|
||||
};
|
||||
|
||||
class CompareDate {
|
||||
public:
|
||||
CompareDate(Date);
|
||||
|
||||
bool operator()(const std::pair<Date, float> &pair) const;
|
||||
|
||||
private:
|
||||
Date _date;
|
||||
};
|
||||
|
Reference in New Issue
Block a user