summaryrefslogtreecommitdiff
path: root/register.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-27 10:08:42 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:31 -0400
commit0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f (patch)
tree750d64f6817282a6f4744058f73164a2996f6b03 /register.h
parentd01629148383261d7944e91fd2ac67b334a6834d (diff)
downloadfork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.gz
fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.bz2
fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.zip
Restructured the code to use the new utility code in utils.h.
Diffstat (limited to 'register.h')
-rw-r--r--register.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/register.h b/register.h
index 73078892..ba2020ec 100644
--- a/register.h
+++ b/register.h
@@ -20,6 +20,19 @@ class register_command : public xml::xpath_t::functor_t
virtual void print_document(std::ostream& out, xml::document_t * doc);
};
+enum elision_style_t {
+ TRUNCATE_TRAILING,
+ TRUNCATE_MIDDLE,
+ TRUNCATE_LEADING,
+ ABBREVIATE
+};
+
+string abbreviate(const string& str,
+ unsigned int width,
+ elision_style_t elision_style = TRUNCATE_TRAILING,
+ const bool is_account = false,
+ int abbrev_length = 2);
+
} // namespace ledger
#endif // _REGISTER_H