Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/FeliCa2Money-1/Transaction.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 204 - (show annotations) (download) (as text)
Sun May 18 04:21:26 2008 UTC (15 years, 10 months ago) by tmurakam
File MIME type: text/x-chdr
File size: 2145 byte(s)
Move older version (ver 1.x)

1 /*
2 * FeliCa2Money
3 *
4 * Copyright (C) 2001-2007 Takuya Murakami
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20 #ifndef _TRANSACTION_H
21 #define _TRANSACTION_H
22
23 #include <vector>
24
25 using namespace std;
26
27 /**
28 @brief ŽćˆřŽí—Ţ
29 */
30 typedef enum {
31 // “ü‹ŕ
32 T_INT=0, ///< —˜‘§
33 T_DIV, ///< ”z“–
34 T_DIRECTDEP, ///< Už“ü‹ŕAŽć—§“ü‹ŕAŽŠ“Žˆř—Ž–ß‚ľ“ü‹ŕ
35 T_DEP, ///< ‚ť‚Ě‘ź“ü‹ŕ
36
37 // o‹ŕ
38 T_PAYMENT, ///< ŽŠ“Žˆř‚Ť—ނÂľ
39 T_CASH, ///< Œť‹ŕˆř‚Ťo‚ľ
40 T_ATM, ///< ƒJ[ƒh‚É‚ć‚éˆř‚Ťo‚ľ
41 T_CHECK, ///< ŹŘŽčŠÖ˜AŽćˆř
42 T_DEBIT, ///< ‚ť‚Ě‘źo‹ŕ
43 } trntype;
44
45 //
46 // ŽćˆřŽí—Ţ–ź (ă‚Ě’l‚Ə‡˜ˆę’v‚ˇ‚邹‚Ć)
47 //
48 #ifdef DEFINE_TRNNAME
49 const char *trnname[] = {
50 "INT", "DIV", "DIRECTDEP", "DEP",
51 "PAYMENT", "CASH", "ATM", "CHECK", "DEBIT"
52 };
53 #endif
54
55 /**
56 @brief ŽćˆřŽí—ޕϊˇ•\
57 */
58 struct trntable {
59 const char *key; ///< ƒL[
60 trntype type; ///< ŽćˆřŽí—Ţ
61 };
62
63 #define T_INCOME 0
64 #define T_OUTGO 1
65
66 /**
67 @brief “ú•tî•ń
68 */
69 typedef struct {
70 int year;
71 int month;
72 int date;
73 int hour;
74 int minutes;
75 int seconds;
76 } DateTime;
77
78
79 /**
80 @brief ƒgƒ‰ƒ“ƒUƒNƒVƒ‡ƒ“ƒf[ƒ^
81 */
82 class Transaction {
83 public:
84 DateTime date; ///< “ú•t
85 unsigned long id; ///< ID
86 AnsiString desc; ///< ŕ–ž
87 AnsiString memo; ///< ƒƒ‚
88 trntype type; ///< Ží•Ę
89 long value; ///< ‹ŕŠz
90 long balance; ///< Žc‚
91
92 void SetTransactionType(const char *desc, int type);
93
94 const char *GetTrnTypeStr(void);
95 };
96
97 // ƒ†[ƒeƒBƒŠƒeƒBŠÖ”
98 AnsiString sjis2utf8(const AnsiString & sjis);
99
100 #endif
101

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26