diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-30 08:24:37 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:34 -0400 |
commit | 3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba (patch) | |
tree | dc04c7feaeab4ce255f4f74d47325f4efb9f8314 /src/context.h | |
parent | 83fc097062c3380091556c6a4b703d28821d5464 (diff) | |
download | ledger-3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba.tar.gz ledger-3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba.tar.bz2 ledger-3ba6c2572dfc58bcd963cbc8cac1cce2f5b01dba.zip |
Changed some of the logging macro names.
Diffstat (limited to 'src/context.h')
-rw-r--r-- | src/context.h | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/src/context.h b/src/context.h index 3851d073..899c9b88 100644 --- a/src/context.h +++ b/src/context.h @@ -7,20 +7,30 @@ class context { public: string context; // ex: 'While parsing file "%R" at line %L' +}; + +class file_context : public context +{ +public: + path pathname; // ex: ledger.dat - string resource; // ex: ledger.dat - long linenum_beg; // ex: 1010 - long linenum_end; // ex: 1010 - long colnum_beg; // ex: 8 - long colnum_end; // ex: 8 - long position_beg; - long position_end; + optional<long> linenum_beg; // ex: 1010 + optional<long> linenum_end; // ex: 1010 + optional<long> colnum_beg; // ex: 8 + optional<long> colnum_end; // ex: 8 + optional<long> position_beg; + optional<long> position_end; +}; +class string_context : public context +{ +public: string text; // ex: (The multi-line text of an entry) - long linenum_beg_off; // ex: 2 / -1 means start at beginning - long linenum_end_off; // ex: 2 / -1 means start at beginning - long colnum_beg_off; // ex: 8 / -1 means start - long colnum_end_off; // ex: 8 / -1 means start + + optional<long> linenum_beg_off; // ex: 2 / none means start at beginning + optional<long> linenum_end_off; // ex: 2 / none means start at beginning + optional<long> colnum_beg_off; // ex: 8 / none means start + optional<long> colnum_end_off; // ex: 8 / none means start }; } // namespace ledger |