From d780414989ef7e101cdaf269d4b01003d0721e6a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 11 Sep 2011 11:06:34 +0200 Subject: Generalize pragma code to support arbitrary types for context values --- odb/context.hxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'odb/context.hxx') 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 + #include #include #include @@ -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: -- cgit v1.1