summaryrefslogtreecommitdiff
path: root/CIAO/CCF/CCF/CIDL/SemanticAction/Impl
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/CCF/CCF/CIDL/SemanticAction/Impl')
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp83
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.hpp42
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Elements.hpp27
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Factory.cpp35
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Factory.hpp53
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp119
-rw-r--r--CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp46
7 files changed, 0 insertions, 405 deletions
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp
deleted file mode 100644
index a39a801cd15..00000000000
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-// file : CCF/CIDL/SemanticAction/Impl/Composition.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/CIDL/SemanticAction/Impl/Composition.hpp"
-
-#include <iostream>
-
-using std::cerr;
-using std::endl;
-
-namespace CCF
-{
- namespace CIDL
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- using namespace SemanticGraph;
-
- Composition::
- Composition (Context& c)
- : ScopeBase<SemanticGraph::Composition> (c)
- {
- }
-
- void Composition::
- begin (SimpleIdentifierPtr const& id, Category::Value c)
- {
- if (ctx.trace ()) cerr << "composition " << id << endl;
-
- if(c == Category::entity)
- {
- now (ctx.tu ().new_node<EntityComposition> (
- ctx.file (), id->line ()));
- }
- else if (c == Category::process)
- {
- now (ctx.tu ().new_node<ProcessComposition> (
- ctx.file (), id->line ()));
- }
- else if (c == Category::service)
- {
- now (ctx.tu ().new_node<ServiceComposition> (
- ctx.file (), id->line ()));
- }
- else
- {
- now (ctx.tu ().new_node<SessionComposition> (
- ctx.file (), id->line ()));
- }
-
- ctx.tu ().new_edge<Defines> (ctx.scope (), now (), id->lexeme ());
- }
-
- void Composition::
- open_scope ()
- {
- if (ctx.trace ()) cerr << "scope open" << endl;
-
- push (ctx.scope ());
- ctx.scope (now ());
- }
-
- void Composition::
- close_scope ()
- {
- ctx.scope (top ());
- pop ();
-
- if (ctx.trace ()) cerr << "scope close" << endl;
- }
-
- void Composition::
- end ()
- {
- if (ctx.trace ()) cerr << "end" << endl;
- }
- }
- }
- }
-}
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.hpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.hpp
deleted file mode 100644
index 9bfce6dc78c..00000000000
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Composition.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// file : CCF/CIDL/SemanticAction/Impl/Composition.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_CIDL_SEMANTIC_ACTION_IMPL_COMPOSITION_HPP
-#define CCF_CIDL_SEMANTIC_ACTION_IMPL_COMPOSITION_HPP
-
-#include "CCF/CIDL/SemanticGraph/Composition.hpp"
-#include "CCF/CIDL/SemanticAction/Composition.hpp"
-#include "CCF/CIDL/SemanticAction/Impl/Elements.hpp"
-
-namespace CCF
-{
- namespace CIDL
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- struct Composition : SemanticAction::Composition,
- ScopeBase<SemanticGraph::Composition>
- {
- Composition (Context& c);
-
- virtual void
- begin (SimpleIdentifierPtr const& id, Category::Value c);
-
- virtual void
- open_scope ();
-
- virtual void
- close_scope ();
-
- virtual void
- end ();
- };
- }
- }
- }
-}
-
-#endif // CCF_CIDL_SEMANTIC_ACTION_IMPL_COMPOSITION_HPP
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Elements.hpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Elements.hpp
deleted file mode 100644
index 5e4a0e2525e..00000000000
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Elements.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// file : CCF/CIDL/SemanticAction/Impl/Elements.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_CIDL_SEMANTIC_ACTION_IMPL_ELEMENTS_HPP
-#define CCF_CIDL_SEMANTIC_ACTION_IMPL_ELEMENTS_HPP
-
-#include "CCF/CIDL/SemanticAction/Elements.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Elements.hpp"
-
-namespace CCF
-{
- namespace CIDL
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- using IDL3::SemanticAction::Impl::Context;
- using IDL3::SemanticAction::Impl::Base;
- using IDL3::SemanticAction::Impl::ScopeBase;
- }
- }
- }
-}
-
-#endif // CCF_CIDL_SEMANTIC_ACTION_IMPL_ELEMENTS_HPP
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Factory.cpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Factory.cpp
deleted file mode 100644
index 37a6e589ca5..00000000000
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Factory.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// file : CCF/CIDL/SemanticAction/Impl/Factory.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/IDL2/SemanticGraph/Elements.hpp"
-#include "CCF/IDL2/SemanticGraph/Module.hpp"
-#include "CCF/IDL2/SemanticGraph/Interface.hpp"
-
-#include "CCF/CIDL/SemanticAction/Impl/Factory.hpp"
-
-namespace CCF
-{
- namespace CIDL
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- using namespace SemanticGraph;
-
- Factory::
- Factory (CompilerElements::Context& context,
- Diagnostic::Stream& dout,
- SemanticGraph::TranslationUnit& tu)
- : IDL2::SemanticAction::Impl::Factory (context, dout, tu),
- IDL3::SemanticAction::Impl::Factory (context, dout, tu),
-
- composition_ (ctx_),
- home_executor_ (ctx_)
- {
- }
- }
- }
- }
-}
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Factory.hpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Factory.hpp
deleted file mode 100644
index 4cea4e35b82..00000000000
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/Factory.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// file : CCF/CIDL/SemanticAction/Impl/Factory.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_CIDL_SEMANTIC_ACTION_IMPL_FACTORY_HPP
-#define CCF_CIDL_SEMANTIC_ACTION_IMPL_FACTORY_HPP
-
-#include "CCF/CIDL/SemanticAction/Factory.hpp"
-#include "CCF/IDL3/SemanticAction/Impl/Factory.hpp"
-
-#include "CCF/CIDL/SemanticAction/Impl/Composition.hpp"
-#include "CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp"
-
-namespace CCF
-{
- namespace CIDL
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- //
- //
- //
- struct Factory : virtual CIDL::SemanticAction::Factory,
- virtual IDL3::SemanticAction::Impl::Factory
- {
- Factory (CompilerElements::Context& context,
- Diagnostic::Stream& dout,
- SemanticGraph::TranslationUnit& tu);
-
- virtual SemanticAction::Composition&
- composition ()
- {
- return composition_;
- }
-
- virtual SemanticAction::HomeExecutor&
- home_executor ()
- {
- return home_executor_;
- }
-
- private:
- Composition composition_;
- HomeExecutor home_executor_;
- };
- }
- }
- }
-}
-
-#endif // CCF_CIDL_SEMANTIC_ACTION_IMPL_FACTORY_HPP
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp
deleted file mode 100644
index acbb6e9f5e0..00000000000
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-// file : CCF/CIDL/SemanticAction/Impl/HomeExecutor.cpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#include "CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp"
-
-#include <iostream>
-
-using std::cerr;
-using std::endl;
-
-namespace CCF
-{
- namespace CIDL
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- using namespace SemanticGraph;
-
- HomeExecutor::
- HomeExecutor (Context& c)
- : Base (c)
- {
- }
-
- void HomeExecutor::
- begin (SimpleIdentifierPtr const& id)
- {
- if (ctx.trace ()) cerr << "home executor " << id << endl;
-
- id_ = id;
- he_ = &ctx.tu ().new_node<SemanticGraph::HomeExecutor> (
- ctx.file (), id->line ());
- }
-
- void HomeExecutor::
- implements (IdentifierPtr const& id)
- {
- if (ctx.trace ()) cerr << "implements " << id << endl;
-
- Name name (id->lexeme ());
- ScopedName from (ctx.scope ().scoped_name ());
-
- c_ = 0;
-
- try
- {
- try
- {
- SemanticGraph::Home& h (
- resolve<SemanticGraph::Home> (from, name, Flags::defined));
-
- c_ = &dynamic_cast<SemanticGraph::Component&> (
- h.manages ().managee ());
-
- ctx.tu ().new_edge<Implements> (*he_, h);
- }
- catch (Resolve const&)
- {
- cerr << ctx.file () << ":" << id->line () << ": error: "
- << "invalid implements specification" << endl;
- throw;
- }
- }
- catch (NotFound const&)
- {
- cerr << ctx.file () << ":" << id->line () << ": error: "
- << "no home with name \'" << name
- << "\' visible from scope \'" << from << "\'" << endl;
- }
- catch (WrongType const&)
- {
- cerr << ctx.file () << ":" << id->line () << ": error: "
- << "incompatible type in implements specification" << endl;
- }
- catch (NotDefined const& e)
- {
- cerr << ctx.file () << ":" << id->line () << ": error: "
- << "attempt to implement forward-declared home "
- << e.name () << endl;
-
- cerr << ctx.file () << ":" << id->line () << ": error: "
- << "implementation of forward-declared home is illegal"
- << endl;
- }
- }
-
- void HomeExecutor::
- manages (SimpleIdentifierPtr const& id)
- {
- if (ctx.trace ()) cerr << "manages " << id << endl;
-
- if (c_ != 0)
- {
- SemanticGraph::ComponentExecutor& ce (
- ctx.tu ().new_node<SemanticGraph::ComponentExecutor> (
- ctx.file (), id->line ()));
-
- ctx.tu ().new_edge<Implements> (ce, *c_);
-
- ctx.tu ().new_edge<Defines> (ctx.scope (), ce, id->lexeme ());
- ctx.tu ().new_edge<Defines> (ctx.scope (), *he_, id_->lexeme ());
-
- ctx.tu ().new_edge<Manages> (*he_, ce);
- }
- }
-
- void HomeExecutor::
- end ()
- {
- id_ = 0;
- if (ctx.trace ()) cerr << "end" << endl;
- }
- }
- }
- }
-}
diff --git a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp b/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp
deleted file mode 100644
index 23d3a3e7cca..00000000000
--- a/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// file : CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp
-// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
-// cvs-id : $Id$
-
-#ifndef CCF_CIDL_SEMANTIC_ACTION_IMPL_HOME_EXECUTOR_HPP
-#define CCF_CIDL_SEMANTIC_ACTION_IMPL_HOME_EXECUTOR_HPP
-
-#include "CCF/CIDL/SemanticGraph/Executor.hpp"
-#include "CCF/CIDL/SemanticAction/HomeExecutor.hpp"
-#include "CCF/CIDL/SemanticAction/Impl/Elements.hpp"
-
-namespace CCF
-{
- namespace CIDL
- {
- namespace SemanticAction
- {
- namespace Impl
- {
- struct HomeExecutor : SemanticAction::HomeExecutor, Base
- {
- HomeExecutor (Context& c);
-
- virtual void
- begin (SimpleIdentifierPtr const& id);
-
- virtual void
- implements (IdentifierPtr const& id);
-
- virtual void
- manages (SimpleIdentifierPtr const& id);
-
- virtual void
- end ();
-
- private:
- SimpleIdentifierPtr id_;
- SemanticGraph::HomeExecutor* he_;
- SemanticGraph::Component* c_;
- };
- }
- }
- }
-}
-
-#endif // CCF_CIDL_SEMANTIC_ACTION_IMPL_HOME_EXECUTOR_HPP