From d50b3099ec02374e3c45782b7e1dca84bf53e376 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 May 2010 11:22:50 +0200 Subject: Add escape() function --- odb/context.hxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'odb/context.hxx') 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 #include #include #include // 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_; @@ -36,9 +43,13 @@ public: semantics::unit& unit; options_type const& options; + typedef std::set keyword_set_type; + keyword_set_type const& keyword_set; + private: struct data { + keyword_set_type keyword_set_; }; public: -- cgit v1.1