This repository has been archived by the owner on May 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FXRateNBP.h
45 lines (40 loc) · 1.26 KB
/
FXRateNBP.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef FXRATENBP_H
#define FXRATENBP_H
/**
* \file
* \brief Definicja klasy FXRateNBP, pobierającej kurs walutowy ze strony <a href="http://www.nbp.pl">nbp.pl</a>.
*
* Plik ten jest częścią projektu currency_calc.
*/
#include <string>
#include "FXRate.h"
#include "CURLWrapper.h"
/**
* \brief Klasa algorytmu pobierania kursów ze strony <a href="http://www.nbp.pl">nbp.pl</a>.
*
* Klasa potomna od FTRate, wykorzystywana we wzorcu <b>strategy</b>,
* wyboru algorytmu pobierania kursów walutowych.\n
* Pobiera kursy walutowe ze strony Narodowego Banku Polskiego, wykorzystując CURLWrapper.
*/
class FXRateNBP : public FXRate
{
private:
/**
* \brief Generuje nazwę pliku .xml, dla podanej daty.
*/
std::string getXmlFromDate(std::string* dir_file, std::string data);
/**
* \brief Wyszukuje odpowiedni kurs w pliku .xml z nbp.pl.
*/
double getValue(std::string* xml, const std::string& curr);
public:
/**
* \brief Wirtualny destruktor.
*/
virtual ~FXRateNBP() {}
/**
* \brief Funckja pobierania kursu.
*/
virtual int getCours(const std::string& in_curr, const std::string& out_curr, const std::string& data);
};
#endif // FXRATENBP_H