#include <iostream>
#include "Money.h"
#include "formulas.h"
#include "Expense.h"
#include "Account.h"
#include <nlohmann/json.hpp>
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
void | listAvailableAccounts (nlohmann::json &data) |
Lists the currently available accounts to choose from. More... | |
void | viewAccount (Account &acc) |
Prints details of the current account. More... | |
void | updateAccount (Account &acc, map< string, Account > &accounts) |
Updates the current account. More... | |
void | createAccount (map< string, Account > &accounts) |
Creates a new account. More... | |
Account | createAccountInit (map< string, Account > &accounts) |
Creates a new account if no accounts are found on start. More... | |
Account | switchAccounts (const nlohmann::json &data) |
Allows the user to switch the account currently being used. More... | |
void | tools (Account &acc, map< string, Account > &accMap) |
Provides various tools for the user to use. More... | |
void | addIncome (Account &acc, map< string, Account > &accMap) |
void | viewCashFlow (Account acc) |
void | viewRecurring (Account acc) |
void | nowOrLater () |
void | determineGrowthRate () |
void | determineLeverageRatio (Account acc) |
void | doubleAnInvestment () |
void | payOffCreditCard () |
void | calculateLongTermLoan () |
void | toJSON (nlohmann::json &j, map< string, Account > accs) |
void | fromJSON (const nlohmann::json &j, Account &acc, const string &nameOf) |
Account | fromJSON (nlohmann::json &j, const string &nameOf) |
void | generateAccountMapFromJSON (map< string, Account > &accMap, nlohmann::json data) |
void | printJSON (const nlohmann::json &j) |
void | loadAccountData (nlohmann::json &j, bool &fileFound) |
void | saveInit (nlohmann::json &j) |
void | saveData (map< string, Account > accounts) |
void calculateLongTermLoan | ( | ) |
void createAccount | ( | map< string, Account > & | accounts | ) |
Creates a new account.
Creates a new Account object and adds it to the map of current accounts.
accounts | A map of the current accounts. |
Creates a new account if no accounts are found on start.
accounts | A map of the current accounts. |
void determineGrowthRate | ( | ) |
void determineLeverageRatio | ( | Account | acc | ) |
void doubleAnInvestment | ( | ) |
void fromJSON | ( | const nlohmann::json & | j, |
Account & | acc, | ||
const string & | nameOf | ||
) |
Account fromJSON | ( | nlohmann::json & | j, |
const string & | nameOf | ||
) |
void generateAccountMapFromJSON | ( | map< string, Account > & | accMap, |
nlohmann::json | data | ||
) |
void listAvailableAccounts | ( | nlohmann::json & | data | ) |
Lists the currently available accounts to choose from.
data | The JSON data to parse. |
void loadAccountData | ( | nlohmann::json & | j, |
bool & | fileFound | ||
) |
int main | ( | int | argc, |
char ** | argv | ||
) |
void nowOrLater | ( | ) |
void payOffCreditCard | ( | ) |
void printJSON | ( | const nlohmann::json & | j | ) |
void saveData | ( | map< string, Account > | accounts | ) |
void saveInit | ( | nlohmann::json & | j | ) |
Account switchAccounts | ( | const nlohmann::json & | data | ) |
Allows the user to switch the account currently being used.
data | The JSON data to generate the other account from. |
void toJSON | ( | nlohmann::json & | j, |
map< string, Account > | accs | ||
) |
Provides various tools for the user to use.
acc | The current Account. |
accMap | The map of current accounts. |
Updates the current account.
acc | The account to update |
accounts | The map of the current accounts |
void viewAccount | ( | Account & | acc | ) |
Prints details of the current account.
acc | The account to print values from. |
void viewCashFlow | ( | Account | acc | ) |
void viewRecurring | ( | Account | acc | ) |