From bd6f1415823a473da4518769fc292c10330d821d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Sep 2009 18:14:00 +0200 Subject: Start tracking libxsd-frontend with git --- xsd-frontend/semantic-graph/complex.hxx | 79 +++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 xsd-frontend/semantic-graph/complex.hxx (limited to 'xsd-frontend/semantic-graph/complex.hxx') diff --git a/xsd-frontend/semantic-graph/complex.hxx b/xsd-frontend/semantic-graph/complex.hxx new file mode 100644 index 0000000..9b70db8 --- /dev/null +++ b/xsd-frontend/semantic-graph/complex.hxx @@ -0,0 +1,79 @@ +// file : xsd-frontend/semantic-graph/complex.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef XSD_FRONTEND_SEMANTIC_GRAPH_COMPLEX_HXX +#define XSD_FRONTEND_SEMANTIC_GRAPH_COMPLEX_HXX + +#include +#include + +#include + +namespace XSDFrontend +{ + namespace SemanticGraph + { + class Complex: public virtual Type, public virtual Scope + { + public: + Boolean + mixed () const + { + return mixed_; + } + + public: + Boolean + contains_compositor_p () + { + return contains_compositor_ != 0; + } + + ContainsCompositor& + contains_compositor () + { + assert (contains_compositor_ != 0); + return *contains_compositor_; + } + + public: + Void + mixed (Boolean m) + { + mixed_ = m; + } + + protected: + friend class Bits::Graph; + + Complex (); // Virtual inheritance (Enumeration). + Complex (Path const& file, UnsignedLong line, UnsignedLong column); + + using Type::add_edge_right; + using Type::add_edge_left; + using Scope::add_edge_left; + + Void + add_edge_left (ContainsCompositor& e) + { + assert (contains_compositor_ == 0); + contains_compositor_ = &e; + } + + Void + remove_edge_left (ContainsCompositor& e) + { + assert (contains_compositor_ == &e); + contains_compositor_ = 0; + } + + private: + Boolean mixed_; + ContainsCompositor* contains_compositor_; + }; + } +} + +#endif // XSD_FRONTEND_SEMANTIC_GRAPH_COMPLEX_HXX -- cgit v1.1