aboutsummaryrefslogtreecommitdiff
path: root/odb/lookup.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-16 16:03:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-16 16:03:25 +0200
commitb79567fbc72df23f870049652d5f254aba948bea (patch)
tree186168269cf249ce97be89fd02aab4c75e83574c /odb/lookup.hxx
parentd780414989ef7e101cdaf269d4b01003d0721e6a (diff)
Support for views; integrated part
Diffstat (limited to 'odb/lookup.hxx')
-rw-r--r--odb/lookup.hxx54
1 files changed, 54 insertions, 0 deletions
diff --git a/odb/lookup.hxx b/odb/lookup.hxx
new file mode 100644
index 0000000..6c3acff
--- /dev/null
+++ b/odb/lookup.hxx
@@ -0,0 +1,54 @@
+// file : odb/lookup.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
+// license : GNU GPL v3; see accompanying LICENSE file
+
+#ifndef ODB_LOOKUP_HXX
+#define ODB_LOOKUP_HXX
+
+#include <odb/gcc.hxx>
+
+#include <string>
+
+#include <odb/cxx-lexer.hxx>
+
+namespace lookup
+{
+ struct invalid_name
+ {
+ };
+
+ struct unable_to_resolve
+ {
+ unable_to_resolve (std::string const& n, bool l): name_ (n), last_ (l) {}
+
+ std::string const&
+ name () const {return name_;}
+
+ // Last component in the name.
+ //
+ bool
+ last () const {return last_;}
+
+ private:
+ std::string name_;
+ bool last_;
+ };
+
+ std::string
+ parse_scoped_name (std::string& token,
+ cpp_ttype& type,
+ cxx_lexer& lexer);
+
+ tree
+ resolve_scoped_name (std::string& token,
+ cpp_ttype& type,
+ cpp_ttype& previous_type,
+ cxx_lexer& lexer,
+ tree start_scope,
+ std::string& name,
+ bool is_type,
+ tree* end_scope = 0);
+}
+
+#endif // ODB_LOOKUP_HXX