diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-05-21 11:22:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-05-21 11:22:50 +0200 |
commit | d50b3099ec02374e3c45782b7e1dca84bf53e376 (patch) | |
tree | 3ead6da5cb1eb491ac4bb2aa363147709d9f9318 /odb/context.hxx | |
parent | 1d805d74cc78ecf61e9530f1132faa9eae68287a (diff) |
Add escape() function
Diffstat (limited to 'odb/context.hxx')
-rw-r--r-- | odb/context.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/odb/context.hxx b/odb/context.hxx index c91c260..057b821 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -6,6 +6,7 @@ #ifndef ODB_CONTEXT_HXX #define ODB_CONTEXT_HXX +#include <set> #include <string> #include <ostream> #include <cstddef> // std::size_t @@ -27,6 +28,12 @@ public: typedef std::string string; typedef ::options options_type; +public: + // Escape C++ keywords, reserved names, and illegal characters. + // + string + escape (string const&) const; + private: struct data; cutl::shared_ptr<data> data_; @@ -36,9 +43,13 @@ public: semantics::unit& unit; options_type const& options; + typedef std::set<string> keyword_set_type; + keyword_set_type const& keyword_set; + private: struct data { + keyword_set_type keyword_set_; }; public: |