diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-09-16 18:14:00 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-09-16 18:14:00 +0200 |
commit | bd6f1415823a473da4518769fc292c10330d821d (patch) | |
tree | 98bf0ab2565dfdfbef6fbba16e2c24cb442ee304 /xsd-frontend/semantic-graph/element-group.hxx |
Start tracking libxsd-frontend with git
Diffstat (limited to 'xsd-frontend/semantic-graph/element-group.hxx')
-rw-r--r-- | xsd-frontend/semantic-graph/element-group.hxx | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/xsd-frontend/semantic-graph/element-group.hxx b/xsd-frontend/semantic-graph/element-group.hxx new file mode 100644 index 0000000..00dea2e --- /dev/null +++ b/xsd-frontend/semantic-graph/element-group.hxx @@ -0,0 +1,46 @@ +// file : xsd-frontend/semantic-graph/element-group.hxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2006-2009 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef XSD_FRONTEND_SEMANTIC_GRAPH_ELEMENT_GROUP_HXX +#define XSD_FRONTEND_SEMANTIC_GRAPH_ELEMENT_GROUP_HXX + +#include <xsd-frontend/semantic-graph/elements.hxx> +#include <xsd-frontend/semantic-graph/compositors.hxx> + +namespace XSDFrontend +{ + namespace SemanticGraph + { + class ElementGroup: public virtual Scope + { + public: + ContainsCompositor& + contains_compositor () + { + assert (contains_compositor_ != 0); + return *contains_compositor_; + } + + protected: + friend class Bits::Graph<Node, Edge>; + + ElementGroup (Path const& file, UnsignedLong line, UnsignedLong column); + + using Scope::add_edge_left; + + Void + add_edge_left (ContainsCompositor& e) + { + assert (contains_compositor_ == 0); + contains_compositor_ = &e; + } + + private: + ContainsCompositor* contains_compositor_; + }; + } +} + +#endif // XSD_FRONTEND_SEMANTIC_GRAPH_ELEMENT_GROUP_HXX |