push
This commit is contained in:
parent
1a511386b2
commit
84e23db429
|
|
@ -0,0 +1,18 @@
|
|||
#include "BitcoinExchange.hpp"
|
||||
|
||||
BitcoinExchange::BitcoinExchange()
|
||||
{}
|
||||
|
||||
BitcoinExchange::BitcoinExchange(const BitcoinExchange &other)
|
||||
{
|
||||
this->_data = other._data;
|
||||
}
|
||||
|
||||
BitcoinExchange::~BitcoinExchange()
|
||||
{}
|
||||
|
||||
BitcoinExchange &BitcoinExchange::operator=(const BitcoinExchange &other)
|
||||
{
|
||||
this->_data = other._data;
|
||||
return (*this);
|
||||
}
|
||||
|
|
@ -14,13 +14,12 @@ class BitcoinExchange
|
|||
|
||||
void loadDatabase(const std::string &filename);
|
||||
void processInput(const std::string &filename);
|
||||
|
||||
private:
|
||||
std::map<std::string, float> _data;
|
||||
|
||||
float getRate(const std::string &date) const;
|
||||
bool isValidDate(const std::string &date) const;
|
||||
bool isValidValue(const std::string &value, float &out) const;
|
||||
|
||||
private:
|
||||
std::map<std::string, float> _data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
CXX = c++
|
||||
CXXFLAGS = -Wall -Wextra -Werror -std=c++98
|
||||
OBJDIR = obj
|
||||
SOURCES = Main.cpp
|
||||
SOURCES = Main.cpp BitcoinExchange.cpp
|
||||
OBJECTS = $(addprefix $(OBJDIR)/, $(SOURCES:.cpp=.o))
|
||||
NAME = btc
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue