Contarius/include/account.h

29 lines
787 B
C

/** @file account.h
* Account structure header file used in the program
*/
#ifndef ACCOUNT_H
#define ACCOUNT_H
#include "subaccount.h"
#include "money.h"
/**
* @struct account
* @brief Struct representing an Account in the the T-Account
*/
typedef struct account {
char *name; ///<Name of the account
char *description; ///< Description of the account
Money *value; ///< Total of the values of the subaccounts
SubAccount *subaccounts; ///< List of subaccounts
int numberOfSubaccounts; ///< Number of subaccounts on the list
} Account;
Account *initializeAccount(char *name, char *description);
void updateAccountValue(Account *account, Money *value);
void addSubAccountToAccount(Account *account, SubAccount *subaccount);
void destroyAccount(Account *account);
#endif