44 lines
1.6 KiB
C++
44 lines
1.6 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* BitcoinExchange.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2026/04/23 19:54:20 by aortigos #+# #+# */
|
|
/* Updated: 2026/04/23 19:54:20 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef BITCOINEXCHANGE_HPP
|
|
# define BITCOINEXCHANGE_HPP
|
|
|
|
# include <iostream>
|
|
# include <fstream>
|
|
# include <map>
|
|
# include <cstdlib>
|
|
|
|
using std::cout;
|
|
using std::endl;
|
|
|
|
class BitcoinExchange
|
|
{
|
|
private:
|
|
std::map<std::string, double> data;
|
|
|
|
bool validateAll(const std::string &date, const std::string &value);
|
|
bool validateDate(const std::string &date);
|
|
int validateValue(const std::string &value);
|
|
|
|
public:
|
|
BitcoinExchange();
|
|
BitcoinExchange(const BitcoinExchange &other);
|
|
BitcoinExchange& operator=(const BitcoinExchange &other);
|
|
~BitcoinExchange();
|
|
|
|
void readDatabase(std::ifstream &db);
|
|
void execute(std::ifstream &db);
|
|
};
|
|
|
|
#endif
|