finally, data hiding for the account group

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@679 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 1998-03-20 08:17:58 +00:00
parent f2aab8ba35
commit 24eaffd8fe
8 changed files with 66 additions and 17 deletions

View File

@ -30,6 +30,7 @@
#include "Account.h"
#include "AccountP.h"
#include "Group.h"
#include "GroupP.h"
#include "date.h"
#include "messages.h"
#include "Transaction.h"

View File

@ -1,6 +1,7 @@
/********************************************************************\
* Account.h -- the Account data structure *
* Copyright (C) 1997 Robin D. Clark *
* Copyright (C) 1997, 1998 Linas Vepstas *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *

View File

@ -87,6 +87,7 @@
#include "AccountP.h"
#include "FileIO.h"
#include "Group.h"
#include "GroupP.h"
#include "messages.h"
#include "TransactionP.h"
#include "util.h"

View File

@ -28,6 +28,7 @@
#include "Account.h"
#include "AccountP.h"
#include "Group.h"
#include "GroupP.h"
#include "TransactionP.h"
#include "util.h"

View File

@ -1,7 +1,7 @@
/********************************************************************\
* Group.h -- the main data structure of the program *
* Copyright (C) 1997 Robin D. Clark *
* Copyright (C) 1997 Linas Vepstas *
* Copyright (C) 1997, 1998 Linas Vepstas *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
@ -30,22 +30,6 @@
#include "Account.h"
/** STRUCTS *********************************************************/
struct _account_group {
/* The flags: */
unsigned int saved : 1;
unsigned int new : 1;
Account *parent; /* back-pointer to parent */
int numAcc; /* number of accounts in array */
Account **account; /* array of account pointers */
/* cached parameters */
double balance;
};
/** PROTOTYPES ******************************************************/
AccountGroup *xaccMallocAccountGroup( void );
void xaccFreeAccountGroup( AccountGroup *account_group );

58
src/engine/GroupP.h Normal file
View File

@ -0,0 +1,58 @@
/*
* FILE:
* GroupP.h
*
* FUNCTION:
* This is the *private* account group structure.
* This header should *not* be included by any code outside of the
* engine.
*
*/
/********************************************************************\
* GroupP.h -- the main data structure of the program *
* Copyright (C) 1997 Robin D. Clark *
* Copyright (C) 1997, 1998 Linas Vepstas *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
* Author: Rob Clark *
* Internet: rclark@cs.hmc.edu *
* Address: 609 8th Street *
* Huntington Beach, CA 92648-4632 *
\********************************************************************/
#ifndef __XACC_ACCOUNT_GROUP_P_H__
#define __XACC_ACCOUNT_GROUP_P_H__
#include "config.h"
#include "Transaction.h"
/** STRUCTS *********************************************************/
struct _account_group {
/* The flags: */
unsigned int saved : 1;
unsigned int new : 1;
Account *parent; /* back-pointer to parent */
int numAcc; /* number of accounts in array */
Account **account; /* array of account pointers */
/* cached parameters */
double balance;
};
#endif /* __XACC_ACCOUNT_GROUP_P_H__ */

View File

@ -23,6 +23,7 @@
#include "Account.h"
#include "AccountP.h"
#include "Group.h"
#include "GroupP.h"
#include "Transaction.h"
#include "util.h"

View File

@ -36,7 +36,9 @@
#include "Account.h"
#include "AccountP.h"
#include "Group.h"
#include "GroupP.h"
#include "FileIO.h"
#include "Transaction.h"
#include "TransactionP.h"
#include "util.h"