diff options
Diffstat (limited to 'cli/context.hxx')
-rw-r--r-- | cli/context.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/context.hxx b/cli/context.hxx index 4d88fe9..eb2e412 100644 --- a/cli/context.hxx +++ b/cli/context.hxx @@ -9,6 +9,7 @@ #include <map> #include <string> #include <ostream> +#include <cstddef> // std::size_t #include <cutl/shared-ptr.hxx> @@ -20,6 +21,7 @@ using std::endl; class context { public: + typedef std::size_t size_t; typedef std::string string; private: @@ -46,6 +48,19 @@ public: escape (string const&) const; public: + static string const& + ename (semantics::nameable& n) + { + return n.context ().get<string> ("name"); + } + + static string const& + emember (semantics::nameable& n) + { + return n.context ().get<string> ("member"); + } + +public: context (std::ostream&, semantics::cli_unit&); |