GnuCash
5.6-150-g038405b370+
|
Public Member Functions | |
GncQuotes () | |
Create a GncQuotes object. More... | |
void | fetch (QofBook *book) |
Fetch quotes for all commodities in our db that have a quote source set. More... | |
void | fetch (CommVec &commodities) |
Fetch quotes for a vector of commodities. More... | |
void | fetch (gnc_commodity *comm) |
Fetch quote for a single commodity. More... | |
void | report (const char *source, const StrVec &commodities, bool verbose=false) |
Report quote results from Finance::Quote to std::cout. More... | |
const std::string & | version () noexcept |
Get the installed Finance::Quote version. More... | |
const QuoteSources & | sources () noexcept |
Get the available Finance::Quote sources as a std::vector. More... | |
bool | had_failures () noexcept |
Report if there were quotes requested but not retrieved. More... | |
const QFVec & | failures () noexcept |
Report the commodities for which quotes were requested but not successfully retrieved. More... | |
const std::string | report_failures () noexcept |
Definition at line 65 of file gnc-quotes.hpp.
GncQuotes::GncQuotes | ( | ) |
Create a GncQuotes object.
Throws a GncQuoteException if Finance::Quote is not installed or fails to initialize.
Definition at line 1040 of file gnc-quotes.cpp.
|
noexcept |
Report the commodities for which quotes were requested but not successfully retrieved.
This does not include requested commodities that didn't have a quote source.
Definition at line 1092 of file gnc-quotes.cpp.
void GncQuotes::fetch | ( | QofBook * | book | ) |
Fetch quotes for all commodities in our db that have a quote source set.
book | The current book. |
Definition at line 1052 of file gnc-quotes.cpp.
void GncQuotes::fetch | ( | CommVec & | commodities | ) |
Fetch quotes for a vector of commodities.
commodities | std::vector of the gnc_commodity* to get quotes for. |
Definition at line 1057 of file gnc-quotes.cpp.
void GncQuotes::fetch | ( | gnc_commodity * | comm | ) |
Fetch quote for a single commodity.
comm | Commodity for which to retrieve a quote |
Definition at line 1062 of file gnc-quotes.cpp.
|
noexcept |
Report if there were quotes requested but not retrieved.
Definition at line 1086 of file gnc-quotes.cpp.
void GncQuotes::report | ( | const char * | source, |
const StrVec & | commodities, | ||
bool | verbose = false |
||
) |
Report quote results from Finance::Quote to std::cout.
source | A valid quote source |
commodities | A std::vector of symbols to request quotes for. |
verbose | Ignored for currency queries. If false it will print the six fields GnuCash uses regardless of whether a value was returned; if true it will print all of the fields for which Finanace::Quote returned values. |
Definition at line 1067 of file gnc-quotes.cpp.
|
noexcept |
Get the available Finance::Quote sources as a std::vector.
Definition at line 1078 of file gnc-quotes.cpp.
|
noexcept |
Get the installed Finance::Quote version.
Definition at line 1073 of file gnc-quotes.cpp.