Personal Finance 1.0.0
An application that allows you to track/store/view finances, as well as calculate different financial values.
main.h
Go to the documentation of this file.
1/*
2 * Author: Dawson Dauphinais
3 * ddauphin@nmu.edu
4 *
5 * Date Last Modified: 11/23/2021
6 *
7 * This file contains the definitions of the functions used by the main program.
8 * */
9/*
10 * This application contains software from:
11*
12* Title: "JSON for Modern C++"
13* Author: Lohmann, Niels
14* -orchid: https://orcid.org/0000-0001-9037-795X
15* -email: mail@nlohmann.me
16* -website: https://nlohmann.me
17*
18* Version: 3.10.4
19* License: MIT
20* Repository-Code: "https://github.com/nlohmann"
21* URL: https://json.nlohmann.me
22 * */
23#ifndef PERSONALFINANCE_MAIN_H
24#define PERSONALFINANCE_MAIN_H
25
26#include <iostream>
27#include "Money.h"
28#include "formulas.h"
29#include "Expense.h"
30#include "Account.h"
31#include <nlohmann/json.hpp>
32
33using namespace std;
34
35int main(int argc, char **argv);
36
42void listAvailableAccounts(nlohmann::json &data);
43
50
57void updateAccount(Account &acc, map<string, Account> &accounts);
58
65void createAccount(map<string, Account> &accounts);
66
74Account createAccountInit(map<string, Account> &accounts);
75
82Account switchAccounts(const nlohmann::json &data);
83
90void tools(Account &acc, map<string, Account> &accMap);
91
92void addIncome(Account &acc, map<string, Account> &accMap);
93
95
97
99
101
103
105
107
109
110void toJSON(nlohmann::json &j, map<string, Account> accs);
111
112void fromJSON(const nlohmann::json &j, Account &acc, const string &nameOf);
113
114Account fromJSON(nlohmann::json &j, const string &nameOf);
115
116void generateAccountMapFromJSON(map<string, Account> &accMap, nlohmann::json data);
117
118void printJSON(const nlohmann::json &j);
119
120void loadAccountData(nlohmann::json &j, bool &fileFound);
121
122void saveInit(nlohmann::json &j);
123
124void saveData(map<string, Account> accounts);
125
126#endif //PERSONALFINANCE_MAIN_H
The Account class is used to perform various operations on an Account object.
Definition: Account.h:41
void createAccount(map< string, Account > &accounts)
Creates a new account.
void viewAccount(Account &acc)
Prints details of the current account.
void determineLeverageRatio(Account acc)
void determineGrowthRate()
void saveInit(nlohmann::json &j)
void loadAccountData(nlohmann::json &j, bool &fileFound)
void nowOrLater()
void calculateLongTermLoan()
void generateAccountMapFromJSON(map< string, Account > &accMap, nlohmann::json data)
int main(int argc, char **argv)
void payOffCreditCard()
void listAvailableAccounts(nlohmann::json &data)
Lists the currently available accounts to choose from.
Account createAccountInit(map< string, Account > &accounts)
Creates a new account if no accounts are found on start.
void viewRecurring(Account acc)
Account switchAccounts(const nlohmann::json &data)
Allows the user to switch the account currently being used.
void fromJSON(const nlohmann::json &j, Account &acc, const string &nameOf)
void tools(Account &acc, map< string, Account > &accMap)
Provides various tools for the user to use.
void saveData(map< string, Account > accounts)
void toJSON(nlohmann::json &j, map< string, Account > accs)
void doubleAnInvestment()
void viewCashFlow(Account acc)
void printJSON(const nlohmann::json &j)
void addIncome(Account &acc, map< string, Account > &accMap)
void updateAccount(Account &acc, map< string, Account > &accounts)
Updates the current account.