Changed some of the transaction flags, since all must fit in 8 bits.
This commit is contained in:
parent
eb425536d4
commit
0e95974360
2 changed files with 8 additions and 14 deletions
14
src/item.h
14
src/item.h
|
|
@ -37,19 +37,13 @@
|
|||
|
||||
namespace ledger {
|
||||
|
||||
class entry_t;
|
||||
class account_t;
|
||||
|
||||
class item_t;
|
||||
typedef std::list<item_t *> items_list;
|
||||
|
||||
class item_t : public supports_flags<>, public scope_t
|
||||
{
|
||||
public:
|
||||
#define ITEM_NORMAL 0x0000 // no flags at all, a basic transaction
|
||||
#define ITEM_IN_CACHE 0x0001 // transaction allocated by the binary cache
|
||||
#define ITEM_GENERATED 0x0002 // transaction was not found in a journal
|
||||
#define ITEM_TEMP 0x0004 // transaction is a temporary object
|
||||
#define ITEM_NORMAL 0x00 // no flags at all, a basic transaction
|
||||
#define ITEM_IN_CACHE 0x01 // transaction allocated by the binary cache
|
||||
#define ITEM_GENERATED 0x02 // transaction was not found in a journal
|
||||
#define ITEM_TEMP 0x04 // transaction is a temporary object
|
||||
|
||||
enum state_t { UNCLEARED = 0, CLEARED, PENDING };
|
||||
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@ typedef std::list<xact_t *> xacts_list;
|
|||
class xact_t : public item_t
|
||||
{
|
||||
public:
|
||||
#define XACT_VIRTUAL 0x0100 // the account was specified with (parens)
|
||||
#define XACT_MUST_BALANCE 0x0200 // the account was specified with [brackets]
|
||||
#define XACT_AUTO 0x0400 // transaction created by automated entry
|
||||
#define XACT_CALCULATED 0x0800 // transaction's amount was auto-calculated
|
||||
#define XACT_VIRTUAL 0x10 // the account was specified with (parens)
|
||||
#define XACT_MUST_BALANCE 0x20 // the account was specified with [brackets]
|
||||
#define XACT_AUTO 0x40 // transaction created by automated entry
|
||||
#define XACT_CALCULATED 0x80 // transaction's amount was auto-calculated
|
||||
|
||||
entry_t * entry; // only set for xacts of regular entries
|
||||
account_t * account;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue