more data hiding stuff

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@677 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-03-20 06:27:58 +00:00
parent 2afb8e10cf
commit 104624b473
2 changed files with 64 additions and 3 deletions

View File

@ -23,6 +23,8 @@
* Huntington Beach, CA 92648-4632 *
\********************************************************************/
#include <string.h>
#include "config.h"
#include "Account.h"
@ -623,6 +625,40 @@ xaccConsolidateTransactions (Account * acc)
/********************************************************************\
\********************************************************************/
void
xaccAccountSetType (Account *acc, int tip)
{
if (!acc) return;
acc->type = tip;
}
void
xaccAccountSetName (Account *acc, char *str)
{
if (!acc) return;
if (acc->accountName) free (acc->accountName);
acc->accountName = strdup (str);
}
void
xaccAccountSetDescription (Account *acc, char *str)
{
if (!acc) return;
if (acc->description) free (acc->description);
acc->description = strdup (str);
}
void
xaccAccountSetNotes (Account *acc, char *str)
{
if (!acc) return;
if (acc->notes) free (acc->notes);
acc->notes = strdup (str);
}
/********************************************************************\
\********************************************************************/
AccountGroup *
xaccAccountGetChildren (Account *acc)
{
@ -635,6 +671,11 @@ xaccAccountGetParent (Account *acc)
return (acc->parent);
}
int
xaccAccountGetType (Account *acc)
{
return (acc->type);
}
char *
xaccAccountGetName (Account *acc)
@ -642,4 +683,16 @@ xaccAccountGetName (Account *acc)
return (acc->accountName);
}
char *
xaccAccountGetDescription (Account *acc)
{
return (acc->description);
}
char *
xaccAccountGetNotes (Account *acc)
{
return (acc->notes);
}
/*************************** END OF FILE **************************** */

View File

@ -107,9 +107,17 @@ void xaccConsolidateTransactions (Account *);
void xaccMoveFarEnd (Split *, Account *);
void xaccMoveFarEndByName (Split *, const char *);
void xaccAccountSetType (Account *, int);
void xaccAccountSetName (Account *, char *);
void xaccAccountSetDescription (Account *, char *);
void xaccAccountSetNotes (Account *, char *);
int xaccAccountGetType (Account *);
char * xaccAccountGetName (Account *);
AccountGroup *xaccAccountGetChildren (Account *);
AccountGroup *xaccAccountGetParent (Account *);
char * xaccAccountGetDescription (Account *);
char * xaccAccountGetNotes (Account *);
AccountGroup * xaccAccountGetChildren (Account *);
AccountGroup * xaccAccountGetParent (Account *);
/** GLOBALS *********************************************************/