summaryrefslogtreecommitdiff
path: root/src/item.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-02-04 18:23:52 -0500
committerJohn Wiegley <johnw@newartisans.com>2010-02-04 18:23:52 -0500
commitb78e22d52b75cafd63678ee786b1653afffa49e6 (patch)
treebdb9fbeb401fde311189451b8b792dd69702baba /src/item.h
parentc92a54b0ab510762e10cd4cab1082a9e59716025 (diff)
downloadfork-ledger-b78e22d52b75cafd63678ee786b1653afffa49e6.tar.gz
fork-ledger-b78e22d52b75cafd63678ee786b1653afffa49e6.tar.bz2
fork-ledger-b78e22d52b75cafd63678ee786b1653afffa49e6.zip
Added a "seq" sequence property for all items
This indicates the absolute parsing order of every transaction and posting. It is 0 for generated items.
Diffstat (limited to 'src/item.h')
-rw-r--r--src/item.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/item.h b/src/item.h
index 84385eb7..8250ab6e 100644
--- a/src/item.h
+++ b/src/item.h
@@ -53,8 +53,10 @@ struct position_t
std::size_t beg_line;
istream_pos_type end_pos;
std::size_t end_line;
+ std::size_t sequence;
- position_t() : beg_pos(0), beg_line(0), end_pos(0), end_line(0) {
+ position_t()
+ : beg_pos(0), beg_line(0), end_pos(0), end_line(0), sequence(0) {
TRACE_CTOR(position_t, "");
}
position_t(const position_t& pos) {
@@ -72,6 +74,7 @@ struct position_t
beg_line = pos.beg_line;
end_pos = pos.end_pos;
end_line = pos.end_line;
+ sequence = pos.sequence;
}
return *this;
}
@@ -89,6 +92,7 @@ private:
ar & beg_line;
ar & end_pos;
ar & end_line;
+ ar & sequence;
}
#endif // HAVE_BOOST_SERIALIZATION
};