summaryrefslogtreecommitdiff
path: root/CIAO/CCF/CCF/CIDL/SemanticGraph
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/CCF/CCF/CIDL/SemanticGraph')
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp126
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp103
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Elements.cpp33
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Elements.hpp65
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp81
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp122
6 files changed, 530 insertions, 0 deletions
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp
new file mode 100644
index 00000000000..429699d1b5d
--- /dev/null
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.cpp
@@ -0,0 +1,126 @@
+// file : CCF/CIDL/SemanticGraph/Composition.cpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "CCF/CIDL/SemanticGraph/Composition.hpp"
+
+namespace CCF
+{
+ namespace CIDL
+ {
+ namespace SemanticGraph
+ {
+ using Introspection::TypeInfo;
+ using Introspection::Access;
+
+
+ // Composition
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ composition_init_ ()
+ {
+ TypeInfo ti (typeid (Composition));
+ ti.add_base (Access::PUBLIC, true, Scope::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo composition_ (composition_init_ ());
+ }
+
+ TypeInfo const& Composition::
+ static_type_info () { return composition_; }
+
+ Composition::
+ ~Composition ()
+ {
+ }
+
+
+ // EntityComposition
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ entity_composition_init_ ()
+ {
+ TypeInfo ti (typeid (EntityComposition));
+ ti.add_base (
+ Access::PUBLIC, true, Composition::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo entity_composition_ (entity_composition_init_ ());
+ }
+
+ TypeInfo const& EntityComposition::
+ static_type_info () { return entity_composition_; }
+
+
+ // ProcessComposition
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ process_composition_init_ ()
+ {
+ TypeInfo ti (typeid (ProcessComposition));
+ ti.add_base (
+ Access::PUBLIC, true, Composition::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo process_composition_ (process_composition_init_ ());
+ }
+
+ TypeInfo const& ProcessComposition::
+ static_type_info () { return process_composition_; }
+
+
+ // ServiceComposition
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ service_composition_init_ ()
+ {
+ TypeInfo ti (typeid (ServiceComposition));
+ ti.add_base (
+ Access::PUBLIC, true, Composition::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo service_composition_ (service_composition_init_ ());
+ }
+
+ TypeInfo const& ServiceComposition::
+ static_type_info () { return service_composition_; }
+
+
+ // SessionComposition
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ session_composition_init_ ()
+ {
+ TypeInfo ti (typeid (SessionComposition));
+ ti.add_base (
+ Access::PUBLIC, true, Composition::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo session_composition_ (session_composition_init_ ());
+ }
+
+ TypeInfo const& SessionComposition::
+ static_type_info () { return session_composition_; }
+ }
+ }
+}
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp
new file mode 100644
index 00000000000..663029580da
--- /dev/null
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Composition.hpp
@@ -0,0 +1,103 @@
+// file : CCF/CIDL/SemanticGraph/Composition.hpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#ifndef CCF_CIDL_SEMANTIC_GRAPH_COMPOSITION_HPP
+#define CCF_CIDL_SEMANTIC_GRAPH_COMPOSITION_HPP
+
+#include "CCF/CIDL/SemanticGraph/Elements.hpp"
+
+namespace CCF
+{
+ namespace CIDL
+ {
+ namespace SemanticGraph
+ {
+ class Composition : public virtual Scope
+ {
+ public:
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ Composition () // Only for virtual inheritance.
+ {
+ type_info (static_type_info ());
+ }
+
+ virtual
+ ~Composition () = 0;
+ };
+
+ class EntityComposition : public virtual Composition
+ {
+ public:
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ EntityComposition (Path const& path, unsigned long line)
+ : Node (path, line)
+ {
+ type_info (static_type_info ());
+ }
+ };
+
+ class ProcessComposition : public virtual Composition
+ {
+ public:
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ ProcessComposition (Path const& path, unsigned long line)
+ : Node (path, line)
+ {
+ type_info (static_type_info ());
+ }
+ };
+
+
+ class ServiceComposition : public virtual Composition
+ {
+ public:
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ ServiceComposition (Path const& path, unsigned long line)
+ : Node (path, line)
+ {
+ type_info (static_type_info ());
+ }
+ };
+
+
+ class SessionComposition : public virtual Composition
+ {
+ public:
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ SessionComposition (Path const& path, unsigned long line)
+ : Node (path, line)
+ {
+ type_info (static_type_info ());
+ }
+ };
+ }
+ }
+}
+
+#endif // CCF_CIDL_SEMANTIC_GRAPH_COMPOSITION_HPP
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Elements.cpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Elements.cpp
new file mode 100644
index 00000000000..349f1854786
--- /dev/null
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Elements.cpp
@@ -0,0 +1,33 @@
+// file : CCF/CIDL/SemanticGraph/Elements.cpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "CCF/CIDL/SemanticGraph/Elements.hpp"
+
+namespace CCF
+{
+ namespace CIDL
+ {
+ namespace SemanticGraph
+ {
+ using Introspection::TypeInfo;
+ using Introspection::Access;
+
+ namespace
+ {
+ TypeInfo
+ implements_init_ ()
+ {
+ TypeInfo ti (typeid (Implements));
+ ti.add_base (Access::PUBLIC, true, Edge::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo implements_ (implements_init_ ());
+ }
+
+ TypeInfo const& Implements::
+ static_type_info () { return implements_; }
+ }
+ }
+}
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Elements.hpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Elements.hpp
new file mode 100644
index 00000000000..625221116e7
--- /dev/null
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Elements.hpp
@@ -0,0 +1,65 @@
+// file : CCF/CIDL/SemanticGraph/Elements.hpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#ifndef CCF_CIDL_SEMANTIC_GRAPH_ELEMENTS_HPP
+#define CCF_CIDL_SEMANTIC_GRAPH_ELEMENTS_HPP
+
+#include "CCF/IDL3/SemanticGraph/Elements.hpp"
+
+namespace CCF
+{
+ namespace CIDL
+ {
+ namespace SemanticGraph
+ {
+ using namespace IDL3::SemanticGraph;
+
+
+ class Implements : public virtual Edge
+ {
+ public:
+ Type&
+ implementer () const
+ {
+ return *implementer_;
+ }
+
+ Type&
+ implementee () const
+ {
+ return *implementee_;
+ }
+
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ Implements ()
+ {
+ type_info (static_type_info ());
+ }
+
+ void
+ set_left_node (Type& n)
+ {
+ implementer_ = &n;
+ }
+
+ void
+ set_right_node (Type& n)
+ {
+ implementee_ = &n;
+ }
+
+ private:
+ Type* implementer_;
+ Type* implementee_;
+ };
+ }
+ }
+}
+
+#endif // CCF_CIDL_SEMANTIC_GRAPH_ELEMENTS_HPP
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp
new file mode 100644
index 00000000000..9a4214bcd0e
--- /dev/null
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.cpp
@@ -0,0 +1,81 @@
+// file : CCF/CIDL/SemanticGraph/Executor.cpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#include "CCF/CIDL/SemanticGraph/Executor.hpp"
+
+namespace CCF
+{
+ namespace CIDL
+ {
+ namespace SemanticGraph
+ {
+ using Introspection::TypeInfo;
+ using Introspection::Access;
+
+ // Executor
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ executor_init_ ()
+ {
+ TypeInfo ti (typeid (Executor));
+ ti.add_base (Access::PUBLIC, true, Type::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo executor_ (executor_init_ ());
+ }
+
+ TypeInfo const& Executor::
+ static_type_info () { return executor_; }
+
+ Executor::
+ ~Executor ()
+ {
+ }
+
+
+ // ComponentExecutor
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ component_executorinit_ ()
+ {
+ TypeInfo ti (typeid (ComponentExecutor));
+ ti.add_base (Access::PUBLIC, true, Type::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo component_executor (component_executorinit_ ());
+ }
+
+ TypeInfo const& ComponentExecutor::
+ static_type_info () { return component_executor; }
+
+
+ // HomeExecutor
+ //
+ //
+ namespace
+ {
+ TypeInfo
+ home_executorinit_ ()
+ {
+ TypeInfo ti (typeid (HomeExecutor));
+ ti.add_base (Access::PUBLIC, true, Type::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo home_executor (home_executorinit_ ());
+ }
+
+ TypeInfo const& HomeExecutor::
+ static_type_info () { return home_executor; }
+ }
+ }
+}
diff --git a/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp b/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp
new file mode 100644
index 00000000000..378638b2187
--- /dev/null
+++ b/CIAO/CCF/CCF/CIDL/SemanticGraph/Executor.hpp
@@ -0,0 +1,122 @@
+// file : CCF/CIDL/SemanticGraph/Executor.hpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#ifndef CCF_CIDL_SEMANTIC_GRAPH_EXECUTOR_HPP
+#define CCF_CIDL_SEMANTIC_GRAPH_EXECUTOR_HPP
+
+#include "CCF/IDL3/SemanticGraph/Component.hpp"
+#include "CCF/IDL3/SemanticGraph/Home.hpp"
+#include "CCF/CIDL/SemanticGraph/Elements.hpp"
+
+namespace CCF
+{
+ namespace CIDL
+ {
+ namespace SemanticGraph
+ {
+ //
+ //
+ //
+ class Executor : public virtual Type
+ {
+ public:
+ Implements&
+ implements () const
+ {
+ return *implements_;
+ }
+
+ virtual bool
+ complete () const
+ {
+ return true;
+ }
+
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ Executor () // For virtual inheritance only.
+ {
+ type_info (static_type_info ());
+ }
+
+ virtual
+ ~Executor () = 0;
+
+ void
+ add_edge_left (Implements& e)
+ {
+ implements_ = &e;
+ }
+
+ private:
+ Implements* implements_;
+ };
+
+
+ //
+ //
+ //
+ class ComponentExecutor : public virtual Executor
+ {
+ public:
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ ComponentExecutor (Path const& path, unsigned long line)
+ : Node (path, line)
+ {
+ type_info (static_type_info ());
+ }
+ };
+
+
+ //
+ //
+ //
+ class HomeExecutor : public virtual Executor
+ {
+ public:
+ Manages&
+ manages () const
+ {
+ return *manages_;
+ }
+
+
+ static Introspection::TypeInfo const&
+ static_type_info ();
+
+ protected:
+ friend class Graph<Node, Edge>;
+
+ HomeExecutor (Path const& path, unsigned long line)
+ : Node (path, line)
+ {
+ type_info (static_type_info ());
+ }
+
+ using Executor::add_edge_left;
+
+ void
+ add_edge_left (Manages& e)
+ {
+ manages_ = &e;
+ }
+
+ private:
+ Manages* manages_;
+ };
+
+ }
+ }
+}
+
+#endif // CCF_CIDL_SEMANTIC_GRAPH_EXECUTOR_HPP