diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-09-11 11:06:34 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-09-11 11:06:34 +0200 |
commit | d780414989ef7e101cdaf269d4b01003d0721e6a (patch) | |
tree | f657033eebe7d38032c4ad1ad4e202c990bb0d8c /odb/context.hxx | |
parent | e56ba020233ad7cb4762df300a6774db9195d817 (diff) |
Generalize pragma code to support arbitrary types for context values
Diffstat (limited to 'odb/context.hxx')
-rw-r--r-- | odb/context.hxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/odb/context.hxx b/odb/context.hxx index cb8e2ef..ea351de 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -6,6 +6,8 @@ #ifndef ODB_CONTEXT_HXX #define ODB_CONTEXT_HXX +#include <odb/gcc-fwd.hxx> + #include <map> #include <set> #include <stack> @@ -67,6 +69,32 @@ enum class_kind class_other }; +// Semantic graph context types. +// +struct view_object +{ + tree node; + std::string name; + semantics::class_* object; +}; + +struct default_value +{ + enum kind_type + { + reset, // Default value reset. + null, + boolean, + number, // Integer of floating-point number. Value contains sign. + string, + enumerator // Value is the name, node is the tree node. + }; + + kind_type kind; + std::string value; + tree node; +}; + class context { public: |