curl_stocks
Loading...
Searching...
No Matches
stock.h
Go to the documentation of this file.
1
8#ifndef STOCK_H
9#define STOCK_H
10
11#include <string> // for string
12
13class Api;
14class Plot;
15
19class Stock
20{
21private:
22 Api *api;
23 Plot *plot;
24 std::string stock_data;
25 std::string symbol;
27public:
31 Stock();
39 Stock(Api *a, Plot *p, std::string const &s);
40
46 void fetch(std::string const &function);
50 void display() const;
51};
52
53#endif /* ifndef STOCK_H */
54/* @}*/
Wraps alphavantage API. Fetches stock data using curl.
Definition api.h:44
Wraps gnuplot to plot stock data.
Definition plot.h:25
Stores information about a stock and handles its functions.
Definition stock.h:20
void display() const
Plot stock data.
Definition stock.cpp:26
void fetch(std::string const &function)
Fetch historical stock data.
Definition stock.cpp:16
Stock()
Default constructor.
Definition stock.cpp:6