more utilities for data hiding

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@678 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-03-20 08:07:07 +00:00
parent 104624b473
commit f2aab8ba35
2 changed files with 34 additions and 0 deletions

View File

@ -695,4 +695,32 @@ xaccAccountGetNotes (Account *acc)
return (acc->notes); return (acc->notes);
} }
double
xaccAccountGetBalance (Account *acc)
{
return (acc->balance);
}
double
xaccAccountGetReconciledBalance (Account *acc)
{
return (acc->reconciled_balance);
}
Split *
xaccAccountGetSplit (Account *acc, int i)
{
if (!acc) return NULL;
if (!(acc->splits)) return NULL;
return (acc->splits[i]);
}
Split **
xaccAccountGetSplitList (Account *acc)
{
if (!acc) return NULL;
return (acc->splits);
}
/*************************** END OF FILE **************************** */ /*************************** END OF FILE **************************** */

View File

@ -119,6 +119,12 @@ char * xaccAccountGetNotes (Account *);
AccountGroup * xaccAccountGetChildren (Account *); AccountGroup * xaccAccountGetChildren (Account *);
AccountGroup * xaccAccountGetParent (Account *); AccountGroup * xaccAccountGetParent (Account *);
double xaccAccountGetBalance (Account *);
double xaccAccountGetReconciledBalance (Account *);
Split * xaccAccountGetSplit (Account *acc, int i);
Split ** xaccAccountGetSplitList (Account *acc);
/** GLOBALS *********************************************************/ /** GLOBALS *********************************************************/
extern int next_free_unique_account_id; extern int next_free_unique_account_id;