diff options
author | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-29 20:51:48 +0000 |
---|---|---|
committer | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-29 20:51:48 +0000 |
commit | ae9e3373f3b5f62634d2df1f13748cc29f42246b (patch) | |
tree | 7bdb8551def8306a4e4b3f16ab78290d167d5676 | |
parent | 19a55b2a5dc2b749340c94d9d9764afd7d585573 (diff) | |
download | ATCD-ae9e3373f3b5f62634d2df1f13748cc29f42246b.tar.gz |
ChangeLogTag: Tue Jul 29 15:36:20 2003 Boris Kolpackov <boris@dre.vanderbilt.edu>
149 files changed, 0 insertions, 17847 deletions
diff --git a/TAO/CIAO/CCF/CCF/CCF.sln b/TAO/CIAO/CCF/CCF/CCF.sln deleted file mode 100644 index 2cd44b64537..00000000000 --- a/TAO/CIAO/CCF/CCF/CCF.sln +++ /dev/null @@ -1,45 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IDL2", "IDL2\IDL2.vcproj", "{BC4A74B6-EBE7-486D-A537-B4217AE7304E}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IDL3", "IDL3\IDL3.vcproj", "{97D61986-05D8-4B2A-B8B2-5095E58909FE}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CIDL", "CIDL\CIDL.vcproj", "{39A4243B-8D97-4C1A-BC6B-C49FE4D48D4D}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodeGenerationKit", "CodeGenerationKit\CodeGenerationKit.vcproj", "{93C22389-AD2D-45CD-98C6-D9C5D6679B09}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {BC4A74B6-EBE7-486D-A537-B4217AE7304E}.Debug.ActiveCfg = Debug|Win32 - {BC4A74B6-EBE7-486D-A537-B4217AE7304E}.Debug.Build.0 = Debug|Win32 - {BC4A74B6-EBE7-486D-A537-B4217AE7304E}.Release.ActiveCfg = Release|Win32 - {BC4A74B6-EBE7-486D-A537-B4217AE7304E}.Release.Build.0 = Release|Win32 - {97D61986-05D8-4B2A-B8B2-5095E58909FE}.Debug.ActiveCfg = Debug|Win32 - {97D61986-05D8-4B2A-B8B2-5095E58909FE}.Debug.Build.0 = Debug|Win32 - {97D61986-05D8-4B2A-B8B2-5095E58909FE}.Release.ActiveCfg = Release|Win32 - {97D61986-05D8-4B2A-B8B2-5095E58909FE}.Release.Build.0 = Release|Win32 - {39A4243B-8D97-4C1A-BC6B-C49FE4D48D4D}.Debug.ActiveCfg = Debug|Win32 - {39A4243B-8D97-4C1A-BC6B-C49FE4D48D4D}.Debug.Build.0 = Debug|Win32 - {39A4243B-8D97-4C1A-BC6B-C49FE4D48D4D}.Release.ActiveCfg = Release|Win32 - {39A4243B-8D97-4C1A-BC6B-C49FE4D48D4D}.Release.Build.0 = Release|Win32 - {93C22389-AD2D-45CD-98C6-D9C5D6679B09}.Debug.ActiveCfg = Debug|Win32 - {93C22389-AD2D-45CD-98C6-D9C5D6679B09}.Debug.Build.0 = Debug|Win32 - {93C22389-AD2D-45CD-98C6-D9C5D6679B09}.Release.ActiveCfg = Release|Win32 - {93C22389-AD2D-45CD-98C6-D9C5D6679B09}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL.cpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL.cpp deleted file mode 100644 index cfa1da318d3..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL.cpp +++ /dev/null @@ -1 +0,0 @@ -// $Id$ diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL.vcproj b/TAO/CIAO/CCF/CCF/CIDL/CIDL.vcproj deleted file mode 100644 index f658c5476fc..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL.vcproj +++ /dev/null @@ -1,150 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="CIDL" - ProjectGUID="{39A4243B-8D97-4C1A-BC6B-C49FE4D48D4D}" - Keyword="Win32Proj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(ProjectDir)" - IntermediateDirectory="Debug" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../..;../../External/Utility" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" - MinimalRebuild="TRUE" - BasicRuntimeChecks="3" - RuntimeLibrary="5" - ForceConformanceInForLoopScope="TRUE" - RuntimeTypeInfo="TRUE" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/CIDL.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - RuntimeLibrary="4" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/CIDL.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> - <File - RelativePath=".\CIDL_SyntaxTree.cpp"> - </File> - <File - RelativePath=".\CIDL_Traversal.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> - <File - RelativePath=".\CIDL_LexicalAnalyzer.hpp"> - </File> - <File - RelativePath=".\CIDL_Parser.hpp"> - </File> - <File - RelativePath=".\CIDL_SemanticAction.hpp"> - </File> - <File - RelativePath=".\CIDL_SemanticActionImpl.hpp"> - </File> - <File - RelativePath=".\CIDL_SyntaxTree.hpp"> - </File> - <File - RelativePath=".\CIDL_SyntaxTreeFwd.hpp"> - </File> - <File - RelativePath=".\CIDL_Traversal.hpp"> - </File> - <File - RelativePath=".\MSVC_Pragmas.hpp"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> - </Filter> - <File - RelativePath=".\ReadMe.txt"> - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_LexicalAnalyzer.hpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_LexicalAnalyzer.hpp deleted file mode 100644 index 9d2570d9c84..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_LexicalAnalyzer.hpp +++ /dev/null @@ -1,57 +0,0 @@ -// $Id$ -#ifndef CCF_CIDL_LEXICAL_ANALYZER_HPP -#define CCF_CIDL_LEXICAL_ANALYZER_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL3/IDL3_LexicalAnalyzer.hpp" - -#include <string> - -namespace CIDL -{ - class LexicalAnalyzer : public virtual IDL3::LexicalAnalyzer - { - public: - virtual - ~LexicalAnalyzer () throw () {} - - public: - - // Keywords (alphabetic order). - - KeywordPtr composition; - KeywordPtr entity; - KeywordPtr executor; - KeywordPtr implements; - KeywordPtr process; - KeywordPtr service; - KeywordPtr session; - - - - LexicalAnalyzer (CCF::TokenStream<char>& is) - : IDL2::LexicalAnalyzer (is), - IDL3::LexicalAnalyzer (is), - - composition (new Keyword), - entity (new Keyword), - executor (new Keyword), - implements (new Keyword), - process (new Keyword), - service (new Keyword), - session (new Keyword) - { - - keyword_table_["composition"] = composition; - keyword_table_["entity" ] = entity; - keyword_table_["executor" ] = executor; - keyword_table_["implements" ] = implements; - keyword_table_["process" ] = process; - keyword_table_["service" ] = service; - keyword_table_["session" ] = session; - } - }; -} - -#endif // CCF_CIDL_LEXICAL_ANALYZER_HPP diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_Parser.hpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_Parser.hpp deleted file mode 100644 index cd1bee26496..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_Parser.hpp +++ /dev/null @@ -1,202 +0,0 @@ -// $Id$ -#ifndef CCF_CIDL_PARSER_HPP -#define CCF_CIDL_PARSER_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL3/IDL3_Parser.hpp" -#include "CCF/CIDL/CIDL_LexicalAnalyzer.hpp" -#include "CCF/CIDL/CIDL_SemanticAction.hpp" - -namespace CIDL -{ - class Parser : public virtual IDL3::Parser - { - public: - virtual - ~Parser () throw () {} - - protected: - - // - // Semanic action types - // - typedef - SemanticAction::Composition - Composition; - - typedef - SemanticAction::HomeExecutor - HomeExecutor; - - protected: - LexicalAnalyzer const& lexer_; - SemanticActionFactory& actions_; - - // - // Primitives (alphabetic order). - // - - KeywordParser COMPOSITION; - KeywordParser ENTITY; - KeywordParser EXECUTOR; - KeywordParser IMPLEMENTS; - KeywordParser PROCESS; - KeywordParser SERVICE; - KeywordParser SESSION; - - // - // Language - // - - Rule extension; - - // Composition - Rule composition_decl; - Rule composition_header; - Rule composition_category; - - // Home executor - Rule home_executor_decl; - Rule home_executor_header; - Rule home_executor_body; - Rule home_executor_home_impl_decl; - Rule home_executor_executor_decl; - - public: - - Parser (LexicalAnalyzer const& l, SemanticActionFactory& f) - : IDL2::Parser (l, f), - IDL3::Parser (l, f), - lexer_ (l), - actions_ (f), - - COMPOSITION (l.composition), - ENTITY (l.entity), - EXECUTOR (l.executor), - IMPLEMENTS (l.implements), - PROCESS (l.process), - SERVICE (l.service), - SESSION (l.session), - - act_composition_begin (this, &Parser::act_composition_begin_core), - act_composition_open_scope (f.composition (), &Scope::open_scope), - act_composition_close_scope (f.composition (), &Scope::close_scope), - act_composition_end (f.composition (), &Composition::end), - - act_home_executor_begin (f.home_executor (), - &HomeExecutor::begin), - act_home_executor_open_scope (f.home_executor (), - &Scope::open_scope), - act_home_executor_implements (f.home_executor (), - &HomeExecutor::implements), - act_home_executor_manages (f.home_executor (), - &HomeExecutor::manages), - act_home_executor_close_scope (f.home_executor (), - &Scope::open_scope), - act_home_executor_end (f.home_executor (), - &HomeExecutor::end) - - { - IDL3::Parser::extension = - composition_decl - | extension - ; - - // - // Composition - // - composition_decl = - composition_header - >> LBRACE[act_composition_open_scope] - >> home_executor_decl - >> RBRACE[act_composition_close_scope] - >> SEMI[act_composition_end] - ; - - composition_header = - COMPOSITION - >> (composition_category >> simple_identifier)[act_composition_begin] - ; - - composition_category = - ENTITY - | PROCESS - | SERVICE - | SESSION - ; - - // - // Home executor - // - home_executor_decl = - home_executor_header - >> LBRACE[act_home_executor_open_scope] - >> home_executor_home_impl_decl - >> home_executor_executor_decl - >> RBRACE[act_home_executor_close_scope] - >> SEMI[act_home_executor_end] - ; - - home_executor_header = - HOME - >> EXECUTOR - >> simple_identifier[act_home_executor_begin] - ; - - home_executor_home_impl_decl = - IMPLEMENTS - >> identifier[act_home_executor_implements] - >> SEMI - ; - - home_executor_executor_decl = - MANAGES - >> simple_identifier[act_home_executor_manages] - >> SEMI - ; - } - - protected: - void - act_composition_begin_core (Iterator begin, Iterator end) const - { - Composition::Category::Value c; - - if(identical (lexer_.entity, *begin)) - { - c = Composition::Category::ENTITY; - } - else if (identical (lexer_.process, *begin)) - { - c = Composition::Category::PROCESS; - } - else if (identical (lexer_.service, *begin)) - { - c = Composition::Category::SERVICE; - } - else - { - c = Composition::Category::SESSION; - } - - begin++; - - actions_.composition ().begin (typical<SimpleIdentifierPtr>(*begin), c); - } - - ActionExecutor<Parser> act_composition_begin; - ScopeAction act_composition_open_scope; - ScopeAction act_composition_close_scope; - NoArgAction<Composition> act_composition_end; - - OneArgAction<SimpleIdentifierPtr, HomeExecutor> act_home_executor_begin; - ScopeAction act_home_executor_open_scope; - OneArgAction<IdentifierPtr, HomeExecutor> act_home_executor_implements; - OneArgAction<SimpleIdentifierPtr, HomeExecutor> act_home_executor_manages; - ScopeAction act_home_executor_close_scope; - NoArgAction<HomeExecutor> act_home_executor_end; - }; -} - -#endif // CCF_CIDL_PARSER_HPP diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SemanticAction.hpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_SemanticAction.hpp deleted file mode 100644 index 714a6fa2722..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SemanticAction.hpp +++ /dev/null @@ -1,74 +0,0 @@ -// $Id$ -#ifndef CCF_CIDL_SEMANTIC_ACTION_HPP -#define CCF_CIDL_SEMANTIC_ACTION_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL3/IDL3_SemanticAction.hpp" - -namespace CIDL -{ - namespace SemanticAction - { - using namespace IDL3::SemanticAction; - - class Composition : public virtual Scope - { - public: - struct Category - { - enum Value - { - ENTITY, - PROCESS, - SERVICE, - SESSION - }; - - friend std::ostream& - operator<< (std::ostream& o, Value v) - { - if (v == ENTITY) o << "entity"; - else if (v == PROCESS) o << "process"; - else if (v == SERVICE) o << "service"; - else o << "session"; - return o; - } - }; - - virtual void - begin (SimpleIdentifierPtr const& id, Category::Value category) = 0; - - virtual void - end () = 0; - }; - - class HomeExecutor : public virtual Scope - { - public: - virtual void - begin (SimpleIdentifierPtr const& id) = 0; - - virtual void - implements (IdentifierPtr const& id) = 0; - - virtual void - manages (SimpleIdentifierPtr const& id) = 0; - - virtual void - end () = 0; - }; - } - - class SemanticActionFactory : public virtual IDL3::SemanticActionFactory - { - public: - virtual SemanticAction::Composition& - composition () = 0; - - virtual SemanticAction::HomeExecutor& - home_executor () = 0; - }; -} - -#endif // CCF_CIDL_SEMANTIC_ACTION_HPP diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SemanticActionImpl.hpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_SemanticActionImpl.hpp deleted file mode 100644 index 17a809784a7..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SemanticActionImpl.hpp +++ /dev/null @@ -1,251 +0,0 @@ -// $Id$ -#ifndef CCF_CIDL_SEMANTIC_ACTION_IMPL_HPP -#define CCF_CIDL_SEMANTIC_ACTION_IMPL_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CIDL/CIDL_SyntaxTree.hpp" -#include "CCF/CIDL/CIDL_SemanticAction.hpp" -#include "CCF/IDL3/IDL3_SemanticActionImpl.hpp" - -namespace CIDL -{ - namespace SemanticAction - { - namespace Impl - { - using IDL2::SemanticAction::Impl::ScopeBase; - - class Composition : public virtual SemanticAction::Composition, - public virtual ScopeBase<SyntaxTree::CompositionPtr> - { - public: - virtual - ~Composition () throw () {} - - Composition (SyntaxTree::ScopePtr& scope) - : ScopeBase<SyntaxTree::CompositionPtr> (scope) - { - } - - virtual void - begin (SimpleIdentifierPtr const& id, Category::Value c) - { - cerr << "composition " << c << " " << id << endl; - - SyntaxTree::SimpleName name (id->value ()); - - SyntaxTree::Composition::Category::Value category = - SyntaxTree::Composition::Category::SESSION; - - if (c == Category::ENTITY) - { - category = SyntaxTree::Composition::Category::ENTITY; - } - else if (c == Category::PROCESS) - { - category = SyntaxTree::Composition::Category::PROCESS; - } - else if (c == Category::SERVICE) - { - category = SyntaxTree::Composition::Category::SERVICE; - } - - SyntaxTree::CompositionPtr cp ( - new SyntaxTree::Composition (name, category, scope_)); - - scope_->insert (cp); - push (cp); - } - - virtual void - open_scope () - { - scope_ = top (); - } - - virtual void - close_scope () - { - scope_ = scope_->scope (); - } - - virtual void - end () - { - pop (); - cerr << "end" << endl; - } - }; - - class HomeExecutor : - public virtual SemanticAction::HomeExecutor, - public virtual ScopeBase<SyntaxTree::HomeExecutorPtr> - { - public: - virtual - ~HomeExecutor () throw () {} - - HomeExecutor (SyntaxTree::ScopePtr& scope) - : ScopeBase<SyntaxTree::HomeExecutorPtr> (scope), - name_ (""), - implements_ (""), - manages_ ("") - - { - } - - virtual void - begin (SimpleIdentifierPtr const& id) - { - cerr << "home executor " << id << endl; - name_ = SyntaxTree::SimpleName (id->value ()); - } - - virtual void - open_scope () - { - // Note: nothing is expected to go to home executor scope - // so watch for grammar changes. - } - - virtual void - implements (IdentifierPtr const& id) - { - cerr << "implements " << id << endl; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct ImplementsPredicate : - public DeclarationTable::ResolvePredicate - { - struct IncompatibleType : - public DeclarationTable::ResolutionFailure - { - IncompatibleType (std::string const& t) : type (t) {} - std::string type; - }; - - virtual bool - test (DeclarationPtr const& d) - throw (IncompatibleType) - { - std::string type = d->declaration_type (); - - if (type != "home") throw IncompatibleType (type); - - return strict_cast<TypeDecl> (d)->defined (); - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - implements_ = sn; - } - catch (ImplementsPredicate::IncompatibleType const& e) - { - cerr << "error: invalid implements specification" << endl; - - cerr << "specifying " << e.type << " \'" << name - << "\' in home executor implements clause is illegal" - << endl; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid implements specification" << endl; - cerr << "no home with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid implements specification" << endl; - cerr << "no defined home with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - cerr << "implementing forward-declared home is illegal" - << endl; - } - - } - - virtual void - manages (SimpleIdentifierPtr const& id) - { - cerr << "manages " << id << endl; - manages_ = SyntaxTree::SimpleName (id->value ()); - } - - virtual void - close_scope () - { - // Note: nothing is expected to go to home executor scope - // so watch for grammar changes. - } - - virtual void - end () - { - cerr << "end" << endl; - - using namespace SyntaxTree; - - HomeExecutorPtr he (new SyntaxTree::HomeExecutor ( - name_, - scope_, - implements_, - manages_)); - scope_->insert (he); - } - private: - SyntaxTree::SimpleName name_; - SyntaxTree::ScopedName implements_; - SyntaxTree::SimpleName manages_; - }; - } - } - - //@@ Maybe I should bring this class back in to Impl namespace. - class SemanticActionFactoryImpl : - public virtual CIDL::SemanticActionFactory, - public virtual IDL3::SemanticActionFactoryImpl - { - public: - virtual - ~SemanticActionFactoryImpl () throw () {} - - SemanticActionFactoryImpl (SyntaxTree::TranslationRegionPtr const& r) - : IDL2::SemanticActionFactoryImpl (r), - IDL3::SemanticActionFactoryImpl (r), - composition_ (scope_), - home_executor_ (scope_) - { - } - public: - virtual SemanticAction::Composition& - composition () - { - return composition_; - } - - virtual SemanticAction::HomeExecutor& - home_executor () - { - return home_executor_; - } - - private: - SemanticAction::Impl::Composition composition_; - SemanticAction::Impl::HomeExecutor home_executor_; - }; -} - -#endif // CCF_CIDL_SEMANTIC_ACTION_IMPL_HPP diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTree.cpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTree.cpp deleted file mode 100644 index 577b426e73c..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTree.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// $Id$ -#include "CIDL_Traversal.hpp" -#include "CIDL_SyntaxTree.hpp" - -namespace CIDL -{ - namespace SyntaxTree - { - using CCF::Traversal::try_visit; - - namespace - { - //@@ repetition of what's already in IDL2 & IDL3 - bool - try_visit_scope (CCF::Traversal::Visitor* v, - ScopePtr const& node) - { - return try_visit<Traversal::Scope> ( - &Traversal::Scope::visit_scope, - v, - node); - } - } - - // - // Composition - // - - void Composition:: - accept (CCF::Traversal::Visitor* v) - { - CompositionPtr self (ReferenceCounting::add_ref (this)); - - if (!try_visit<Traversal::Composition> ( - &Traversal::Composition::visit_composition, - v, - self)) - { - try_visit_scope (v, self); - } - } - - // - // Home - // - - void HomeExecutor:: - accept (CCF::Traversal::Visitor* v) - { - HomeExecutorPtr self (ReferenceCounting::add_ref (this)); - - if (!try_visit<Traversal::HomeExecutor> ( - &Traversal::HomeExecutor::visit_home_executor, - v, - self)) - { - try_visit_scope (v, self); - } - } - } -} diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTree.hpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTree.hpp deleted file mode 100644 index 6b1e9df4f66..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTree.hpp +++ /dev/null @@ -1,141 +0,0 @@ -// $Id$ -#ifndef CCF_CIDL_SYNTAX_TREE_HPP -#define CCF_CIDL_SYNTAX_TREE_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL3/IDL3_SyntaxTree.hpp" - -namespace CIDL -{ - namespace SyntaxTree - { - - // Import all nodes of IDL3 - using namespace IDL3::SyntaxTree; - - - class Composition : public virtual Scope - { - public: - struct Category - { - enum Value - { - ENTITY, - PROCESS, - SERVICE, - SESSION - }; - - friend std::ostream& - operator<< (std::ostream& o, Value v) - { - if (v == ENTITY) o << "entity"; - else if (v == PROCESS) o << "process"; - else if (v == SERVICE) o << "service"; - else o << "session"; - return o; - } - }; - - public: - virtual - ~Composition () throw () {} - - Composition (SimpleName const& name, - Category::Value category, - ScopePtr const& scope) - : Declaration (name, scope), - Scope (name, scope), - category_ (category) - { - } - - public: - Category::Value - category () const - { - return category_; - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "composition"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - Category::Value category_; - }; - - typedef - StrictPtr<Composition> - CompositionPtr; - - typedef - DeclarationOrderComparator<CompositionPtr> - CompositionOrderComparator; - - class HomeExecutor : public virtual Scope - { - public: - virtual - ~HomeExecutor () throw () {} - - HomeExecutor (SimpleName const& name, - ScopePtr const& scope, - ScopedName implements, - SimpleName manages) - : Declaration (name, scope), - Scope (name, scope), - implements_ (scope->table (), implements), - manages_ (manages) - { - } - - public: - HomeDefPtr - implements () const - { - return implements_.resolve (); - } - - SimpleName - manages () const - { - return manages_; - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "home executor"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - HomeDefRef implements_; - SimpleName manages_; - }; - - typedef - StrictPtr<HomeExecutor> - HomeExecutorPtr; - } -} - -#endif // CCF_CIDL_SYNTAX_TREE_HPP diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTreeFwd.hpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTreeFwd.hpp deleted file mode 100644 index 80229bb5722..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_SyntaxTreeFwd.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// $Id$ -#ifndef CCF_CIDL_SYNTAX_TREE_FWD_HPP -#define CCF_CIDL_SYNTAX_TREE_FWD_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL3/IDL3_SyntaxTreeFwd.hpp" - -namespace CIDL -{ - namespace SyntaxTree - { - - // Import all nodes of IDL3 - using namespace IDL3::SyntaxTree; - - class Composition; - typedef - StrictPtr<Composition> - CompositionPtr; - - class HomeExecutor; - typedef - StrictPtr<HomeExecutor> - HomeExecutorPtr; - } -} - -#endif // CCF_CIDL_SYNTAX_TREE_FWD_HPP diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_Traversal.cpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_Traversal.cpp deleted file mode 100644 index 22c635605f0..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_Traversal.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// $Id$ -#include "CIDL_Traversal.hpp" -#include "CIDL_SyntaxTree.hpp" - -namespace CIDL -{ - namespace Traversal - { - namespace - { - //@@ code duplication - void - iterate_scope (SyntaxTree::ScopePtr const& s, - CCF::Traversal::Visitor* v) - { - for (SyntaxTree::Scope::Iterator i = s->begin (); i != s->end (); i++) - { - (*i)->accept (v); - } - } - } - - // - // Composition - // - - void Composition:: - visit_composition (NodePtr const& c) - { - visit_composition_pre (c); - visit_composition_scope (c); - visit_composition_post (c); - } - - void Composition:: - visit_composition_pre (NodePtr const&) - { - } - - void Composition:: - visit_composition_scope (NodePtr const& c) - { - iterate_scope (c, this); - } - - void Composition:: - visit_composition_post (NodePtr const&) - { - } - - // - // HomeExecutor - // - - void HomeExecutor:: - visit_home_executor (NodePtr const& he) - { - visit_home_executor_pre (he); - visit_home_executor_scope (he); - visit_home_executor_post (he); - } - - void HomeExecutor:: - visit_home_executor_pre (NodePtr const&) - { - } - - void HomeExecutor:: - visit_home_executor_scope (NodePtr const& he) - { - iterate_scope (he, this); - } - - void HomeExecutor:: - visit_home_executor_post (NodePtr const&) - { - } - } -} diff --git a/TAO/CIAO/CCF/CCF/CIDL/CIDL_Traversal.hpp b/TAO/CIAO/CCF/CCF/CIDL/CIDL_Traversal.hpp deleted file mode 100644 index c562ecd4d42..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/CIDL_Traversal.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// $Id$ -#ifndef CCF_CIDL_TRAVERSAL_HPP -#define CCF_CIDL_TRAVERSAL_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL3/IDL3_Traversal.hpp" -#include "CCF/CIDL/CIDL_SyntaxTreeFwd.hpp" - -namespace CIDL -{ - namespace Traversal - { - // Import visitors from IDL3 - using namespace IDL3::Traversal; - - // - // Composition - // - struct Composition : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::CompositionPtr - NodePtr; - - virtual void visit_composition (NodePtr const& c); - virtual void visit_composition_pre (NodePtr const& c); - virtual void visit_composition_scope (NodePtr const& c); - virtual void visit_composition_post (NodePtr const& c); - }; - - // - // HomeExecutor - // - struct HomeExecutor : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::HomeExecutorPtr - NodePtr; - - virtual void visit_home_executor (NodePtr const& he); - virtual void visit_home_executor_pre (NodePtr const& he); - virtual void visit_home_executor_scope (NodePtr const& he); - virtual void visit_home_executor_post (NodePtr const& he); - - }; - } -} - -#endif // CCF_CIDL_TRAVERSAL_HPP diff --git a/TAO/CIAO/CCF/CCF/CIDL/MSVC_Pragmas.hpp b/TAO/CIAO/CCF/CCF/CIDL/MSVC_Pragmas.hpp deleted file mode 100644 index 724b5b52646..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/MSVC_Pragmas.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ -#ifndef MSVC_PRAGMAS_HPP -#define MSVC_PRAGMAS_HPP - - -// Various warnings that have to be disabled for MSVC. - -// 'this' : used in base member initializer list -#pragma warning(disable:4355) -// 'class1' : inherits 'class2::member' via dominance -#pragma warning(disable:4250) -// C++ Exception Specification ignored -#pragma warning(disable:4290) - - -#endif /* MSVC_PRAGMAS_HPP */
\ No newline at end of file diff --git a/TAO/CIAO/CCF/CCF/CIDL/Makefile b/TAO/CIAO/CCF/CCF/CIDL/Makefile deleted file mode 100644 index 8df971662da..00000000000 --- a/TAO/CIAO/CCF/CCF/CIDL/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# File : Makefile -# Author : Boris Kolpackov <boris@kolpackov.net> -# $Id$ - -root = ../../External/Utility - -include $(root)/Config/Archive.pre.rules - -cxx_translation_units := CIDL.cpp \ - CIDL_SyntaxTree.cpp \ - CIDL_Traversal.cpp - -module_base := CIDL -module_prefix := -module_suffix := - -CXX_PREPROCESS_FLAGS += -I../.. \ - -I../../External/Utility \ - -I../../External/boost \ - -include $(root)/Config/Archive.post.rules diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.cpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.cpp deleted file mode 100644 index cfa1da318d3..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.cpp +++ /dev/null @@ -1 +0,0 @@ -// $Id$ diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.vcproj b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.vcproj deleted file mode 100644 index 857c5bfd741..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CodeGenerationKit.vcproj +++ /dev/null @@ -1,150 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="CodeGenerationKit" - ProjectGUID="{93C22389-AD2D-45CD-98C6-D9C5D6679B09}" - Keyword="Win32Proj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(ProjectDir)" - IntermediateDirectory="Debug" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../..;../../External/Utility" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" - MinimalRebuild="TRUE" - BasicRuntimeChecks="3" - RuntimeLibrary="5" - ForceConformanceInForLoopScope="TRUE" - RuntimeTypeInfo="TRUE" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/CodeGenerationKit.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - RuntimeLibrary="4" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/CodeGenerationKit.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> - <File - RelativePath=".\CommandLine.cpp"> - </File> - <File - RelativePath=".\CommandLineGrammar.cpp"> - </File> - <File - RelativePath=".\CommandLineParser.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> - <File - RelativePath=".\CommandLine.hpp"> - </File> - <File - RelativePath=".\CommandLineDescriptor.hpp"> - </File> - <File - RelativePath=".\CommandLineGrammar.hpp"> - </File> - <File - RelativePath=".\CommandLineParser.hpp"> - </File> - <File - RelativePath=".\IDLStream.hpp"> - </File> - <File - RelativePath=".\MSVC_Pragmas.hpp"> - </File> - <File - RelativePath=".\Regex.hpp"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> - </Filter> - <File - RelativePath=".\ReadMe.txt"> - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLine.cpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLine.cpp deleted file mode 100644 index f07dd8c10bc..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLine.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// File : CommandLine.cpp -// Author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// $Id$ - -#include "CCF/CodeGenerationKit/CommandLine.hpp" diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLine.hpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLine.hpp deleted file mode 100644 index 94c05320287..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLine.hpp +++ /dev/null @@ -1,202 +0,0 @@ -// File : CommandLine.hpp -// Author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// $Id$ - -#ifndef COMMAND_LINE_H -#define COMMAND_LINE_H - -#include "MSVC_Pragmas.hpp" - -#include <algorithm> -#include <vector> -#include <string> - -using namespace std; - -//@@ this stuff needs proper reimplementation - -class CommandLine -{ -public: - - CommandLine () throw () : separator (false) {} - - - // Option constrain checking -public: - - bool - require (std::string option) const throw () - { - return std::find_if (options.begin (), - options.end (), - OptionNamePredicat (option)) != options.end (); - } - - bool - depends (std::string dependant, - std::string principal) const throw () - { - Options::const_iterator begin = options.begin (); - Options::const_iterator end = options.end (); - - if (std::find_if (begin, end, OptionNamePredicat (dependant)) != end) - { - return std::find_if (begin, end, OptionNamePredicat (principal)) != end; - } - else - { - return true; - } - } - - bool - inconsistent (std::string a, - std::string b) const throw () - { - Options::const_iterator begin = options.begin (); - Options::const_iterator end = options.end (); - - if (std::find_if (begin, end, OptionNamePredicat (a)) != end) - { - return std::find_if (begin, end, OptionNamePredicat (b)) == end; - } - else - { - return true; - } - } - - std::string - get_value (std::string name, std::string const& not_found_value) const - { - Options::const_iterator i = std::find_if ( - options.begin (), - options.end (), - OptionNamePredicat (name)); - - if (i != options.end () && !(i->value_.empty ())) - { - return i->value_; - } - else - { - return not_found_value; - } - } - - std::string - get_value (std::string name, char const* not_found_value) const - { - Options::const_iterator i = std::find_if ( - options.begin (), - options.end (), - OptionNamePredicat (name)); - - if (i != options.end () && !(i->value_.empty ())) - { - return i->value_; - } - else - { - return std::string (not_found_value); - } - } - - bool - get_value (std::string name, bool not_found_value) const - { - Options::const_iterator i = std::find_if ( - options.begin (), - options.end (), - OptionNamePredicat (name)); - - if (i != options.end ()) - { - return true; - } - else - { - return not_found_value; - } - } - - // Arguments - // - // - - typedef - std::vector<std::string> - Arguments; - - typedef - Arguments::const_iterator - ArgumentIterator; - - ArgumentIterator - argument_begin () const - { - return arguments.begin (); - } - - - ArgumentIterator - argument_end () const - { - return arguments.end (); - } - - -public: - - struct Option - { - enum OptionType - { - EQUATIONAL, - COMPOSITE - }; - - Option (OptionType type, - std::string const& name, - std::string const& value) throw () - : type_ (type), - name_ (name), - value_ (value) - { - } - - OptionType type_; - std::string name_; - std::string value_; - }; - - - - struct OptionNamePredicat - { - OptionNamePredicat (std::string const& name) - : name_ (name) - { - } - - bool operator ()(Option const& option) throw () - { - return name_ == option.name_; - } - - private: - std::string const name_; - }; - - typedef std::vector<Option> Options; - typedef std::vector<std::string> Arguments; - - std::string command; - Options options; - Arguments arguments; - - bool separator; -}; - -#endif // COMMAND_LINE_H diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineDescriptor.hpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineDescriptor.hpp deleted file mode 100644 index ac2d3ef6488..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineDescriptor.hpp +++ /dev/null @@ -1,260 +0,0 @@ -// $Id$ -#ifndef COMMAND_LINE_DESCRIPTOR_H -#define COMMAND_LINE_DESCRIPTOR_H - -#include <string> -#include <vector> -#include <ostream> - -//@@ temporary. should probably be changed to CommandLine -namespace CL -{ - class OptionDescription - { - public: - OptionDescription (std::string name, - std::string description, - bool optional) - : optional_ (optional), - name_ (name), - value_synopsis_ (), - description_ (description) - { - } - - - OptionDescription (std::string name, - std::string value_synopsis, - std::string description, - bool optional) - : optional_ (optional), - name_ (name), - value_synopsis_ (value_synopsis), - description_ (description) - { - } - - public: - bool - optional () const - { - return optional_; - } - - std::string - name () const - { - return name_; - } - - std::string - value_synopsis () const - { - return value_synopsis_; - } - - std::string - description () const - { - return description_; - } - - - private: - bool optional_; - std::string name_; - std::string value_synopsis_; - std::string description_; - }; - - - class Description - { - public: - Description (std::string command) - : command_ (command) - { - } - - private: - typedef - std::vector<OptionDescription> - OptionDescriptionList; - - public: - - std::string - command () const - { - return command_; - } - - - public: - typedef - OptionDescriptionList::const_iterator - OptionIterator; - - OptionIterator - begin_option () const - { - return options_.begin (); - } - - OptionIterator - end_option () const - { - return options_.end (); - } - - void - add_option (OptionDescription const& od) - { - options_.push_back (od); - } - - private: - typedef - std::vector<std::string> - ArgumentDescriptionList; - - public: - typedef - ArgumentDescriptionList::const_iterator - ArgumentIterator; - - ArgumentIterator - begin_argument () const - { - return arguments_.begin (); - } - - ArgumentIterator - end_argument () const - { - return arguments_.end (); - } - - void - add_argument (std::string arg) - { - arguments_.push_back (arg); - } - - private: - - std::string command_; - OptionDescriptionList options_; - ArgumentDescriptionList arguments_; - }; - - inline void - print_text (std::ostream& os, Description const& d) - { - os << d.command (); - - Description::OptionIterator ob = d.begin_option (); - Description::OptionIterator oe = d.end_option (); - - if (ob != oe) - { - os << " { OPTIONS }"; - } - - Description::ArgumentIterator ab = d.begin_argument (); - Description::ArgumentIterator ae = d.end_argument (); - - for (; ab != ae; ab++) - { - os << " <" << *ab << ">"; - } - - os << endl << endl; - - for (; ob != oe; ob++) - { - os << (ob->optional () ? "[--" : "--") - << ob->name () - << (ob->value_synopsis ().empty () ? "" : " ") - << ob->value_synopsis () - << (ob->optional () ? "]" : "") - << endl; - - os << "\t\t" << ob->description () << endl; - } - - } - - - inline void - print_html (std::ostream& os, Description const& d) - { - os << "<html>" << endl - << "<body>" << endl - << "<div align=\"center\">" << endl - << "<table width=\"700\" border=\"0\" cellspacing=\"0\" " - << "cellpadding=\"0\">" << endl - << "<tr>" << endl - << "<td>" << endl; - - os << "<p>" << endl - << "<code>" << endl; - - os << d.command (); - - Description::OptionIterator ob = d.begin_option (); - Description::OptionIterator oe = d.end_option (); - - if (ob != oe) - { - os << " { OPTIONS }"; - } - - Description::ArgumentIterator ab = d.begin_argument (); - Description::ArgumentIterator ae = d.end_argument (); - - for (; ab != ae; ab++) - { - os << " <" << *ab << ">"; - } - - os << endl - << "</code>" << endl - << "</p>" << endl; - - - os << "<dl>" << endl; - - for (; ob != oe; ob++) - { - os << "<dt>" << endl - << "<code>" << endl - << (ob->optional () ? "[--" : "--") - << ob->name () - << (ob->value_synopsis ().empty () ? "" : " ") - << ob->value_synopsis () - << (ob->optional () ? "]" : "") << endl - << "</code>" << endl - << "</dt>" << endl; - - os << "<dd>" << endl - << "<p>" << endl - << ob->description () << endl - << "</p>" << endl - << "</dd>" << endl; - } - - os << "</dl>" << endl; - - os << "</td>" << endl - << "</tr>" << endl - << "</table>" << endl - << "</div>" << endl - << "</body>" << endl - << "</html>" << endl; - - } -} - - -#endif // COMMAND_LINE_DESCRIPTOR_H diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineGrammar.cpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineGrammar.cpp deleted file mode 100644 index b14ef33fb1b..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineGrammar.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// File : CommandLineGrammar.cpp -// Author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// $Id$ - -#include "CCF/CodeGenerationKit/CommandLineGrammar.hpp" diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineGrammar.hpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineGrammar.hpp deleted file mode 100644 index 89f1ccb90e2..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineGrammar.hpp +++ /dev/null @@ -1,361 +0,0 @@ -// File : CommandLineGrammar.hpp -// Author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// $Id$ - -#ifndef COMMAND_LINE_GRAMMAR_H -#define COMMAND_LINE_GRAMMAR_H - -#include "MSVC_Pragmas.hpp" - -#include <vector> -#include <string> - -#include <boost/spirit.hpp> - -#include "CCF/CodeGenerationKit/CommandLine.hpp" - - -using namespace std; -using namespace boost::spirit; - -template <typename S> -struct string_directive : public unary<S, parser<string_directive<S> > > -{ - typedef string_directive self_t; - - string_directive (S const& a) - : unary<S, parser<string_directive<S> > > (a) - { - } - - template <typename ScannerT> - typename parser_result<self_t, ScannerT>::type - parse(ScannerT const& scan) const - { - typedef typename ScannerT::iterator_t Iterator; - typedef typename ScannerT::value_t Value; - typedef typename Value::const_iterator ValueIterator; - - Iterator save = scan.first; - - int len = 0; - - if (!scan.at_end()) - { - // Now go one level deeper - - Value const& v = *scan; - - ValueIterator first = v.begin (); - ValueIterator last = v.end (); - - scanner<ValueIterator, scanner_policies <> > sl_scan(first, last); - - match<nil_t> hit = this->subject ().parse(sl_scan); - - if (hit.length() == v.length ()) - { - ++scan; - - return scan.create_match(1, nil_t(), save, scan.first); - } - else - { - return scan.no_match(); - } - } - else - { - return scan.no_match(); - } - } -}; - - -template <typename S> -string_directive<S> -string_d (parser<S> const& a) -{ - return string_directive<S>(a.derived()); -} - - -struct CLineGrammar : public grammar<CLineGrammar> -{ - CommandLine& cl_; - - CLineGrammar (CommandLine& cl) throw () : cl_(cl) {} - - - template <typename IteratorT, typename CodeT> - struct SemanticAction - { - SemanticAction (CommandLine& cl) : cl_ (cl), code_ () {} - - void operator()(IteratorT first, IteratorT last) const - { - string str (first, last); - code_.execute (cl_, str); - } - - private: - CommandLine& cl_; - CodeT code_; - }; - - - struct SetCommandName - { - void execute (CommandLine& cl, string const& s) const throw () - { - cl.command = s; - } - }; - - - template <typename IteratorT> - struct SetOptionName - { - SetOptionName (CommandLine& cl, - CommandLine::Option::OptionType type) - : cl_ (cl), type_ (type) - { - } - - void operator()(IteratorT first, IteratorT last) const - { - string s (first, last); - cl_.options.push_back (CommandLine::Option(type_, s, "")); - } - - private: - CommandLine& cl_; - CommandLine::Option::OptionType type_; - }; - - - struct SetOptionValue - { - void execute (CommandLine& cl, string const& s) const throw () - { - CommandLine::Options::reverse_iterator r = cl.options.rbegin (); - - if (r != cl.options.rend () && r->value_ == "") - { - r->value_ = s; - } - else - { - //@@ - //throw - } - } - }; - - struct SetArgument - { - void execute (CommandLine& cl, string const& s) const throw () - { - cl.arguments.push_back (s); - } - }; - - struct SetSeparator - { - void execute (CommandLine& cl, string const& s) const throw () - { - cl.separator = true; - } - }; - - - template <typename ScannerT> - struct definition - { - typedef typename ScannerT::value_t::const_iterator SLIterator; - typedef scanner<SLIterator, scanner_policies <> > SLScanner; - - typedef rule<ScannerT> Rule; - typedef rule<SLScanner> SLRule; - - - Rule r_argument; - Rule r_arg_list; - - Rule argument; - Rule arg_list; - - SLRule option_prefix; - SLRule e_name; // equational name, i.e. can meet '=' - SLRule c_name; // composite name, i.e. failes if meets '=' - SLRule e_value; // equational value, i.e. can contain leading '-' - SLRule c_value; // composite value, i.e. cannot contain leading '-' - - Rule composite; - Rule equational; - - Rule option_list; - Rule option; - - SLRule command_name; - - Rule command_line; - - // Semantic actions - - typedef SemanticAction<SLIterator, SetCommandName> CommandNameHandler; - typedef SetOptionName<SLIterator> OptionNameHandler; - typedef SemanticAction<SLIterator, SetOptionValue> OptionValueHandler; - typedef SemanticAction<SLIterator, SetArgument> ArgumentHandler; - typedef SemanticAction<SLIterator, SetSeparator> SeperatorHandler; - - /* - - <epigraph> - - As many people naively believe command line is - not a space separated array of words. - - -- unknown author. - </epigraph> - - - - NOTE: - - (1) This grammar is space-sensitive. - - (2) Anychar is assumend not to clash with <argv-delim>. Instead - <argv-delim> is assumed to be a next-dimension entitiy. - - - <command-line> ::= <command-name> - [ - [ <argv-delim> <option-list>] - [ - <option-prefix> [<argv-delim> <arg-list>] | - <argv-delim> <r-arg-list> - ] - ] - - <command-name> ::= anychar+ - - <option-list> ::= <option> { <argv-delim> <option> }* - <option> ::= <composite> | <equational> - <composite> ::= <option-prefix> <name> [ <argv-delim><c-value> ] - <equational> ::= <option-prefix> <name> '=' <e-value> - <option-prefix> ::= '-' [ '-' ] - <name> ::= {anychar - '='}+ - <c-value> ::= anychar+ - {<option-prefix> anychar*} - <e-valie> ::= anychar+ - - <arg-list> ::= <argument> { <arg-delim> <argument> }* - <r-arg-list> ::= <r-argument> { <arg-delim> <argument> }* - - <argument> ::= anychar+ - <r-argument> ::= anychar+ - {<option-prefix> anychar*} - - - */ - - - definition(CLineGrammar const& self) - { - command_line = - - string_d (command_name) >> - !option_list >> - !( - ( - string_d - ( - option_prefix[ SeperatorHandler (self.cl_) ] - ) >> !arg_list - ) | r_arg_list - ); - - // command name - - command_name = (+anychar_p)[CommandNameHandler (self.cl_)]; - - // options - - option_list = *(option); - - option = composite | equational; - - composite = - - string_d - ( - option_prefix >> c_name - - ) >> !string_d (c_value); - - equational = string_d (option_prefix >> e_name >> '=' >> e_value); - - option_prefix = lexeme_d[ch_p('-') >> !ch_p('-')]; - - e_name = - - lexeme_d - [ - ( - +( - anychar_p - ('=' | space_p) - ) - - )[ OptionNameHandler (self.cl_, CommandLine::Option::EQUATIONAL) ] - ]; - - c_name = - - lexeme_d - [ - ( - +(anychar_p - space_p) - - - ( - *(anychar_p - '=') >> '=' >> *anychar_p - ) - - )[ OptionNameHandler (self.cl_, CommandLine::Option::COMPOSITE) ] - ]; - - e_value = (+anychar_p)[ OptionValueHandler (self.cl_) ]; - - - c_value = - ( - +anychar_p - ( option_prefix >> *anychar_p ) - - )[ OptionValueHandler (self.cl_) ]; - - - - // arguments - - arg_list = *(argument); - r_arg_list = !(r_argument >> *argument); - - argument = string_d ((+anychar_p)[ ArgumentHandler (self.cl_) ]); - - r_argument = string_d - ( - ( - +anychar_p - (option_prefix >> *anychar_p) - - )[ ArgumentHandler (self.cl_) ] - ); - - } - - rule<ScannerT> const& start() const - { - return command_line; - } - }; -}; - - -#endif // COMMAND_LINE_GRAMMAR_H diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.cpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.cpp deleted file mode 100644 index 0394f895669..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// File : CommandLineParser.cpp -// Author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// $Id$ - -#include "CCF/CodeGenerationKit/CommandLineParser.hpp" -#include "CCF/CodeGenerationKit/CommandLineGrammar.hpp" - -#include <iostream> - -using std::cerr; -using std::endl; - -bool parse (int argc, char* argv[], CommandLine& cl) throw () -{ - typedef vector<string> Argv; - - Argv v; - - for (int i = 0; i < argc; i++) - { - v.push_back (argv[i]); - } - - Argv::iterator first = v.begin (); - Argv::iterator last = v.end (); - - scanner<Argv::iterator, scanner_policies <> > scan(first, last); - - CLineGrammar g (cl); - - match<nil_t> hit = g.parse(scan); - - bool result = hit.length() == v.size (); - - // some semantic analisys - if (!cl.separator) - { - CommandLine::Options::reverse_iterator r = cl.options.rbegin (); - - if (r != cl.options.rend () && - r->value_ != "" && - r->type_ == CommandLine::Option::COMPOSITE) - { - - cerr << "command line: assuming <" << r->value_ - << "> to be a value of option <" << r->name_ - << "> and not the first argument" << endl; - - cerr << "command line: write ... --" << r->name_ << " -- " - << r->value_ << " ... to indicate otherwise" << endl; - } - } - - return result; -} diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.hpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.hpp deleted file mode 100644 index 920722403b3..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/CommandLineParser.hpp +++ /dev/null @@ -1,14 +0,0 @@ -// File : CommandLineParser.hpp -// Author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// $Id$ - -#ifndef COMMAND_LINE_PARSER_H -#define COMMAND_LINE_PARSER_H - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CodeGenerationKit/CommandLine.hpp" - -bool parse (int argc, char* argv[], CommandLine& cl) throw (); - -#endif // COMMAND_LINE_PARSER_H diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/IDLStream.hpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/IDLStream.hpp deleted file mode 100644 index d5e8d897ded..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/IDLStream.hpp +++ /dev/null @@ -1,126 +0,0 @@ -// $Id$ - -#include "MSVC_Pragmas.hpp" - -#include <streambuf> -#include <iostream> - -//@@ would be nice to teach this beast to handle double newlines -// the idea is to convert double newline into single newline when -// the next character is '}' - -class IDLFormattingBuffer : public std::streambuf -{ -public: - IDLFormattingBuffer (std::streambuf* next) - : after_nl_ (true), - state_ (DECL_COMPLETE), - indentation_ (0), - next_ (next) - { - setbuf (0, 0); - } - - std::streambuf* - next () const - { - return next_; - } - - - -protected: - - class Full {}; - -protected: - - virtual int_type - overflow (int_type c) - { - int_type result; - - try - { - bool defaulting = false; - switch (c) - { - case '\n': - { - result = write (c); - after_nl_ = true; - break; - } - case '{': - { - output_indentation (); - result = write (c); - indentation_++; - break; - } - case '}': - { - if (indentation_ > 0) indentation_--; - output_indentation (); - result = write (c); - break; - } - default: - { - defaulting = true; - break; - } - } - - if (defaulting) - { - output_indentation (); - result = write (c); - } - - } - catch (Full const&) - { - result = traits_type::eof (); - } - - return result; - } - - void - output_indentation () throw (Full) - { - if (after_nl_) - { - for (unsigned long i = 0; i < indentation_; i++) - { - write (' '); - write (' '); - } - after_nl_ = false; - } - } - - int_type - write (int_type c) throw (Full) - { - int_type result = next_->sputc (c); - - if (result == traits_type::eof ()) throw Full (); - - return result; - } - - -private: - - enum State - { - DECL_COMPLETE, - }; - - bool after_nl_; - State state_; - unsigned long indentation_; - std::streambuf* next_; -}; diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/MSVC_Pragmas.hpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/MSVC_Pragmas.hpp deleted file mode 100644 index 724b5b52646..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/MSVC_Pragmas.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ -#ifndef MSVC_PRAGMAS_HPP -#define MSVC_PRAGMAS_HPP - - -// Various warnings that have to be disabled for MSVC. - -// 'this' : used in base member initializer list -#pragma warning(disable:4355) -// 'class1' : inherits 'class2::member' via dominance -#pragma warning(disable:4250) -// C++ Exception Specification ignored -#pragma warning(disable:4290) - - -#endif /* MSVC_PRAGMAS_HPP */
\ No newline at end of file diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/Makefile b/TAO/CIAO/CCF/CCF/CodeGenerationKit/Makefile deleted file mode 100644 index 697130f21e6..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# File : Makefile -# Author : Boris Kolpackov <boris@kolpackov.net> -# $Id$ - -root = ../../External/Utility - -include $(root)/Config/Archive.pre.rules - -cxx_translation_units := CodeGenerationKit.cpp \ - CommandLine.cpp \ - CommandLineGrammar.cpp \ - CommandLineParser.cpp - -module_base := CodeGenerationKit -module_prefix := -module_suffix := - -CXX_PREPROCESS_FLAGS += -I../.. \ - -I../../External/Utility \ - -I../../External/boost \ - -include $(root)/Config/Archive.post.rules diff --git a/TAO/CIAO/CCF/CCF/CodeGenerationKit/Regex.hpp b/TAO/CIAO/CCF/CCF/CodeGenerationKit/Regex.hpp deleted file mode 100644 index f9928441262..00000000000 --- a/TAO/CIAO/CCF/CCF/CodeGenerationKit/Regex.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// file : CCF/CodeGenerationKit/Regex.hpp -// author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// cvs-id : $Id$ - -#ifndef CCF_RUNTIME_REGEX_HPP -#define CCF_RUNTIME_REGEX_HPP - -#include "MSVC_Pragmas.hpp" - -#include <string> -#include <boost/regex.hpp> - -namespace regex -{ - using boost::regex; - using boost::regex_merge; - - inline std::string - perl_s (std::string src, std::string e) - { - char delimiter = '/'; - - std::string::size_type first = e.find (delimiter); - std::string::size_type middle = e.find (delimiter, first + 1); - std::string::size_type last = e.find (delimiter, middle + 1); - - std::string pattern (e, first + 1, middle - first - 1); - std::string format (e, middle + 1, last - middle - 1); - - //std::cout << pattern << " " << format << std::endl; - - regex expr (pattern); - - return regex_merge ( - src, - expr, - format, - boost::match_default | boost::format_all ); - } -} - -#endif // CCF_RUNTIME_REGEX_HPP diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/DiagnosticStream.cpp b/TAO/CIAO/CCF/CCF/CompilerElements/DiagnosticStream.cpp deleted file mode 100644 index 9150c62350d..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/DiagnosticStream.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// file : CCF/Runtime/DiagnosticStream.cpp -// author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// cvs-id : $Id$ - -#include "CCF/Runtime/DiagnosticStream.hpp" - -#include <iostream> - -namespace CCF -{ - namespace Runtime - { - namespace Diagnostic - { - Stream dout; - - // - // class Message - // - - Message::~Message () throw () - { - } - - // - // class Stream - // - - Stream::Stream () throw () - { - } - - - Stream::~Stream () throw () - { - } - - Stream& - Stream:: operator << (Message const& msg) - throw (ExH::System::Exception) - { - std::cerr << msg.text () << std::endl; - return *this; - } - } - } -} diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/DiagnosticStream.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/DiagnosticStream.hpp deleted file mode 100644 index 6561095690c..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/DiagnosticStream.hpp +++ /dev/null @@ -1,141 +0,0 @@ -// file : CCF/Runtime/DiagnosticStream.hpp -// author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// cvs-id : $Id$ - -#ifndef CCF_RUNTIME_DIAGNOSTIC_DIAGNOSTIC_STREAM_H -#define CCF_RUNTIME_DIAGNOSTIC_DIAGNOSTIC_STREAM_H - -#include "MSVC_Pragmas.hpp" - -#include <string> -#include <sstream> - -#include "CCF/CompilerElements/ExH.hpp" - -namespace CCF -{ - namespace Runtime - { - namespace Diagnostic - { - class Message - { - public: - virtual - ~Message () throw (); - - virtual std::string - text () const throw (ExH::System::Exception) = 0; - }; - - class Stream - { - public: - Stream () throw (); - virtual - ~Stream () throw (); - - public: - Stream& operator<< (Message const& msg) - throw (ExH::System::Exception); - - private: - // Copy semanic is not supported. - Stream (Stream const&) throw (); - Stream& operator= (Stream const&) throw (); - }; - - extern Stream dout; - - // - // Concrete Message classes. - // - - template <typename Category> - class MessageImpl : public virtual Message, - public virtual Category - { - public: - MessageImpl (char const* subject, char const* message) - throw (ExH::System::Exception) - : subject_ (subject), message_ (message) {} - - MessageImpl (char const* subject, std::ostringstream const& message) - throw (ExH::System::Exception) - : subject_ (subject), message_ (message.str ()) {} - - virtual - ~MessageImpl () throw () {} - - virtual std::string - text () const throw (ExH::System::Exception) - { - std::string category = Category::name (); - - if (category.empty ()) - { - return subject_ + ": " + message_; - } - else - { - return subject_ + ": " + category + ": " + message_; - } - } - - private: - std::string subject_; - std::string message_; - }; - - // - // Error - // - - struct ErrorCategory - { - virtual ~ErrorCategory () throw () {} - - std::string name () const throw (ExH::System::Exception) - { - return "error"; - } - }; - - typedef MessageImpl<ErrorCategory> Error; - - // - // Warning - // - - struct WarningCategory - { - virtual ~WarningCategory () throw () {} - - std::string name () const throw (ExH::System::Exception) - { - return "warning"; - } - }; - - typedef MessageImpl<WarningCategory> Warning; - - // - // Information - // - - struct InformationCategory - { - virtual ~InformationCategory () throw () {} - - std::string name () const throw (ExH::System::Exception) - { - return ""; - } - }; - - typedef MessageImpl<InformationCategory> Information; - } - } -} - -#endif // CCF_RUNTIME_DIAGNOSTIC_DIAGNOSTIC_STREAM_H diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/ExH.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/ExH.hpp deleted file mode 100644 index 41f05a56f5b..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/ExH.hpp +++ /dev/null @@ -1,14 +0,0 @@ -// file : CCF/CompilerElements/ExH.hpp -// author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// cvs-id : $Id$ - -#ifndef CCF_RUNTIME_EX_H_H -#define CCF_RUNTIME_EX_H_H - -#include "MSVC_Pragmas.hpp" - -#include "Utility/ExH/ExH.hpp" - -namespace ExH = Utility::ExH; - -#endif // CCF_RUNTIME_EX_H_H diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp deleted file mode 100644 index e42c7a3d213..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// file : CCF/CompilerElements/FileSystem.hpp -// author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// cvs-id : $Id$ - -#ifndef CCF_RUNTIME_FILE_SYSTEM_HPP -#define CCF_RUNTIME_FILE_SYSTEM_HPP - -#include "MSVC_Pragmas.hpp" - -#include <boost/filesystem/path.hpp> -#include <boost/filesystem/fstream.hpp> -#include <boost/filesystem/exception.hpp> -#include <boost/filesystem/operations.hpp> - -namespace fs = boost::filesystem; - -#endif // CCF_RUNTIME_FILE_SYSTEM_HPP diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/MSVC_Pragmas.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/MSVC_Pragmas.hpp deleted file mode 100644 index f51b92d747b..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/MSVC_Pragmas.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef MSVC_PRAGMAS_HPP -#define MSVC_PRAGMAS_HPP - - -// Various warnings that have to be disabled for MSVC. - -// 'this' : used in base member initializer list -#pragma warning(disable:4355) -// 'class1' : inherits 'class2::member' via dominance -#pragma warning(disable:4250) -// C++ Exception Specification ignored -#pragma warning(disable:4290) - - -#endif /* MSVC_PRAGMAS_HPP */
\ No newline at end of file diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/Parser.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/Parser.hpp deleted file mode 100644 index dd932937b3d..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/Parser.hpp +++ /dev/null @@ -1,265 +0,0 @@ -#ifndef PARSER_HPP -#define PARSER_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CompilerElements/Token.hpp" - -#include <boost/spirit.hpp> - -namespace Details -{ - using namespace boost::spirit; - - typedef - TokenStream::iterator - Iterator; - - typedef - scanner<Iterator, scanner_policies<> > - Scanner; - - typedef - rule<Scanner> - Rule; - - - //------------------------------------------------------------- - - template <typename TypePtr> - struct IdentityParser : public parser <IdentityParser<TypePtr> > - { - typedef - IdentityParser - self_t; - - IdentityParser (TypePtr const& t) - : t_ (t) - { - } - - typename parser_result<self_t, Scanner>::type - parse(Scanner const& scan) const - { - if (!scan.at_end()) - { - TokenPtr t = *scan; - - if(identical (t_, t)) - { - Iterator save(scan.first); - ++scan; - return scan.create_match(1, t, save, scan.first); - } - } - return scan.no_match(); - } - - private: - TypePtr t_; - }; - - typedef - IdentityParser<KeywordPtr> - KeywordParser; - - typedef - IdentityParser<PunctuationPtr> - PunctuationParser; - - //---------------------------------------------------------------- - - template <typename TypePtr> - struct TypeParser : public parser <TypeParser<TypePtr> > - { - typedef - TypeParser - self_t; - - typename parser_result<self_t, Scanner>::type - parse(Scanner const& scan) const - { - if (!scan.at_end()) - { - TokenPtr t = *scan; - - if(typical<TypePtr>(t) != 0) - { - Iterator save(scan.first); - ++scan; - return scan.create_match(1, t, save, scan.first); - } - } - return scan.no_match(); - } - }; - - typedef - TypeParser<IdentifierPtr> - IdentifierParser; - - typedef - TypeParser<SimpleIdentifierPtr> - SimpleIdentifierParser; - - typedef - TypeParser<ScopedIdentifierPtr> - ScopedIdentifierParser; - - typedef - TypeParser<StringLiteralPtr> - StringLiteralParser; - - //--------------------------------------------------------------- - - bool parse (Iterator const& first_, - Iterator const& last, - Rule const& rule) - { - Iterator first = first_; - Scanner scan(first, last); - match<nil_t> hit = rule.parse(scan); - - bool result = parse_info<Iterator>( - first, hit, hit && (first == last), hit.length()).full; - - if (!result) - { - if (first != last) - { - std::cerr << (*first)->line () - << ": error: illegal syntactic construct" << std::endl; - } - else - { - //@@ what are the conditions when this happens? - //@@ is I add EOS token to the grammar then I can avoid this? - std::cerr << "error: illegal syntactic construct" << std::endl; - } - - } - - return result; - } -} - -// Base class for CCF-compliant parser -class Parser -{ -protected: - - typedef - Details::Iterator - Iterator; - -protected: - - template <typename Obj> - class ActionExecutor - { - public: - - typedef - void (Obj::*SemanticAction)(Iterator, Iterator) const; - - ActionExecutor (Obj const* obj, SemanticAction action) - : obj_ (obj), action_ (action) - { - } - - void operator () (Iterator begin, Iterator end) const - { - (obj_->*action_) (begin, end); - } - - private: - Obj const* obj_; - SemanticAction action_; - }; - - template <typename Obj> - class NoArgAction - { - public: - - typedef - void (Obj::*Action)(); - - NoArgAction (Obj& obj, Action action) - : obj_ (obj), action_ (action) - { - } - - void operator () (Iterator, Iterator) const - { - (obj_.*action_) (); - } - - private: - Obj& obj_; - Action action_; - }; - - template <typename TypePtr, typename Obj> - class OneArgAction - { - public: - - typedef - void (Obj::*Action)(TypePtr const&); - - OneArgAction (Obj& obj, Action action) - : obj_ (obj), action_ (action) - { - } - - void operator () (Iterator begin, Iterator end) const - { - if (end - begin != 1 ) - { - //@@ throw - } - - //@@ error handling if typical fails - (obj_.*action_) (typical<TypePtr> (*begin)); - } - - private: - Obj& obj_; - Action action_; - }; - - - template <typename Arg1, typename Arg2, typename Obj> - class TwoArgAction - { - public: - - typedef - void (Obj::*Action)(Arg1 const&, Arg2 const&); - - TwoArgAction (Obj& obj, Action action) - : obj_ (obj), action_ (action) - { - } - - void operator () (Iterator begin, Iterator end) const - { - if (end - begin != 2 ) - { - //@@ throw - } - - //@@ error handling if typical fails - (obj_.*action_) (typical<Arg1> (*begin), - typical<Arg2> (*(begin + 1))); - } - - private: - Obj& obj_; - Action action_; - }; -}; - - -#endif // PARSER_HPP diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/Preprocessor.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/Preprocessor.hpp deleted file mode 100644 index cefbed2da46..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/Preprocessor.hpp +++ /dev/null @@ -1,303 +0,0 @@ -#ifndef CCF_PREPROCESSOR_HPP -#define CCF_PREPROCESSOR_HPP - -#include "CCF/CompilerElements/TokenStream.hpp" - -namespace CCF -{ - //@@ this code is experimental and needs cleaning - class Preprocessor : public TokenStream<char> - { - public: - virtual - ~Preprocessor () {} - - Preprocessor (TokenStream<char>& is) - : state (PREPROCESSING), - loc_ ("C"), - is_ (is) - { - } - - public: - virtual int_type - next () - { - return out_get (); - } - - private: - int_type - underflow () - { - int_type i = in_get (); - - if (eos (i)) - { - return i; - } - - char_type c = to_char_type (i); - - //std::cerr << "next_i: c = " << c << std::endl; - - switch (c) - { - case '\\': return handle_escape (); - case '\"': - { - if (state == STRING_LITERAL) state = PREPROCESSING; - else if (state == PREPROCESSING) state = STRING_LITERAL; - else - { - //@@error - } - break; - } - case '\'': - { - if (state == CHAR_LITERAL) state = PREPROCESSING; - else if (state == PREPROCESSING) state = CHAR_LITERAL; - else - { - //@@error - } - break; - } - case '#': - { - if (state != PREPROCESSING) break; - return handle_preprocessor_token (); - } - } - - return i; - } - - int_type - handle_escape () - { - int_type i = in_get (); - - if (eos (i)) - { - //@@ error - return i; - } - - char_type c = to_char_type (i); - - //@@ '\n' won't work on MShit - switch (c) - { - case '\n': return underflow (); //skip it - default: - { - out_buffer_.push_back (i); - return '\\'; - } - } - } - - void - skip_white_space () - { - while (true) - { - int_type i = in_get (); - if (!eos (i)) - { - char_type c = to_char_type (i); - if (std::isspace (c, loc_) && c != '\n') continue; - } - - in_put (i); - break; - } - } - - int_type - handle_preprocessor_token () - { - //std::cerr << "handle_preprocessor_token" << std::endl; - - skip_white_space (); - - std::string lexeme; - - int_type i; - char_type c; - - while (true) - { - i = in_get (); - - if (eos (i)) - { - //@@ error - return i; - } - - c = to_char_type (i); - - if (std::isalnum (c, loc_)) - { - lexeme += c; - continue; - } - break; - } - - if (lexeme == "include") return handle_preprocessor_include (); - else - { - // skip till newline - while (true) - { - if (c == '\n') break; - - i = in_get (); - - if (eos (i)) - { - //@@ error - return i; - } - - c = to_char_type (i); - } - } - - return underflow (); - } - - - int_type - handle_preprocessor_include () - { - //out_put (std::string ("include")); - - skip_white_space (); - - std::string file; - - int_type i = in_get (); - - if (eos (i)) - { - //@@ error - return i; - } - - char_type c = to_char_type (i); - - char_type finilizer; - - if (c == '\"') finilizer = c; - else if (c == '<') finilizer = '>'; - else - { - //@@error - } - - while (true) - { - i = in_get (); - - if (eos (i)) - { - //@@ error - return i; - } - - c = to_char_type (i); - - if (c == finilizer) break; - - file += c; - } - - //@@ it's probably a good idea to skip until the newline - // and perhaps check that all the rest is whitespace. - - if (finilizer == '>') out_put (std::string("sinclude \"")); - else out_put (std::string("include \"")); - - out_put (file); - out_put ("\";"); - - return out_get (); - } - - - private: - - // Buffer manipulation - - int_type - in_get () - { - if (in_buffer_.empty ()) - { - return is_.next (); - } - else - { - int_type i = in_buffer_.front (); - in_buffer_.pop_front (); - return i; - } - } - - void - in_put (int_type c) - { - in_buffer_.push_back (c); - } - - int_type - out_get () - { - if (out_buffer_.empty ()) - { - return underflow (); - } - else - { - int_type i = out_buffer_.front (); - out_buffer_.pop_front (); - return i; - } - } - - void - out_put (std::string const& str) - { - for (std::string::const_iterator i = str.begin (); i != str.end (); i++) - { - out_buffer_.push_back (*i); - } - } - - void - out_put (int_type c) - { - out_buffer_.push_back (c); - } - - private: - enum State - { - PREPROCESSING, - STRING_LITERAL, - CHAR_LITERAL - } state; - - std::locale loc_; - TokenStream<char>& is_; - std::deque<int_type> in_buffer_; - std::deque<int_type> out_buffer_; - }; -} - -#endif //CCF_PREPROCESSOR_HPP diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/ReferenceCounting.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/ReferenceCounting.hpp deleted file mode 100644 index 231b3b1b51d..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/ReferenceCounting.hpp +++ /dev/null @@ -1,14 +0,0 @@ -// file : CCF/CompilerElements/ReferenceCounting.hpp -// author : Boris Kolpackov <boris@dre.vanderbilt.edu> -// cvs-id : $Id$ - -#ifndef CCF_RUNTIME_REFERENCE_COUNTING_H -#define CCF_RUNTIME_REFERENCE_COUNTING_H - -#include "MSVC_Pragmas.hpp" - -#include "Utility/ReferenceCounting/ReferenceCounting.hpp" - -namespace ReferenceCounting = Utility::ReferenceCounting; - -#endif // CCF_RUNTIME_REFERENCE_COUNTING_H diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/SemanticAction.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/SemanticAction.hpp deleted file mode 100644 index 23448fe4c2a..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/SemanticAction.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef SEMANTIC_ACTION_HPP -#define SEMANTIC_ACTION_HPP - -#include "MSVC_Pragmas.hpp" - -namespace SemanticAction -{ - class Base - { - public: - virtual ~Base () {}; - }; -} - -#endif // SEMANTIC_ACTION_HPP diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/Token.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/Token.hpp deleted file mode 100644 index cb172c8746b..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/Token.hpp +++ /dev/null @@ -1,255 +0,0 @@ -#ifndef TOKEN_HPP -#define TOKEN_HPP - -#include "MSVC_Pragmas.hpp" - -#include <vector> -#include <string> -//@@ it's a good idea to include ostream instead of iostream where I only -// use ostreams -#include <ostream> - -#include "CCF/CompilerElements/ReferenceCounting.hpp" - -// -// -// -class Token : public ReferenceCounting::DefaultImpl <> -{ -protected: - Token (unsigned long line) - : line_ (line) - { - } - -public: - virtual ~Token () throw () {} - -public: - unsigned long - line () const - { - return line_; - } - -private: - unsigned long line_; -}; - -typedef -ReferenceCounting::StrictPtr<Token> -TokenPtr; - -typedef -std::vector<TokenPtr> -TokenStream; - -// -// -// -class EndOfStream : public Token -{ -public: - EndOfStream () - : Token (0) - { - } - - virtual ~EndOfStream () throw () {} -}; - -typedef -ReferenceCounting::StrictPtr<EndOfStream> -EndOfStreamPtr; - -// -// -// -class Keyword : public Token -{ -public: - Keyword () - : Token (0) - { - } - - virtual - ~Keyword () throw () {} -}; - -typedef -ReferenceCounting::StrictPtr<Keyword> -KeywordPtr; - - - -// -// -// -class Punctuation : public Token -{ -public: - Punctuation () - : Token (0) - { - } - - virtual - ~Punctuation () throw () {} -}; - -typedef -ReferenceCounting::StrictPtr<Punctuation> -PunctuationPtr; - - -// -// -// -class Identifier : public Token -{ -public: - Identifier (std::string const& value, unsigned long line) - : Token (line), - value_ (value) - { - } - - virtual - ~Identifier () throw () {} - - //@@ this mf should probably be called str () or something like this - std::string - value () const - { - return value_; - } - -protected: - std::string value_; -}; - -typedef -ReferenceCounting::StrictPtr<Identifier> -IdentifierPtr; - -inline std::ostream& -operator<< (std::ostream& o, IdentifierPtr const& id) -{ - if (id != 0) o << id->value (); - return o; -} - -// -// -// -class SimpleIdentifier : public Identifier -{ -public: - SimpleIdentifier (std::string const& value, unsigned long line) - : Identifier (value, line) - { - } - - virtual - ~SimpleIdentifier () throw () {} -}; - -typedef -ReferenceCounting::StrictPtr<SimpleIdentifier> -SimpleIdentifierPtr; - -inline std::ostream& -operator<< (std::ostream& o, SimpleIdentifierPtr const& id) -{ - if (id != 0) o << id->value (); - return o; -} - -// -// -// -class ScopedIdentifier : public Identifier -{ -public: - ScopedIdentifier (std::string const& value, unsigned long line) - : Identifier (value, line) - { - } - - virtual - ~ScopedIdentifier () throw () {} -}; - -typedef -ReferenceCounting::StrictPtr<ScopedIdentifier> -ScopedIdentifierPtr; - -inline std::ostream& -operator<< (std::ostream& o, ScopedIdentifierPtr const& id) -{ - if (id != 0) o << id->value (); - return o; -} - -// -// -// -class StringLiteral : public Token -{ -public: - StringLiteral (std::string const& value, unsigned long line) - : Token (line), - value_ (value) - { - } - - virtual - ~StringLiteral () throw () {} - - std::string - value () const - { - return value_; - } - -protected: - std::string value_; -}; - -typedef -ReferenceCounting::StrictPtr<StringLiteral> -StringLiteralPtr; - -inline std::ostream& -operator<< (std::ostream& o, StringLiteralPtr const& sl) -{ - if (sl != 0) o << sl->value (); - return o; -} - -//@@ this is experimental code -// -// -template <typename TypePtr> -bool identical (TypePtr const& a, TokenPtr const& b) -{ - typedef - typename TypePtr::Type - Type; - - Type* t = dynamic_cast<Type*>(b.in ()); - return (t != 0) && (t == a.in ()); -}; - -template <typename TypePtr> -TypePtr typical (TokenPtr a) -{ - typedef - typename TypePtr::Type - Type; - - return TypePtr(add_ref(dynamic_cast<Type*>(a.in ()))); -}; - -#endif // TOKEN_HPP diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/TokenStream.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/TokenStream.hpp deleted file mode 100644 index a157cfeb71b..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/TokenStream.hpp +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef TOKEN_STREAM_HPP -#define TOKEN_STREAM_HPP - -#include <string> -#include <istream> - -namespace CCF -{ - template <typename Token> - class TokenStream - { - public: - virtual Token - next () = 0; - }; - - - template <> - class TokenStream<char> - { - public: - typedef std::char_traits<char> traits; - - typedef traits::int_type int_type; - typedef traits::char_type char_type; - - public: - virtual int_type - next () = 0; - - char_type - to_char_type (int_type i) - { - return traits::to_char_type (i); - } - - bool - eos (int_type i) - { - return i == traits::eof (); - } - }; - - class InputStreamAdapter : public TokenStream<char> - { - public: - InputStreamAdapter (std::istream& is) - : is_ (is) - { - } - - public: - - virtual int_type - next () - { - return is_.get (); - } - - private: - std::istream& is_; - }; -} - -#endif //TOKEN_STREAM_HPP diff --git a/TAO/CIAO/CCF/CCF/CompilerElements/Traversal.hpp b/TAO/CIAO/CCF/CCF/CompilerElements/Traversal.hpp deleted file mode 100644 index 86066ee7a63..00000000000 --- a/TAO/CIAO/CCF/CCF/CompilerElements/Traversal.hpp +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef TRAVERSAL_HPP -#define TRAVERSAL_HPP - -#include "MSVC_Pragmas.hpp" - -namespace CCF -{ - namespace Traversal - { - struct Visitor - { - virtual - ~Visitor () /*@@= 0*/ {} - }; - - - template <typename VisitorType> - bool - try_visit ( - void (VisitorType::*visit_func)(typename VisitorType::NodePtr const&), - Visitor* v, - typename VisitorType::NodePtr const& n) - { - VisitorType* vt = dynamic_cast<VisitorType*> (v); - if(vt != 0) - { - (vt->*visit_func)(n); - return true; - } - else - { - return false; - } - } - } -} - -#endif // TRAVERSAL_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2.cpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2.cpp deleted file mode 100644 index cfa1da318d3..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2.cpp +++ /dev/null @@ -1 +0,0 @@ -// $Id$ diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2.vcproj b/TAO/CIAO/CCF/CCF/IDL2/IDL2.vcproj deleted file mode 100644 index ea6de026267..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2.vcproj +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="IDL2" - ProjectGUID="{BC4A74B6-EBE7-486D-A537-B4217AE7304E}" - Keyword="Win32Proj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(ProjectDir)" - IntermediateDirectory="Debug" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../..;../../External/Utility" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" - MinimalRebuild="TRUE" - BasicRuntimeChecks="3" - RuntimeLibrary="5" - ForceConformanceInForLoopScope="TRUE" - RuntimeTypeInfo="TRUE" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/IDL2.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - RuntimeLibrary="4" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/IDL2.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> - <File - RelativePath=".\IDL2_LexicalAnalyzer.cpp"> - </File> - <File - RelativePath=".\IDL2_SyntaxTree.cpp"> - </File> - <File - RelativePath=".\IDL2_SyntaxTree_BuiltIn.cpp"> - </File> - <File - RelativePath=".\IDL2_Traversal.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> - <File - RelativePath=".\IDL2_LexicalAnalyzer.hpp"> - </File> - <File - RelativePath=".\IDL2_Parser.hpp"> - </File> - <File - RelativePath=".\IDL2_SemanticAction.hpp"> - </File> - <File - RelativePath=".\IDL2_SemanticActionImpl.hpp"> - </File> - <File - RelativePath=".\IDL2_SyntaxTree.hpp"> - </File> - <File - RelativePath=".\IDL2_SyntaxTree_BuiltIn.hpp"> - </File> - <File - RelativePath=".\IDL2_SyntaxTree_Value.hpp"> - </File> - <File - RelativePath=".\IDL2_SyntaxTreeFwd.hpp"> - </File> - <File - RelativePath=".\IDL2_Traversal.hpp"> - </File> - <File - RelativePath=".\MSVC_Pragmas.hpp"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_LexicalAnalyzer.cpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_LexicalAnalyzer.cpp deleted file mode 100644 index a3a028d2493..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_LexicalAnalyzer.cpp +++ /dev/null @@ -1,377 +0,0 @@ -// $Id$ -#include "IDL2_LexicalAnalyzer.hpp" - -#include <iostream> - -namespace IDL2 -{ - LexicalAnalyzer:: - LexicalAnalyzer (CCF::TokenStream<char>& is) - : loc_ ("C"), - is_ (is), - after_nl (true), - line_ (0), - - eos (new EndOfStream), - - abstract (new Keyword), - attribute (new Keyword), - factory (new Keyword), - in (new Keyword), - include (new Keyword), - inout (new Keyword), - interface (new Keyword), - local (new Keyword), - module (new Keyword), - out (new Keyword), - sinclude (new Keyword), - supports (new Keyword), - - colon (new Punctuation), - comma (new Punctuation), - lbrace (new Punctuation), - rbrace (new Punctuation), - lparen (new Punctuation), - rparen (new Punctuation), - semi (new Punctuation) - { - keyword_table_["abstract" ] = abstract; - keyword_table_["attribute"] = attribute; - keyword_table_["factory" ] = factory; - keyword_table_["in" ] = in; - keyword_table_["include" ] = include; - keyword_table_["inout" ] = inout; - keyword_table_["interface"] = interface; - keyword_table_["local" ] = local; - keyword_table_["module" ] = module; - keyword_table_["out" ] = out; - keyword_table_["sinclude" ] = sinclude; - keyword_table_["supports" ] = supports; - - punctuation_table_[":"] = colon; - punctuation_table_[","] = comma; - punctuation_table_["{"] = lbrace; - punctuation_table_["}"] = rbrace; - punctuation_table_["("] = lparen; - punctuation_table_[")"] = rparen; - punctuation_table_[";"] = semi; - } - - - LexicalAnalyzer::int_type LexicalAnalyzer:: - get () - { - int_type i; - - if (buffer_.empty ()) - { - i = is_.next (); - } - else - { - i = buffer_.front (); - buffer_.pop_front (); - } - - if (after_nl) - { - after_nl = false; - line_++; - } - - if (i == '\n') - { - after_nl = true; - } - - return i; - } - - LexicalAnalyzer::int_type LexicalAnalyzer:: - peek () - { - int_type i; - - if (buffer_.empty ()) - { - i = is_.next (); - buffer_.push_back (i); - } - else - { - i = buffer_.front (); - } - - return i; - } - - LexicalAnalyzer::int_type LexicalAnalyzer:: - peek_more () - { - int_type i; - - if (buffer_.size () < 2) - { - i = is_.next (); - buffer_.push_back (i); - } - else - { - i = buffer_.at (1); - } - - return i; - } - - LexicalAnalyzer::char_type LexicalAnalyzer:: - to_char_type (int_type i) - { - return is_.to_char_type (i); - } - - - TokenPtr LexicalAnalyzer:: - next () - { - while (true) - { - int_type i = get (); - - if (is_.eos(i)) return eos; - - char_type c = to_char_type (i); - - // Handling spaces - if (std::isspace (c, loc_)) continue; - - // Handling C++ comments - if (c == '/' && peek () == '/') - { - cxx_comment (c); - continue; - } - - // Handling C comments - if (c == '/' && peek () == '*') - { - c_comment (c); - continue; - } - - if (std::isalpha (c, loc_) || c == '_' || (c == ':' && peek () == ':')) - { - return identifier (c); - } - - TokenPtr token; - - if (string_literal (c, token)) return token; - - if (punctuation (c, token)) return token; - - - std::cerr << line_ << ": error: unable to derive any token from \'" - << c << "\'" << std::endl; - - //@@ I should return something special here. - return eos; - } - } - - void LexicalAnalyzer:: - cxx_comment (char_type c) - { - while (c != '\n') - { - int_type i = get (); - - if (is_.eos (i)) - { - std::cerr << "warning: no new line at the end of file" << std::endl; - //@@ I wonder if it's ok to call get () again after getting eof. - break; - } - c = to_char_type (i); - } - } - - void LexicalAnalyzer:: - c_comment (char_type c) - { - get (); // get '*' - - do - { - int_type i = get (); - - if (is_.eos (i)) - { - std::cerr << "error: end of file before C-style comment finished" - << std::endl; - return; - - //@@ I wonder if it's ok to call get () again after getting eof. - } - c = to_char_type (i); - - //std::cerr << "lexer: c_comment: read character \'" << c << "\'" - // << std::endl; - } - while (c != '*' || peek () != '/'); - - //std::cerr << "lexer: c_comment: finished C-comment \'" << c - // << "\',\'" << to_char_type (peek ()) - // << "\'" << std::endl; - - get (); // get '/' - } - - TokenPtr LexicalAnalyzer:: - identifier (char_type c) - { - std::string lexeme; - - enum - { - SIMPLE, - SCOPED, - OTHER - } type = SIMPLE; - - if (c == ':') - { - get (); - lexeme = "::"; - type = SCOPED; - } - else - { - lexeme += c; - } - - while (true) - { - int_type i = peek (); - - if (is_.eos (i)) - { - std::cerr << "warning: no new line at the end of file" << std::endl; - break; - } - - c = to_char_type (i); - - //std::cerr << "lexer::identifier: peeking on \'" << c - // << "\'; current lexeme \'" << lexeme << "\'" - // << std::endl; - - if (std::isalnum (c, loc_) || c == '_') - { - get (); - lexeme += c; - continue; - } - - if (c == ':' && peek_more () == ':') - { - get (); - get (); - lexeme += "::"; - if (type == SIMPLE) type = OTHER; - continue; - } - - break; - } - - //std::cerr << "lexer: found identifier with lexeme \'" - // << lexeme << "\'" << std::endl; - - switch (type) - { - case SIMPLE: - { - KeywordTable::const_iterator i = keyword_table_.find (lexeme); - - if (i == keyword_table_.end ()) - { - return TokenPtr (new SimpleIdentifier (lexeme, line_)); - } - else - { - return i->second; - } - } - case SCOPED: - { - return TokenPtr (new ScopedIdentifier (lexeme, line_)); - } - case OTHER: - { - return TokenPtr (new Identifier (lexeme, line_)); - } - //@@ without this line GCC issues warning and MSVC issues error - // Is it required by standard? - default: - { - throw InternalError (); - } - - } - } - - bool LexicalAnalyzer:: - punctuation (char_type c, TokenPtr& token) - { - PunctuationTable::const_iterator i = punctuation_table_.begin (); - - while (true) - { - for (;i != punctuation_table_.end () && i->first[0] != c; i++); - - if (i == punctuation_table_.end ()) return false; - - // if it's a two-character punctuation - if (i->first.size () == 2) - { - if (i->first[1] != peek ()) - { - // move on to the next candidate - i++; - continue; - } - } - - token = i->second; - return true; - } - } - - bool LexicalAnalyzer:: - string_literal (char_type c, TokenPtr& token) - { - if (c != '\"') return false; - - std::string lexeme; - - while (true) - { - int_type i = get (); - - if (is_.eos (i)) - { - std::cerr << "warning: end of file while reading string literal" - << std::endl; - break; - } - - c = to_char_type (i); - - if (c == '\"') break; - else lexeme += c; - } - - token = TokenPtr(new StringLiteral (lexeme, line_)); - return true; - } -} diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_LexicalAnalyzer.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_LexicalAnalyzer.hpp deleted file mode 100644 index 52d3bbfd7a3..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_LexicalAnalyzer.hpp +++ /dev/null @@ -1,129 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_LEXICAL_ANALYZER_HPP -#define CCF_IDL2_LEXICAL_ANALYZER_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CompilerElements/Token.hpp" -#include "CCF/CompilerElements/TokenStream.hpp" - -#include <map> -#include <deque> -#include <locale> -#include <cctype> -#include <string> -#include <istream> - -namespace IDL2 -{ - //@@ It seems to me that there should be a diagnistic information (file, - // line, start_pos, end_pos) supplied with each token. (Thus lexer - // will have to know about #include business. Or maybe not..?) - // - //@@ Would be nice to have a read-only symbol table (or at least keyword - // table). This way it would be easier to extend language (which from - // lexer's persective would ususally mean to add new keywords). - - class LexicalAnalyzer - { - //@@ fixme (should be at the end of class) - protected: - - typedef CCF::TokenStream<char>::int_type int_type; - typedef CCF::TokenStream<char>::char_type char_type; - typedef CCF::TokenStream<char>::traits traits; - - typedef - std::map<std::string, KeywordPtr> - KeywordTable; - - typedef - std::map<std::string, PunctuationPtr> - PunctuationTable; - - - std::locale loc_; - KeywordTable keyword_table_; - PunctuationTable punctuation_table_; - CCF::TokenStream<char>& is_; - - // look ahead mechanism - std::deque<int_type> buffer_; - - // line numbering mechanism - bool after_nl; - unsigned long line_; - - - public: - virtual - ~LexicalAnalyzer () throw () {} - - public: - class InternalError {}; - - EndOfStreamPtr eos; - - // Keywords (alphabetic order) - - KeywordPtr abstract; - KeywordPtr attribute; - KeywordPtr factory; - KeywordPtr in; - KeywordPtr include; - KeywordPtr inout; - KeywordPtr interface; - KeywordPtr local; - KeywordPtr module; - KeywordPtr out; - KeywordPtr sinclude; - KeywordPtr supports; - - // Punctuations (alphabetic group order) - - PunctuationPtr colon; - PunctuationPtr comma; - PunctuationPtr lbrace; - PunctuationPtr rbrace; - PunctuationPtr lparen; - PunctuationPtr rparen; - PunctuationPtr semi; - - public: - LexicalAnalyzer (CCF::TokenStream<char>& is); - - virtual TokenPtr - next (); - - protected: - - virtual int_type - get (); - - virtual int_type - peek (); - - virtual int_type - peek_more (); - - char_type - to_char_type (int_type i); - - virtual void - cxx_comment (char_type c); - - virtual void - c_comment (char_type c); - - virtual TokenPtr - identifier (char_type c); - - virtual bool - string_literal (char_type c, TokenPtr& token); - - virtual bool - punctuation (char_type c, TokenPtr& token); - }; -} - -#endif // CCF_IDL2_LEXICAL_ANALYZER_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_Parser.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_Parser.hpp deleted file mode 100644 index 1a258ca732a..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_Parser.hpp +++ /dev/null @@ -1,421 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_PARSER_HPP -#define CCF_IDL2_PARSER_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CompilerElements/Parser.hpp" -#include "CCF/IDL2/IDL2_LexicalAnalyzer.hpp" -#include "CCF/IDL2/IDL2_SemanticAction.hpp" - -//@@ tmp -#include <iostream> -using std::cerr; -using std::endl; - -namespace IDL2 -{ - class Parser : public virtual ::Parser - { - public: - virtual - ~Parser () throw () {} - - protected: - LexicalAnalyzer const& lexer_; - SemanticActionFactory& actions_; - - protected: - - // @@ this stinks - // Semanic action types - // - - typedef - SemanticAction::Include - Include; - - typedef - SemanticAction::Scope - Scope; - - typedef - SemanticAction::Module - Module; - - typedef - SemanticAction::Interface - Interface; - - typedef - SemanticAction::Attribute - Attribute; - - typedef - SemanticAction::Operation - Operation; - - protected: - - // - // Primitives - // - typedef - Details::KeywordParser - KeywordParser; - - typedef - Details::PunctuationParser - PunctuationParser; - - typedef - Details::IdentifierParser - IdentifierParser; - - typedef - Details::SimpleIdentifierParser - SimpleIdentifierParser; - - typedef - Details::StringLiteralParser - StringLiteralParser; - - // Keyword parsers (alphabetic order). - KeywordParser ABSTRACT; - KeywordParser ATTRIBUTE; - KeywordParser FACTORY; - KeywordParser IN; - KeywordParser INCLUDE; - KeywordParser INOUT; - KeywordParser INTERFACE; - KeywordParser LOCAL; - KeywordParser MODULE; - KeywordParser OUT; - KeywordParser SINCLUDE; - KeywordParser SUPPORTS; - - // Punctuation parsers (alphabetic group order). - PunctuationParser COLON; - PunctuationParser COMMA; - PunctuationParser LBRACE; - PunctuationParser RBRACE; - PunctuationParser LPAREN; - PunctuationParser RPAREN; - PunctuationParser SEMI; - - IdentifierParser identifier; - SimpleIdentifierParser simple_identifier; - StringLiteralParser string_literal; - - - // - // Language - // - - typedef - Details::Rule - Rule; - - Rule language; - Rule import; - Rule declaration; - Rule extension; - - Rule include_decl; - Rule system_include_decl; - - Rule module_decl; - - Rule interface_decl; - Rule interface_header; - Rule interface_inheritance_spec; - Rule interface_body; - - Rule attribute_decl; - - Rule direction_specifier; - - Rule operation_decl; - Rule operation_parameter_list; - Rule operation_parameter; - - public: - Parser (LexicalAnalyzer const& l, SemanticActionFactory& f) - : lexer_ (l), - actions_ (f), - - ABSTRACT (l.abstract), - ATTRIBUTE (l.attribute), - FACTORY (l.factory), - IN (l.in), - INCLUDE (l.include), - INOUT (l.inout), - INTERFACE (l.interface), - LOCAL (l.local), - MODULE (l.module), - OUT (l.out), - SINCLUDE (l.sinclude), - SUPPORTS (l.supports), - - COLON (l.colon), - COMMA (l.comma), - LBRACE (l.lbrace), - RBRACE (l.rbrace), - LPAREN (l.lparen), - RPAREN (l.rparen), - SEMI (l.semi), - - act_include_begin (f.include (), &Include::begin), - act_include_end (f.include (), &Include::end), - - act_module_begin (f.module (), &Module::begin), - act_module_open_scope (f.module (), &Scope::open_scope), - act_module_close_scope (f.module (), &Scope::close_scope), - act_module_end (f.module (), &Module::end), - - act_interface_begin (this, &Parser::act_interface_begin_core), - act_interface_inherits (f.interface (), &Interface::inherits), - act_interface_open_scope (f.interface (), &Scope::open_scope), - act_interface_close_scope (f.interface (), &Scope::close_scope), - act_interface_end (f.interface (), &Interface::end), - - act_attribute_type (f.attribute (), &Attribute::type), - act_attribute_name (f.attribute (), &Attribute::name), - - act_operation_begin (f.operation (), &Operation::begin), - act_operation_parameter (this, - &Parser::act_operation_parameter_core), - act_operation_end (f.operation (), &Operation::end) - - { - language = *import >> +declaration - ; - - import = - include_decl - | system_include_decl - ; - - include_decl = - INCLUDE - >> string_literal[act_include_begin] - >> SEMI[act_include_end] - ; - - system_include_decl = - SINCLUDE - >> string_literal - >> SEMI[act_include_end] - ; - - declaration = - interface_decl - | module_decl - | extension - ; - - module_decl = - MODULE - >> simple_identifier[act_module_begin] - >> LBRACE[act_module_open_scope] - >> +declaration - >> RBRACE[act_module_close_scope] - >> SEMI[act_module_end] - ; - - - // - // interface - // - interface_decl = - interface_header - >> - ( - SEMI[act_interface_end] - | - ( - !(COLON >> interface_inheritance_spec) - >> LBRACE[act_interface_open_scope] - >> interface_body - >> RBRACE[act_interface_close_scope] - >> SEMI[act_interface_end] - ) - ) - ; - - interface_header = - ( - !(LOCAL | ABSTRACT) - >> INTERFACE - >> simple_identifier - )[act_interface_begin] - ; - - - interface_inheritance_spec = - identifier[act_interface_inherits] - >> *(COMMA >> identifier[act_interface_inherits]) - ; - - interface_body = - *( - attribute_decl - | operation_decl - ) - ; - - // - // attribute - // - attribute_decl = - ATTRIBUTE - >> identifier[act_attribute_type] - >> simple_identifier[act_attribute_name] - >> SEMI - ; - - - // - // direction specifier - // - direction_specifier = - IN - | OUT - | INOUT - ; - - - // - // operation - // - operation_decl = - (identifier >> simple_identifier)[act_operation_begin] - >> LPAREN - >> operation_parameter_list - >> RPAREN - >> SEMI[act_operation_end] - ; - - operation_parameter_list = - *( - operation_parameter - >> *(COMMA >> operation_parameter) - ) - ; - - operation_parameter = - ( - direction_specifier - >> identifier - >> simple_identifier - )[act_operation_parameter] - ; - } - - virtual Rule const& - start() const - { - return language; - } - - protected: - - // - // Semantic actions - // - - typedef - NoArgAction<Scope> - ScopeAction; - - // - // Include - // - OneArgAction<StringLiteralPtr, Include> act_include_begin; - NoArgAction<Include> act_include_end; - - // - // Module - // - - OneArgAction<SimpleIdentifierPtr, Module> act_module_begin; - ScopeAction act_module_open_scope; - ScopeAction act_module_close_scope; - NoArgAction<Module> act_module_end; - - // - // Interface - // - void - act_interface_begin_core (Iterator begin, Iterator end) const - { - Interface::Qualifier::Value q = Interface::Qualifier::UNCONSTRAINED; - - if(end - begin == 3) - { - if(identical (lexer_.local, *begin)) - { - q = Interface::Qualifier::LOCAL; - } - else - { - q = Interface::Qualifier::ABSTRACT; - } - begin++; - } - - begin++; - - actions_.interface ().begin (q, typical<SimpleIdentifierPtr>(*begin)); - } - ActionExecutor<Parser> act_interface_begin; - - OneArgAction<IdentifierPtr, Interface> act_interface_inherits; - - ScopeAction act_interface_open_scope; - ScopeAction act_interface_close_scope; - - NoArgAction<Interface> act_interface_end; - - // - // Attribute - // - OneArgAction<IdentifierPtr, Attribute> act_attribute_type; - OneArgAction<SimpleIdentifierPtr, Attribute> act_attribute_name; - - // - // Operation - // - TwoArgAction<IdentifierPtr, - SimpleIdentifierPtr, - Operation> act_operation_begin; - - void - act_operation_parameter_core (Iterator begin, Iterator end) const - { - Operation::Direction::Value d = Operation::Direction::INOUT; - - if(identical (lexer_.in, *begin)) - { - d = Operation::Direction::IN; - } - else if(identical (lexer_.out, *begin)) - { - d = Operation::Direction::OUT; - } - begin++; - - actions_.operation ().parameter ( - d, - typical<IdentifierPtr>(*begin), - typical<SimpleIdentifierPtr>(*(begin + 1))); - } - ActionExecutor<Parser> act_operation_parameter; - - NoArgAction<Operation> act_operation_end; - - - }; -} - -#endif // CCF_IDL2_PARSER_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SemanticAction.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SemanticAction.hpp deleted file mode 100644 index 3fb04f4c8dc..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SemanticAction.hpp +++ /dev/null @@ -1,163 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_SEMANTIC_ACTION_HPP -#define CCF_IDL2_SEMANTIC_ACTION_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CompilerElements/Token.hpp" -#include "CCF/CompilerElements/SemanticAction.hpp" - -namespace IDL2 -{ - namespace SemanticAction - { - using ::SemanticAction::Base; - - class Include : public virtual Base - { - public: - virtual - ~Include () throw () {} - - virtual void - begin (StringLiteralPtr const& sl) = 0; - - virtual void - end () = 0; - }; - - class Scope : public virtual Base - { - public: - virtual - ~Scope () throw () {} - - virtual void - open_scope () = 0; - - virtual void - close_scope () = 0; - }; - - class Module : public virtual Scope - { - public: - virtual - ~Module () throw () {} - - virtual void - begin (SimpleIdentifierPtr const& id) = 0; - - virtual void - end () = 0; - }; - - class Interface : public virtual Scope - { - public: - virtual - ~Interface () throw () {} - - struct Qualifier - { - enum Value - { - LOCAL, - ABSTRACT, - UNCONSTRAINED, - }; - - friend std::ostream& - operator<< (std::ostream& o, Value d) - { - if (d == LOCAL) o << "local"; - else if (d == ABSTRACT) o << "abstract"; - else o << "unconstrained"; - return o; - } - }; - - virtual void - begin (Qualifier::Value qualifier, SimpleIdentifierPtr const& id) = 0; - - virtual void - inherits (IdentifierPtr const& id) = 0; - - virtual void - end () = 0; - }; - - class Attribute - { - public: - virtual - ~Attribute () throw () {} - - virtual void - type (IdentifierPtr const& id) = 0; - - virtual void - name (SimpleIdentifierPtr const& id) = 0; - }; - - class Operation - { - public: - - virtual void - begin (IdentifierPtr const& type_id, - SimpleIdentifierPtr const& name_id) = 0; - - struct Direction - { - enum Value - { - IN, - OUT, - INOUT - }; - - friend std::ostream& - operator<< (std::ostream& o, Value d) - { - if (d == IN) o << "in"; - else if (d == OUT) o << "out"; - else o << "inout"; - return o; - } - }; - - virtual void - parameter (Direction::Value direction, - IdentifierPtr const& type_id, - SimpleIdentifierPtr const& name_id) = 0; - - virtual void - end () = 0; - }; - } - - class SemanticActionFactory - { - public: - virtual - ~SemanticActionFactory () throw () {} - - virtual SemanticAction::Include& - include () = 0; - - virtual SemanticAction::Module& - module () = 0; - - virtual SemanticAction::Interface& - interface () = 0; - - virtual SemanticAction::Attribute& - attribute () = 0; - - virtual SemanticAction::Operation& - operation () = 0; - }; -} - -#endif // CCF_IDL2_SEMANTIC_ACTION_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SemanticActionImpl.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SemanticActionImpl.hpp deleted file mode 100644 index 2169acbcddd..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SemanticActionImpl.hpp +++ /dev/null @@ -1,742 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_SEMANTIC_ACTION_IMPL_HPP -#define CCF_IDL2_SEMANTIC_ACTION_IMPL_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_SemanticAction.hpp" -#include "CCF/IDL2/IDL2_SyntaxTree.hpp" -#include "CCF/IDL2/IDL2_SyntaxTree_BuiltIn.hpp" - -#include <stack> - -// needed for include handling -#include <fstream> - -//@@tmp -#include <iostream> -using std::cerr; -using std::endl; - -namespace IDL2 -{ - namespace SemanticAction - { - namespace Impl - { - - /* - Design notes: - - (1) I am using stack-based approach to handle cases like this: - - struct A - { - struct B - { - struct C - { - ... - } c; - } b; - }; - - Even though you can't write the same let's say for interface - I am still using stack approach for consistency and possible - meta-coding. - - */ - - using ReferenceCounting::strict_cast; - - // - // - // - template <typename NodeTypePtr> - class ScopeBase : public virtual SemanticAction::Scope - { - protected: - virtual - ~ScopeBase () throw () {} - - ScopeBase (SyntaxTree::ScopePtr& scope) - : scope_ (scope) - { - } - - protected: - void - push (NodeTypePtr const& t) - { - stack_.push (t); - } - - void - pop () - { - stack_.pop (); - } - - NodeTypePtr& - top () - { - return stack_.top (); - } - - protected: - SyntaxTree::ScopePtr& scope_; - std::stack<NodeTypePtr> stack_; - }; - - - // - // - // - class Include : public virtual SemanticAction::Include - { - public: - virtual - ~Include () throw () {} - - Include (SemanticActionFactory& action_factory, - SyntaxTree::TranslationRegionPtr const& region, - SyntaxTree::ScopePtr& scope) - : action_factory_ (action_factory), - scope_ (scope) - { - stack_.push (region); - } - - virtual void - begin (StringLiteralPtr const& sl) - { - cerr << "include \"" << sl << "\"" << endl; - - /* - @@ this code is experimentla and temporarlily disabled - using namespace SyntaxTree; - - std::ifstream ifs (sl->value ().c_str ()); - if (!ifs.is_open ()) - { - cerr << "error: unable to open included file \'" - << sl << "\'" << endl; - } - - TranslationRegionPtr r ( - new TranslationRegion (sl->value (), - stack_.top ()->table (), - stack_.top ()->create_order ())); - - stack_.top ()->insert (r); - stack_.push (r); - - scope_ = stack_.top ()->scope (); - - //@@ this code is highly experimental - IDL2::LexicalAnalyzer lexer (ifs); - - TokenStream token_stream; - - //@@ bad token comparison - for (TokenPtr token = lexer.next (); - token.in () != lexer.eos.in (); - token = lexer.next ()) - { - token_stream.push_back (token); - } - - if (token_stream.size () == 0) - { - // Empty file - return; - } - - IDL2::Parser parser (lexer, action_factory_); - - bool result = Details::parse (token_stream.begin (), - token_stream.end (), - parser.start ()); - */ - } - - virtual void - end () - { - cerr << "end" << endl; - - stack_.pop (); - scope_ = stack_.top ()->scope (); - } - - public: - SemanticActionFactory& action_factory_; - SyntaxTree::ScopePtr& scope_; - std::stack<SyntaxTree::TranslationRegionPtr> stack_; - }; - - // - // - // - class Module : public virtual SemanticAction::Module, - public virtual ScopeBase<SyntaxTree::ModulePtr> - { - public: - virtual - ~Module () throw () {} - - - Module (SyntaxTree::ScopePtr& scope) - : ScopeBase<SyntaxTree::ModulePtr> (scope) - { - } - - virtual void - begin (SimpleIdentifierPtr const& id) - { - cerr << "module " << id << endl; - - using namespace SyntaxTree; - - SimpleName name (id->value ()); - - ModulePtr m (new SyntaxTree::Module (name, scope_)); - - scope_->insert (m); - push (m); - } - - virtual void - open_scope () - { - scope_ = top (); - } - - virtual void - close_scope () - { - scope_ = scope_->scope (); - } - - virtual void - end () - { - pop (); - cerr << "end" << endl; - } - }; - - - // - // - // - class Interface : public virtual SemanticAction::Interface, - public virtual ScopeBase<SyntaxTree::InterfaceDeclPtr> - { - public: - virtual - ~Interface () throw () {} - - Interface (SyntaxTree::ScopePtr& scope) - : ScopeBase<SyntaxTree::InterfaceDeclPtr> (scope), - name_ ("") - { - } - - virtual void - begin (Qualifier::Value qualifier, SimpleIdentifierPtr const& id) - { - cerr << qualifier << " interface " << id << endl; - - qualifier_ = qualifier; - name_ = SyntaxTree::SimpleName (id->value ()); - } - - virtual void - inherits (IdentifierPtr const& id) - { - using namespace SyntaxTree; - - cerr << " inherits: " << id << endl; - - Name name (id->value ()); - - struct InheritancePredicate : - public DeclarationTable::ResolvePredicate - { - InheritancePredicate (Qualifier::Value q) : q_ (q) {} - - struct IncompatibleType : - public DeclarationTable::ResolutionFailure - { - IncompatibleType (std::string const& t) : type (t) {} - std::string type; - }; - - virtual bool - test (DeclarationPtr const& d) throw (IncompatibleType) - { - std::string type = d->declaration_type (); - - bool passed = false; - - switch (q_) - { - case Qualifier::UNCONSTRAINED: - { - if (type == "unconstrained interface" || - type == "abstract interface") passed = true; - break; - } - case Qualifier::LOCAL: - { - if (type == "unconstrained interface" || - type == "abstract interface" || - type == "local interface") passed = true; - break; - } - case Qualifier::ABSTRACT: - { - if (type == "abstract interface") passed = true; - break; - } - } - - if (!passed) throw IncompatibleType (type); - - return strict_cast<TypeDecl> (d)->defined (); - } - - private: - Qualifier::Value q_; - } p (qualifier_); - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - if (inherits_.insert (sn).second == false) - { - cerr << "error: invalid inheritance specification" << endl; - cerr << "directly inheriting from interface \'" - << sn << "\' more than once is illegal" << endl; - } - } - catch (InheritancePredicate::IncompatibleType const& e) - { - cerr << "error: invalid inheritance specification" << endl; - - cerr << "inheritance of "; - - switch (qualifier_) - { - case Qualifier::UNCONSTRAINED: - { - cerr << "unconstrained "; - break; - } - case Qualifier::LOCAL: - { - cerr << "local "; - break; - } - case Qualifier::ABSTRACT: - { - cerr << "abstract "; - break; - } - } - - cerr << "interface \'" << name_ <<"\' from " - << e.type << " \'" << name << "\' is illegal" << endl; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid inheritance specification" << endl; - cerr << "no interface with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid inheritance specification" << endl; - cerr << "no defined interface with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - cerr << "inheritance from forward-declared interface is illegal" - << endl; - } - } - - virtual void - open_scope () - { - using namespace SyntaxTree; - - InterfaceDefPtr def; - - switch (qualifier_) - { - case Qualifier::UNCONSTRAINED: - { - def = new UnconstrainedInterfaceDef (name_, scope_, inherits_); - break; - } - case Qualifier::LOCAL: - { - def = new LocalInterfaceDef (name_, scope_, inherits_); - break; - } - case Qualifier::ABSTRACT: - { - def = new AbstractInterfaceDef (name_, scope_, inherits_); - break; - } - } - - scope_->insert (def); - push (def); - scope_ = def; - - name_ = SimpleName (""); //indicate that we are done - inherits_.clear (); - } - - virtual void - close_scope () - { - scope_ = scope_->scope (); - } - - virtual void - end () - { - using namespace SyntaxTree; - - cerr << "end" << endl; - - if (name_ != SimpleName ("")) - { - InterfaceDeclPtr decl; - - switch (qualifier_) - { - case Qualifier::UNCONSTRAINED: - { - decl = new UnconstrainedInterfaceForwardDecl (name_, scope_); - break; - } - case Qualifier::LOCAL: - { - decl = new LocalInterfaceForwardDecl (name_, scope_); - break; - } - case Qualifier::ABSTRACT: - { - decl = new AbstractInterfaceForwardDecl (name_, scope_); - break; - } - } - - scope_->insert (decl); - } - else - { - pop (); - } - } - private: - Qualifier::Value qualifier_; - SyntaxTree::SimpleName name_; - SyntaxTree::ScopedNameSet inherits_; - }; - - - class Attribute : public virtual SemanticAction::Attribute - { - public: - virtual - ~Attribute () throw () {} - - Attribute (SyntaxTree::ScopePtr& current) - : scope_ (current), - type_ ("") - { - } - - public: - virtual void - type (IdentifierPtr const& id) - { - cerr << "attribute " << id; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct Predicate : public DeclarationTable::ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw () - { - //@@ need extension to declaration type system - // e.g. something like this: - // "long;built-in type def;type def;type decl;declaration" - return strict_cast<TypeDecl> (d) != 0; - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - type_ = sn; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid attribute declaration" << endl; - cerr << "no type with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid attribute declaration" << endl; - cerr << "declaration with name \'" << name - << "\' visible from scope \'" << scope_->name () - << "\' is not a type declaration" << endl; - cerr << "using non-type as an attribute type is illegal" - << endl; - } - - } - - virtual void - name (SimpleIdentifierPtr const& id) - { - cerr << " " << id << endl; - - using namespace SyntaxTree; - SimpleName name (id->value ()); - - AttributeDeclPtr a ( - new SyntaxTree::AttributeDecl (name, type_, scope_)); - - scope_->insert (a); - - type_ = ScopedName (""); - } - - private: - SyntaxTree::ScopePtr& scope_; - SyntaxTree::ScopedName type_; - }; - - - // - // - // - class Operation : public virtual SemanticAction::Operation - { - public: - - virtual - ~Operation () throw () {} - - Operation (SyntaxTree::ScopePtr& current) - : scope_ (current) - { - } - - bool - lookup_type (SyntaxTree::Name const& name, - SyntaxTree::ScopedName& result) - { - using namespace SyntaxTree; - - struct Predicate : public DeclarationTable::ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw () - { - return strict_cast<TypeDecl> (d) != 0; - } - } p; - - try - { - result = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - return true; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid operation declaration" << endl; - cerr << "no type with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid operation declaration" << endl; - cerr << "declaration with name \'" << name - << "\' visible from scope \'" << scope_->name () - << "\' is not a type declaration" << endl; - cerr << "using non-type as operation parameter type " - << " or return type is illegal" - << endl; - } - - return false; - } - - - virtual void - begin (IdentifierPtr const& type_id, - SimpleIdentifierPtr const& name_id) - { - cerr << "operation " << type_id << " " << name_id << endl; - - using namespace SyntaxTree; - - //@@ Why don't I have a default c-tor? - ScopedName type_name (""); - - if (lookup_type (Name (type_id->value ()), type_name)) - { - operation_ = OperationDeclPtr ( - new OperationDecl (SimpleName (name_id->value ()), - type_name, - scope_)); - } - } - - - virtual void - parameter (Direction::Value direction, - IdentifierPtr const& type_id, - SimpleIdentifierPtr const& name_id) - { - cerr << "parameter " - << direction << " " << type_id << " " << name_id << endl; - - using namespace SyntaxTree; - - ScopedName type_name (""); - - if (lookup_type (Name (type_id->value ()), type_name) && - operation_ != 0) - { - OperationParameter::Direction::Value d = - OperationParameter::Direction::INOUT; - - if (direction == Direction::IN) - { - d = OperationParameter::Direction::IN; - } - else if (direction == Direction::OUT) - { - d = OperationParameter::Direction::OUT; - } - - OperationParameterPtr p ( - new OperationParameter (d, - type_name, - SimpleName (name_id->value ()), - scope_->table ())); - operation_->insert (p); - } - } - - virtual void - end () - { - cerr << "end" << endl; - if (operation_ != 0) - { - scope_->insert (operation_); - operation_ = SyntaxTree::OperationDeclPtr (); - } - } - private: - SyntaxTree::ScopePtr& scope_; - SyntaxTree::OperationDeclPtr operation_; - }; - } - } - - // - // - // - class SemanticActionFactoryImpl : public virtual SemanticActionFactory - { - public: - virtual - ~SemanticActionFactoryImpl () throw () {} - - SemanticActionFactoryImpl (SyntaxTree::TranslationRegionPtr const& r) - : scope_ (r->scope ()), - - include_ (*this, r, scope_), - module_ (scope_), - interface_ (scope_), - attribute_ (scope_), - operation_ (scope_) - { - } - - virtual SemanticAction::Include& - include () - { - return include_; - } - - virtual SemanticAction::Module& - module () - { - return module_; - } - - virtual SemanticAction::Interface& - interface () - { - return interface_; - } - - virtual SemanticAction::Attribute& - attribute () - { - return attribute_; - } - - virtual SemanticAction::Operation& - operation () - { - return operation_; - } - - protected: - SyntaxTree::ScopePtr scope_; - SyntaxTree::TranslationRegionPtr region_; - - SemanticAction::Impl::Include include_; - SemanticAction::Impl::Module module_; - SemanticAction::Impl::Interface interface_; - SemanticAction::Impl::Attribute attribute_; - SemanticAction::Impl::Operation operation_; - }; -} - -#endif // CCF_IDL2_SEMANTIC_ACTION_IMPL_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.cpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.cpp deleted file mode 100644 index 2292853d7da..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.cpp +++ /dev/null @@ -1,773 +0,0 @@ -// $Id$ -#include "IDL2_Traversal.hpp" -#include "IDL2_SyntaxTree.hpp" - -//@@tmp -#include <iostream> -using std::cerr; -using std::endl; - -namespace IDL2 -{ - namespace SyntaxTree - { - using ReferenceCounting::add_ref; - - using CCF::Traversal::try_visit; - - namespace - { - bool - try_visit_scope (CCF::Traversal::Visitor* v, - ScopePtr const& node) - { - return try_visit<Traversal::Scope> (&Traversal::Scope::visit_scope, v, node); - } - - bool - try_visit_type_decl (CCF::Traversal::Visitor* v, - TypeDeclPtr const& node) - { - return try_visit<Traversal::TypeDecl> (&Traversal::TypeDecl::visit_type_decl, v, node); - } - - bool - try_visit_type_def (CCF::Traversal::Visitor* v, - TypeDefPtr const& node) - { - return try_visit<Traversal::TypeDef> (&Traversal::TypeDef::visit_type_def, v, node); - } - - bool - try_visit_interface_decl (CCF::Traversal::Visitor* v, - InterfaceDeclPtr const& node) - { - return try_visit<Traversal::InterfaceDecl> (&Traversal::InterfaceDecl::visit_interface_decl, - v, - node); - } - - bool - try_visit_interface_def (CCF::Traversal::Visitor* v, - InterfaceDefPtr const& node) - { - return try_visit<Traversal::InterfaceDef> ( - &Traversal::InterfaceDef::visit_interface_def, - v, - node); - } - - bool - try_visit_abstract_interface_decl ( - CCF::Traversal::Visitor* v, - AbstractInterfaceDeclPtr const& node) - { - return try_visit<Traversal::AbstractInterfaceDecl> ( - &Traversal::AbstractInterfaceDecl::visit_abstract_interface_decl, - v, - node); - } - - bool - try_visit_local_interface_decl ( - CCF::Traversal::Visitor* v, - LocalInterfaceDeclPtr const& node) - { - return try_visit<Traversal::LocalInterfaceDecl> ( - &Traversal::LocalInterfaceDecl::visit_local_interface_decl, - v, - node); - } - - bool - try_visit_unconstrained_interface_decl ( - CCF::Traversal::Visitor* v, - UnconstrainedInterfaceDeclPtr const& node) - { - return try_visit<Traversal::UnconstrainedInterfaceDecl> ( - &Traversal::UnconstrainedInterfaceDecl:: - visit_unconstrained_interface_decl, - v, - node); - } - } - - // - // Comma - // - void Comma:: - accept (CCF::Traversal::Visitor* v) - { - CommaPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::Comma> (&Traversal::Comma::visit_comma, v, self); - } - - - // - // Declaration - // - Declaration:: - Declaration (SimpleName const& name, ScopePtr const& scope) - : order_ (scope->create_order ()), - name_ (scope->name (), name), - scope_ (scope->table (), - scope->name (), - scope->order ()) // Hint: scope->scope () may throw - { - } - - Declaration:: - Declaration (ScopedName const& name, - Order const& order, - DeclarationTable const& table) - : order_ (order), - name_ (name), - scope_ (table) // this stuff is faked - { - } - - ScopedName Declaration:: - name () const - { - return name_; - } - - Order Declaration:: - order () const - { - return order_; - } - - ScopePtr Declaration:: - scope () const throw (NotInScope) - { - return scope_.resolve (); - } - - // - // DeclarationTable - // - - void DeclarationTable:: - insert (DeclarationPtr d) throw (InvalidArgument, - AlreadyExist, - TypeMismatch) - { - if (d == 0) throw InvalidArgument (); - - IteratorPair pair = lookup (d->name ()); - - if (pair.first != pair.second) - { - // I have some declarations with this name already - if ((*pair.first)->declaration_type () != d->declaration_type ()) - { - throw TypeMismatch (); - } - } - - std::pair<DeclarationSet::iterator, bool> result = - decl_set_.insert (d); - - if (result.second == false) throw AlreadyExist (); - - try - { - if(name_decl_map_[d->name ()].insert (d).second == false) - { - throw AlreadyExist (); - } - } - catch (...) - { - // Leaving table in consistent state - decl_set_.erase (result.first); - throw; - } - } - - DeclarationTable::IteratorPair DeclarationTable:: - lookup (ScopedName const& n) const - { - NameDeclarationMap::const_iterator i = name_decl_map_.find (n); - if (i == name_decl_map_.end ()) - { - return IteratorPair (decl_set_.end (), decl_set_.end ()); - } - else - { - return IteratorPair (i->second.begin (), i->second.end ()); - } - } - - DeclarationTable::Iterator DeclarationTable:: - begin () const - { - return decl_set_.begin (); - } - - DeclarationTable::Iterator DeclarationTable:: - end () const - { - return decl_set_.end (); - } - - ScopedName DeclarationTable:: - resolve (Name const& name, - ScopedName const& from, - Order const& before, - ResolvePredicate& p) const throw (ResolutionFailure) - { - ScopedName result (""); - - // Check if name is already scoped - try - { - result = ScopedName (name); - } - catch (ScopedName::InvalidArgument const&) - { - //seems not - try - { - for (ScopedName base = from;;base = base.scope ()) - { - result = ScopedName (base, name); - - //cerr << "*** resolve: considering: " << result << endl; - - IteratorPair pair = lookup (result); - - if (pair.first != pair.second) - { - // Found something. Now checking the order. Note that the - // first element has the smallest order so it's sufficient - // to check just the first element for now. - if ((*pair.first)->order () < before) - { - break; - } - std::cerr << std::endl - << "before condition failed : " - << (*pair.first)->order () << " (" - << (*pair.first)->name () - << ") expected to be before " - << before << std::endl; - } - } - } - catch (ScopedName::AtRoot const&) - { - // didn't find anything - throw NameNotFound (); - } - } - - // Now check predicat - IteratorPair pair = lookup (result); - - if (pair.first == pair.second) throw NameNotFound (); - - for (;pair.first != pair.second; pair.first++) - { - // we should stay before - if (!((*pair.first)->order () < before)) break; - - if (p.test (*pair.first)) return result; - } - - throw PredicateNotMet (); - } - - // - // Scope - // - - void Scope:: - insert (DeclarationPtr d) throw (InvalidArgument, AlreadyExist) - { - if (d == 0) throw InvalidArgument (); - - std::pair<DeclarationSet::iterator, bool> result = - content_.insert (d); - - if (result.second == false) throw AlreadyExist (); - - try - { - try - { - table_.insert (d); - } - catch (...) - { - //Keep consistent state - content_.erase (result.first); - throw; - } - } - catch (DeclarationTable::InvalidArgument const&) - { - throw InvalidArgument (); - } - catch (DeclarationTable::AlreadyExist const&) - { - throw AlreadyExist (); - } - } - - Scope::Iterator Scope:: - begin () const - { - return content_.begin (); - } - - Scope::Iterator Scope:: - end () const - { - return content_.end (); - } - - Order Scope:: - create_order () - { - return Order (order (), next_order_++); - } - - Order Scope:: - peek_order () - { - return Order (order (), next_order_); - } - - void Scope:: - accept (CCF::Traversal::Visitor* v) - { - ScopePtr self (ReferenceCounting::add_ref (this)); - try_visit_scope (v, self); - } - - // - // TypeDecl - // - - void TypeDecl:: - accept (CCF::Traversal::Visitor* v) - { - TypeDeclPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::TypeDecl> (&Traversal::TypeDecl::visit_type_decl, v, self); - } - - - // - // TypeDef - // - - void TypeDef:: - accept (CCF::Traversal::Visitor* v) - { - TypeDefPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::TypeDef> ( - &Traversal::TypeDef::visit_type_def, - v, - self)) - { - TypeDecl::accept (v); - } - } - - // - // InterfaceDecl - // - - void InterfaceDecl:: - accept (CCF::Traversal::Visitor* v) - { - InterfaceDeclPtr self (ReferenceCounting::add_ref (this)); - - if (!try_visit_interface_decl (v, self)) - { - TypeDecl::accept (v); - } - } - - // - // InterfaceDef - // - - void InterfaceDef:: - accept (CCF::Traversal::Visitor* v) - { - InterfaceDefPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit_interface_def (v, self)) - { - InterfaceDecl::accept (v); - Scope::accept (v); - } - } - - - // - // AbstractInterfaceDecl - // - - void AbstractInterfaceDecl:: - accept (CCF::Traversal::Visitor* v) - { - AbstractInterfaceDeclPtr self (ReferenceCounting::add_ref (this)); - - if (!try_visit_abstract_interface_decl (v, self)) - { - InterfaceDecl::accept (v); - } - } - - // - // AbstractInterfaceDef - // - - void AbstractInterfaceDef:: - accept (CCF::Traversal::Visitor* v) - { - AbstractInterfaceDefPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::AbstractInterfaceDef> ( - &Traversal::AbstractInterfaceDef::visit_abstract_interface_def, - v, - self)) - { - AbstractInterfaceDecl::accept (v); - InterfaceDef::accept (v); - } - } - - // - // LocalInterfaceDecl - // - - void LocalInterfaceDecl:: - accept (CCF::Traversal::Visitor* v) - { - LocalInterfaceDeclPtr self (ReferenceCounting::add_ref (this)); - - if (!try_visit_local_interface_decl (v, self)) - { - InterfaceDecl::accept (v); - } - } - - - // - // LocalInterfaceDef - // - - void LocalInterfaceDef:: - accept (CCF::Traversal::Visitor* v) - { - LocalInterfaceDefPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::LocalInterfaceDef> ( - &Traversal::LocalInterfaceDef::visit_local_interface_def, - v, - self)) - { - bool b = try_visit_interface_def (v, self); - bool a = try_visit_local_interface_decl (v, self); - - // if (a && b) || a - if (a) return; - - if (b) - { - try_visit_type_def (v, self); - try_visit_scope (v, self); - } - else - { - try_visit_scope (v, self); - a = try_visit_type_def (v, self); - b = try_visit_interface_decl (v, self); - - if (a || b) return; - - try_visit_type_decl (v, self); - } - } - } - - // - // UnconstrainedInterfaceDecl - // - - void UnconstrainedInterfaceDecl:: - accept (CCF::Traversal::Visitor* v) - { - UnconstrainedInterfaceDeclPtr self (ReferenceCounting::add_ref (this)); - - if (!try_visit_unconstrained_interface_decl (v, self)) - { - InterfaceDecl::accept (v); - } - } - - - // - // UnconstrainedInterfaceDef - // - - void UnconstrainedInterfaceDef:: - accept (CCF::Traversal::Visitor* v) - { - UnconstrainedInterfaceDefPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::UnconstrainedInterfaceDef> ( - &Traversal::UnconstrainedInterfaceDef:: - visit_unconstrained_interface_def, - v, - self)) - { - bool b = try_visit_interface_def (v, self); - bool a = try_visit_unconstrained_interface_decl (v, self); - - // if (a && b) || a - if (a) return; - - if (b) - { - try_visit_type_def (v, self); - try_visit_scope (v, self); - } - else - { - try_visit_scope (v, self); - a = try_visit_type_def (v, self); - b = try_visit_interface_decl (v, self); - - if (a || b) return; - - try_visit_type_decl (v, self); - } - } - } - - // - // AttributeDecl - // - - void AttributeDecl:: - accept (CCF::Traversal::Visitor* v) - { - AttributeDeclPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::AttributeDecl> ( - &Traversal::AttributeDecl::visit_attribute_decl, - v, - self); - } - - // - // OperationParameter - // - void OperationParameter:: - accept (CCF::Traversal::Visitor* v) - { - OperationParameterPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::OperationParameter> (&Traversal::OperationParameter::visit_operation_parameter, - v, - self); - } - - - // - // OperationDecl - // - void OperationDecl:: - accept (CCF::Traversal::Visitor* v) - { - OperationDeclPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::OperationDecl> ( - &Traversal::OperationDecl::visit_operation_decl, - v, - self); - } - - - // - // Module - // - - void Module:: - accept (CCF::Traversal::Visitor* v) - { - ModulePtr self (ReferenceCounting::add_ref (this)); - - if (!try_visit<Traversal::Module> (&Traversal::Module::visit_module, - v, - self)) - { - Scope::accept (v); - } - } - - // - // FileScope - // - - FileScope:: - FileScope (DeclarationTable& table, Order const& order) - : Declaration (ScopedName (""), order, table), - Scope (table, ScopedName (""), order) - { - } - - void FileScope:: - accept (CCF::Traversal::Visitor* v) - { - FileScopePtr self (ReferenceCounting::add_ref (this)); - - if (!try_visit<Traversal::FileScope> ( - &Traversal::FileScope::visit_file_scope, - v, - self)) - { - Scope::accept (v); - } - } - - // - // TranslationRegion - // - - void TranslationRegion:: - insert (TranslationRegionPtr const& tr) throw (InvalidArgument) - { - if (tr == 0) throw InvalidArgument (); - - region_list_.push_back (tr); - } - - TranslationRegion::Iterator TranslationRegion:: - begin () const - { - return region_list_.begin (); - } - - TranslationRegion::Iterator TranslationRegion:: - end () const - { - return region_list_.end (); - } - - void TranslationRegion:: - accept (CCF::Traversal::Visitor* v) - { - TranslationRegionPtr self (ReferenceCounting::add_ref (this)); - - try_visit<Traversal::TranslationRegion> ( - &Traversal::TranslationRegion::visit_translation_region, - v, - self); - } - - // - // IncludeTranslationRegion - // - - void IncludeTranslationRegion:: - accept (CCF::Traversal::Visitor* v) - { - IncludeTranslationRegionPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::IncludeTranslationRegion>( - &Traversal::IncludeTranslationRegion:: - visit_include_translation_region, - v, - self)) TranslationRegion::accept (v); - } - - // - // SysIncludeTranslationRegion - // - - void SysIncludeTranslationRegion:: - accept (CCF::Traversal::Visitor* v) - { - SysIncludeTranslationRegionPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::SysIncludeTranslationRegion>( - &Traversal::SysIncludeTranslationRegion:: - visit_sys_include_translation_region, - v, - self)) TranslationRegion::accept (v); - } - - // - // ImpliedIncludeTranslationRegion - // - - void ImpliedIncludeTranslationRegion:: - accept (CCF::Traversal::Visitor* v) - { - ImpliedIncludeTranslationRegionPtr self ( - ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::ImpliedIncludeTranslationRegion>( - &Traversal::ImpliedIncludeTranslationRegion:: - visit_implied_include_translation_region, - v, - self)) TranslationRegion::accept (v); - } - - // - // PrincipalTranslationRegion - // - - void PrincipalTranslationRegion:: - accept (CCF::Traversal::Visitor* v) - { - PrincipalTranslationRegionPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::PrincipalTranslationRegion>( - &Traversal::PrincipalTranslationRegion:: - visit_principal_translation_region, - v, - self)) TranslationRegion::accept (v); - } - - // - // TranslationUnit - // - - void TranslationUnit:: - insert (TranslationRegionPtr const& tr) throw (InvalidArgument) - { - if (tr == 0) throw InvalidArgument (); - - region_list_.push_back (tr); - } - - TranslationUnit::Iterator TranslationUnit:: - begin () const - { - return region_list_.begin (); - } - - TranslationUnit::Iterator TranslationUnit:: - end () const - { - return region_list_.end (); - } - - void TranslationUnit:: - accept (CCF::Traversal::Visitor* v) - { - TranslationUnitPtr self (ReferenceCounting::add_ref (this)); - - try_visit<Traversal::TranslationUnit> ( - &Traversal::TranslationUnit::visit_translation_unit, - v, - self); - } - } -} diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.hpp deleted file mode 100644 index e6e656591ce..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.hpp +++ /dev/null @@ -1,2059 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_SYNTAX_TREE_HPP -#define CCF_IDL2_SYNTAX_TREE_HPP - -#include "MSVC_Pragmas.hpp" - -#include <vector> -#include <map> -#include <set> -#include <string> - -#include <iostream> - -#include "CCF/CompilerElements/FileSystem.hpp" -#include "CCF/CompilerElements/ReferenceCounting.hpp" - -#include "CCF/CompilerElements/Traversal.hpp" - -//@@ It doesn't seem that traversal mechanism has to be embeded -// into SyntaxTree anymore. - -namespace IDL2 -{ - namespace SyntaxTree - { - using ReferenceCounting::StrictPtr; - using ReferenceCounting::strict_cast; - - - // - // Can be scoped or simple. - // - class Name - { - public: - explicit - Name (std::string const& name) - : name_ (name) - { - } - - bool - operator< (Name const& other) const - { - return name_ < other.name_; - } - - bool - operator== (Name const& other) const - { - return name_ == other.name_; - } - - bool - operator!= (Name const& other) const - { - return name_ == other.name_; - } - - - - protected: - std::string name_; - - friend std::ostream& - operator << (std::ostream& o, Name const& name) - { - return o << name.name_; - } - - friend class ScopedName; - }; - - - // - // - // - class SimpleName : public Name - { - public: - explicit - SimpleName (std::string const& name) - : Name (name) - { - //@@ need some checking - } - - bool - operator< (SimpleName const& other) const - { - return name_ < other.name_; - } - - bool - operator== (SimpleName const& other) const - { - return name_ == other.name_; - } - - bool - operator!= (SimpleName const& other) const - { - return name_ != other.name_; - } - - private: - std::string - str () const - { - return name_; - } - - friend SimpleName - operator+ (SimpleName const& s1, std::string const& s2) - { - return SimpleName (s1.str () + s2); - } - - friend SimpleName - operator+ (std::string const& s1, SimpleName const& s2) - { - return SimpleName (s1 + s2.str ()); - } - }; - - // - // - // - class ScopedName : public Name - { - public: - class InconsistentState {}; - class InvalidArgument {}; - - public: - explicit - ScopedName (std::string const& name) throw (InvalidArgument) - : Name (name) - { - try - { - check_state (); - } - catch (InconsistentState const&) - { - throw InvalidArgument (); - } - } - - explicit - ScopedName (Name const& name) throw (InvalidArgument) - : Name (name) - { - try - { - check_state (); - } - catch (InconsistentState const&) - { - throw InvalidArgument (); - } - } - - ScopedName (ScopedName const& scope, Name const& name) - throw (InvalidArgument) - : Name (scope.name_ + "::" + name.name_) - { - try - { - check_state (); - } - catch (InconsistentState const&) - { - throw InvalidArgument (); - } - } - - bool - operator< (ScopedName const& other) const - { - return name_ < other.name_; - } - - bool - operator== (ScopedName const& other) const - { - return name_ == other.name_; - } - - bool - operator!= (ScopedName const& other) const - { - return name_ != other.name_; - } - - public: - SimpleName - simple () const - { - std::string::size_type pos = name_.rfind ("::"); - if (pos == std::string::npos) - { - if (name_.empty ()) return SimpleName(""); //file scope name - else throw InconsistentState (); - } - - return SimpleName(std::string (name_.begin () + pos + 2, - name_.end ())); - } - - class AtRoot {}; - - ScopedName - scope () const throw (AtRoot) - { - std::string::size_type pos = name_.rfind ("::"); - if (pos == std::string::npos) - { - throw AtRoot (); - } - - return ScopedName(std::string (name_.begin (), - name_.begin () + pos)); - } - - Name - in_file_scope () const - { - return Name(std::string (name_.begin () + 2, name_.end ())); - } - - - private: - void - check_state () throw (InconsistentState) - { - if (name_.empty ()) return; - - if (name_.length () < 2) throw InconsistentState (); - - if (name_[0] != ':' || name_[1] != ':') throw InconsistentState (); - - //scan the string - for (std::string::const_iterator i = name_.begin (); - i != name_.end (); - i++) - { - if (*i == ':') - { - if (i + 1 == name_.end () || *(i + 1) != ':') - { - throw InconsistentState (); - } - else - { - i++; //skip "::" - } - } - } - } - - }; - - typedef - std::vector<ScopedName> - ScopedNameList; - - typedef - std::set<ScopedName> - ScopedNameSet; - - // - // - // - class Order - { - public: - Order (Order const& parent, unsigned long index) - : list_ (parent.list_) - { - list_.push_back (index); - } - - explicit - Order (unsigned long index) - : list_ (1, index) - { - } - - public: - bool - operator == (Order const& other) const - { - return list_ == other.list_; - } - - bool - operator != (Order const& other) const - { - return list_ != other.list_; - } - - bool - operator < (Order const& other) const - { - Iterator i = list_.begin (); - Iterator j = other.list_.begin (); - for (; i != list_.end () && j != other.list_.end (); i++, j++) - { - if (*i > *j) - { - return false; - } - else if (*i < *j) - { - return true; - } - } - - if (j != other.list_.end ()) - { - // we are equal so far but other is longer which means it is after - return true; - } - else - { - return false; - } - } - - bool - suborder (Order const& subj) const - { - if (list_.size () >= subj.list_.size ()) return false; - - for (Iterator i = list_.begin (), j = subj.list_.begin (); - i != list_.end (); - i++, j++) - { - if (*i != *j) return false; - } - - return true; - } - - - private: - typedef - std::vector<unsigned long> - OrderList_; - - typedef - OrderList_::const_iterator - Iterator; - - OrderList_ list_; - - friend std::ostream& - operator << (std::ostream& o, Order const& order) - { - for (Order::OrderList_::const_iterator i = order.list_.begin (); - i != order.list_.end (); - i++) - { - if (i != order.list_.begin ()) o << ':'; - o << *i; - } - - return o; - } - }; - - - // - // - // - class Node; - typedef - StrictPtr<Node> - NodePtr; - - class Node : public virtual ReferenceCounting::DefaultImpl <> - { - protected: - virtual - ~Node () throw () {} - - // Dynamic typing - public: - - template <typename Type> - bool - is_a () - { - NodePtr self (ReferenceCounting::add_ref (this)); - return strict_cast<Type>(self) != 0; - } - - template <typename Type> - StrictPtr<Type> - dynamic_type () - { - NodePtr self (ReferenceCounting::add_ref (this)); - return strict_cast<Type>(self); - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v) = 0; - }; - - // - // - // - class Comma : public virtual Node - { - public: - virtual - ~Comma () throw () {} - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - typedef - StrictPtr<Comma> - CommaPtr; - - - // - // Contains scoped name & reference to DeclarationTable. - // Purpose: provides controlled way of cyclic dependencies - // - // Issues: - // - // @@ There is a need for 'uninitialized' state of refernce. - // - - class Declaration; - - typedef - StrictPtr<Declaration> - DeclarationPtr; - - class DeclarationTable; - - //@@ Better name for DeclarationRef: - // - DeclarationLink - // - template <typename T, typename Ptr = StrictPtr<T> > - class DeclarationRef - { - public: - class NotInitialized {}; - class DeclarationNotFound {}; - class TypeMismatch {}; - class TableMismatch {}; - - - public: - - DeclarationRef (DeclarationPtr decl); - DeclarationRef (DeclarationTable const& table, ScopedName const& name); - DeclarationRef (DeclarationTable const& table, - ScopedName const& name, - Order const& order); - - //This c-tor construct an uninitialized reference. - DeclarationRef (DeclarationTable const& table); - - // Note that you can only assign DeclarationRef's associated with - // the same DeclarationTable. - // - DeclarationRef& - operator= (DeclarationRef const& other) throw (TableMismatch) - { - if (&table_ != &(other.table_)) throw TableMismatch (); - - name_ = other.name_; - order_ = other.order_; - initialized_ = other.initialized_; - with_order__ = other.with_order_; - - return *this; - } - - operator bool () const - { - return initialized_; - } - - // Returns first declaration that matches. - Ptr - resolve () const - throw (NotInitialized, DeclarationNotFound, TypeMismatch); - - ScopedName - name () const throw (NotInitialized) - { - if (!initialized_) throw NotInitialized (); - return name_; - } - - private: - DeclarationTable const& table_; - ScopedName name_; - Order order_; - bool initialized_; - bool with_order_; - }; - - - // - // Declaration represents any IDL construct that has a scoped name - // - - class Scope; - - typedef - StrictPtr<Scope> - ScopePtr; - - class Declaration : public virtual Node - { - protected: - //@@ pure virtual d-tor with body doesn't work? - virtual - ~Declaration () throw () {} - - Declaration (SimpleName const& name, ScopePtr const& scope); - - // This c-tor is here for Declarations that are not in scope - // e.g. FileScope - Declaration (ScopedName const& name, - Order const& order, - DeclarationTable const& table); - - public: - - ScopedName - name () const; - - Order - order () const; - - class NotInScope {}; // don't cross the edge! ;-) - - virtual ScopePtr - scope () const throw (NotInScope); - - // Runtime declaration type information. I could have used RTTI but - // I will also need a human-readable representation (e.g. - // "local interface" instead of "IDL2::SyntaxTree::LocalInterface") - // for diagnistic. - public: - virtual std::string - declaration_type () - { - return "declaration"; - } - - private: - Order order_; - ScopedName name_; - DeclarationRef<Scope> scope_; - }; - - typedef - StrictPtr<Declaration> - DeclarationPtr; - - - // - // - // - template <typename T = DeclarationPtr> - struct DeclarationOrderComparator - { - bool operator () (T const& x, T const& y) const - { - return x->order () < y->order (); - } - }; - - template <typename T = DeclarationPtr> - struct DeclarationNameComparator - { - bool operator () (T const& x, T const& y) const - { - return x->name () < y->name (); - } - }; - - - // - // - // - template <typename T = DeclarationRef<Declaration> > - struct DeclarationRefOrderComparator - { - bool operator () (T const& x, T const& y) const - { - return x.resolve ()->order () < y.resolve ()->order (); - } - }; - - template <typename T = DeclarationRef<Declaration> > - struct DeclarationRefNameComparator - { - bool operator () (T const& x, T const& y) const - { - return x.resolve ()->name () < y.resolve ()->name (); - } - }; - - - // - // Mapping of fq-name -> sequence<Declaration> and some other - // useful stuff. - // - class DeclarationTable - { - private: - typedef - std::set<DeclarationPtr, DeclarationOrderComparator<> > - DeclarationSet; - - typedef - std::map<ScopedName, DeclarationSet> - NameDeclarationMap; - - public: - - typedef - DeclarationSet::const_iterator - Iterator; - - typedef - std::pair<Iterator, Iterator> - IteratorPair; - - class InvalidArgument {}; - class AlreadyExist {}; - - class TypeMismatch {}; - - public: - void - insert (DeclarationPtr d) throw (InvalidArgument, - AlreadyExist, - TypeMismatch); - Iterator - begin () const; - - Iterator - end () const; - - // Returns iterator pair. first points to the first element, - // second points to the element after last. - IteratorPair - lookup (ScopedName const& n) const; - - bool - exist (ScopedName const& n) const - { - IteratorPair pair = lookup (n); - return pair.first != pair.second; - } - - - class DeclarationNotFound {}; - - template <typename T> - StrictPtr<T> - lookup (ScopedName const& n) const - throw (DeclarationNotFound, TypeMismatch); - - template <typename T> - StrictPtr<T> - lookup (ScopedName const& n, Order const& o) const - throw (DeclarationNotFound, TypeMismatch); - - class ResolutionFailure {}; - class NameNotFound : public ResolutionFailure {}; - class PredicateNotMet : public ResolutionFailure {}; - - struct ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw (ResolutionFailure) = 0; - }; - - ScopedName - resolve (Name const& name, - ScopedName const& from, - Order const& before, - ResolvePredicate& p) const throw (ResolutionFailure); - - private: - DeclarationSet decl_set_; - NameDeclarationMap name_decl_map_; - }; - - - // @@ scope is not a declaration? - // Scope - // - class Scope : public virtual Declaration - { - private: - //@@ same type as in DeclarationTable - typedef - std::set<DeclarationPtr, DeclarationOrderComparator<> > - DeclarationSet; - - public: - typedef - DeclarationSet::const_iterator - Iterator; - - class InvalidArgument {}; - class AlreadyExist {}; - - - protected: - virtual - ~Scope () throw () {} - - // This c-tor is here for Declarations that are not in scope - // e.g. FileScope. - Scope (DeclarationTable& table, - ScopedName const& name, - Order const& order) - : Declaration (name, order, table), - table_ (table), - next_order_ (0) {} - - Scope (SimpleName const& name, ScopePtr const& scope) - : Declaration (name, scope), - table_ (scope->table ()), - next_order_ (0) - { - } - - public: - - // Inject new Declaration into a scope. Relative position of a new - // entity will be determined based on order (order..! order..!). - void - insert (DeclarationPtr d) throw (InvalidArgument, AlreadyExist); - - Iterator - begin () const; - - Iterator - end () const; - - Order - create_order (); - - // Returns order that would be returned by next call to - // create_order (). - Order - peek_order (); - - - public: - - DeclarationTable const& table () const - { - return table_; - } - - DeclarationTable& table () - { - return table_; - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "scope"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - DeclarationSet content_; - DeclarationTable& table_; - unsigned long next_order_; - }; - - - // - // - // - class TypeDecl : public virtual Declaration - { - protected: - virtual - ~TypeDecl () throw () {} - - TypeDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope) - { - } - - // Type completeness - public: - virtual bool - defined () const = 0; - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "type"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<TypeDecl> - TypeDeclPtr; - - typedef - DeclarationRef<TypeDecl> - TypeDeclRef; - - // - // - // - class TypeForwardDecl : public virtual TypeDecl - { - protected: - virtual - ~TypeForwardDecl () throw () {} - - TypeForwardDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope) - { - } - - // Type completeness - public: - virtual bool - defined () const - { - return false; - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "type"; - } - }; - - - // - // - // - class TypeDef : public virtual TypeDecl - { - protected: - virtual - ~TypeDef () throw () {} - - TypeDef (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope) - { - } - - // Type completeness - public: - virtual bool - defined () const - { - return true; - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "type"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<TypeDef> - TypeDefPtr; - - typedef - DeclarationRef<TypeDef> - TypeDefRef; - - - /* - // Anonymous type - class Anonymous : public virtual Type - { - }; - - */ - - - // - // - // - class InterfaceDecl : public virtual TypeDecl - { - public: - virtual - ~InterfaceDecl () throw () {} - - InterfaceDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "interface"; - } - - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<InterfaceDecl> - InterfaceDeclPtr; - - typedef - DeclarationOrderComparator<InterfaceDeclPtr> - InterfaceDeclOrderComparator; - - typedef - std::set<InterfaceDeclPtr, InterfaceDeclOrderComparator> - InterfaceDeclSet; - - typedef - DeclarationRef<InterfaceDecl> - InterfaceDeclRef; - - typedef - DeclarationRefOrderComparator<InterfaceDeclRef> - InterfaceDeclRefOrderComparator; - - typedef - std::set<InterfaceDeclRef, InterfaceDeclRefOrderComparator> - InterfaceDeclRefSet; - - - // - // - // - class InterfaceForwardDecl : public virtual InterfaceDecl, - public virtual TypeForwardDecl - { - public: - virtual - ~InterfaceForwardDecl () throw () {} - - InterfaceForwardDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope), - TypeForwardDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "interface"; - } - }; - - // - // - // - class InterfaceDef; - - typedef - StrictPtr<InterfaceDef> - InterfaceDefPtr; - - typedef - DeclarationRef<InterfaceDef> - InterfaceDefRef; - - typedef - DeclarationRefNameComparator<InterfaceDefRef> - InterfaceDefRefNameComparator; - - typedef - std::set<InterfaceDefRef, InterfaceDefRefNameComparator> - InterfaceDefRefSetName; - - class InterfaceDef : public virtual InterfaceDecl, - public virtual TypeDef, - public virtual Scope - { - public: - virtual - ~InterfaceDef () throw () {} - - class DuplicateName {}; - - InterfaceDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& inherits) throw (DuplicateName) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope) - { - for (ScopedNameSet::const_iterator i = inherits.begin (); - i != inherits.end (); - i++) - { - if (!inherits_.insert ( - InterfaceDefRef (scope->table (), *i)).second) - { - //@@ this never happens - throw DuplicateName (); - } - } - } - - public: - typedef - InterfaceDefRefSetName::const_iterator - Iterator; - - Iterator - inherits_begin () const - { - return inherits_.begin (); - } - - Iterator - inherits_end () const - { - return inherits_.end (); - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "interface"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - InterfaceDefRefSetName inherits_; - }; - - typedef - DeclarationOrderComparator<InterfaceDefPtr> - InterfaceDefOrderComparator; - - typedef - std::set<InterfaceDefPtr, InterfaceDefOrderComparator> - InterfaceDefSet; - - typedef - DeclarationRefOrderComparator<InterfaceDefRef> - InterfaceDefRefOrderComparator; - - typedef - std::set<InterfaceDefRef, InterfaceDefRefOrderComparator> - InterfaceDefRefSet; - - - // - // - // - class AbstractInterfaceDecl : public virtual InterfaceDecl - { - public: - virtual - ~AbstractInterfaceDecl () throw () {} - - // forward-declared unconstrained interface c-tor - AbstractInterfaceDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "abstract interface"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - - // - // - // - class AbstractInterfaceForwardDecl : public virtual InterfaceForwardDecl, - public virtual AbstractInterfaceDecl - { - public: - virtual - ~AbstractInterfaceForwardDecl () throw () {} - - // forward-declared unconstrained interface c-tor - AbstractInterfaceForwardDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope), - TypeForwardDecl (name, scope), - InterfaceForwardDecl (name, scope), - AbstractInterfaceDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "abstract interface"; - } - }; - - - // - // - // - class AbstractInterfaceDef : public virtual AbstractInterfaceDecl, - public virtual InterfaceDef - { - public: - virtual - ~AbstractInterfaceDef () throw () {} - - AbstractInterfaceDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& inherits) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope), - AbstractInterfaceDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope), - InterfaceDef (name, scope, inherits) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "abstract interface"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - // - // - // - class LocalInterfaceDecl : public virtual InterfaceDecl - { - public: - virtual - ~LocalInterfaceDecl () throw () {} - - LocalInterfaceDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "local interface"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - - // - // - // - class LocalInterfaceForwardDecl : public virtual InterfaceForwardDecl, - public virtual LocalInterfaceDecl - { - public: - virtual - ~LocalInterfaceForwardDecl () throw () {} - - LocalInterfaceForwardDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope), - TypeForwardDecl (name, scope), - InterfaceForwardDecl (name, scope), - LocalInterfaceDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "local interface"; - } - }; - - - // - // - // - class LocalInterfaceDef : public virtual LocalInterfaceDecl, - public virtual InterfaceDef - { - public: - virtual - ~LocalInterfaceDef () throw () {} - - LocalInterfaceDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& inherits) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope), - LocalInterfaceDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope), - InterfaceDef (name, scope, inherits) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "local interface"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<LocalInterfaceDef> - LocalInterfaceDefPtr; - - - // - // - // - class UnconstrainedInterfaceDecl : public virtual InterfaceDecl - { - public: - virtual - ~UnconstrainedInterfaceDecl () throw () {} - - UnconstrainedInterfaceDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "unconstrained interface"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<UnconstrainedInterfaceDecl> - UnconstrainedInterfaceDeclPtr; - - - typedef - DeclarationOrderComparator<UnconstrainedInterfaceDeclPtr> - UnconstrainedInterfaceDeclOrderComparator; - - typedef - std::set<UnconstrainedInterfaceDeclPtr, - UnconstrainedInterfaceDeclOrderComparator> - UnconstrainedInterfaceDeclSet; - - - // - // - // - class UnconstrainedInterfaceForwardDecl : - public virtual InterfaceForwardDecl, - public virtual UnconstrainedInterfaceDecl - { - public: - virtual - ~UnconstrainedInterfaceForwardDecl () throw () {} - - UnconstrainedInterfaceForwardDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope), - TypeForwardDecl (name, scope), - InterfaceForwardDecl (name, scope), - UnconstrainedInterfaceDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "unconstrained interface"; - } - }; - - // - // - // - class UnconstrainedInterfaceDef : - public virtual UnconstrainedInterfaceDecl, - public virtual InterfaceDef - { - public: - virtual - ~UnconstrainedInterfaceDef () throw () {} - - UnconstrainedInterfaceDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& inherits) - : Declaration (name, scope), - TypeDecl (name, scope), - InterfaceDecl (name, scope), - UnconstrainedInterfaceDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope), - InterfaceDef (name, scope, inherits) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "unconstrained interface"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<UnconstrainedInterfaceDef> - UnconstrainedInterfaceDefPtr; - - - typedef - DeclarationOrderComparator<UnconstrainedInterfaceDefPtr> - UnconstrainedInterfaceDefOrderComparator; - - typedef - std::set<UnconstrainedInterfaceDefPtr, - UnconstrainedInterfaceDefOrderComparator> - UnconstrainedInterfaceDefSet; - - - // - // - // - class AttributeDecl : public virtual Declaration - { - public: - virtual - ~AttributeDecl () throw () {} - - AttributeDecl (SimpleName const& name, - ScopedName const& type, - ScopePtr const& scope) - : Declaration (name, scope), - type_ (scope->table (), type) - - { - } - - public: - TypeDeclPtr - type () - { - return type_.resolve (); - } - - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "attribute"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - TypeDeclRef type_; - }; - - typedef - StrictPtr<AttributeDecl> - AttributeDeclPtr; - - // - // - // - class OperationParameter : public virtual Node - { - public: - virtual - ~OperationParameter () throw () {} - - struct Direction - { - enum Value - { - IN, - OUT, - INOUT - }; - - friend std::ostream& - operator<< (std::ostream& o, Value d) - { - if (d == IN) o << "in"; - else if (d == OUT) o << "out"; - else o << "inout"; - return o; - } - }; - - OperationParameter (Direction::Value direction, - ScopedName type, - SimpleName name, - DeclarationTable const& table) - : direction_ (direction), - type_ (table, type), - name_ (name) - { - } - - public: - Direction::Value - direction () - { - return direction_; - } - - TypeDeclPtr - type () - { - return type_.resolve (); - } - - SimpleName - name () - { - return name_; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - Direction::Value direction_; - TypeDeclRef type_; - SimpleName name_; - }; - - typedef - StrictPtr<OperationParameter> - OperationParameterPtr; - - //@@ Strip Ptr from *List, *Set, etc? - typedef - std::vector<OperationParameterPtr> - OperationParameterList; - - - // - // - // - class OperationDecl : public virtual Declaration - { - public: - virtual - ~OperationDecl () throw () {} - - OperationDecl (SimpleName const& name, - ScopedName const& type, - ScopePtr const& scope) - : Declaration (name, scope), - type_ (scope->table (), type) - - { - } - - public: - TypeDeclPtr - type () - { - return type_.resolve (); - } - - public: - typedef - OperationParameterList::const_iterator - Iterator; - - void - insert (OperationParameterPtr op) - { - //@@ would be nice to have some checking here - // list should probably be a set(by name) - parameter_list_.push_back (op); - } - - //@@ It's probably a good idea to stript prefixes from - // functions like inherits_begin, etc where there is - // no ambiguity. Ambiguity can come from Scope member function. - Iterator - begin () - { - return parameter_list_.begin (); - } - - Iterator - end () - { - return parameter_list_.end (); - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "operation"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - TypeDeclRef type_; - OperationParameterList parameter_list_; - }; - - typedef - StrictPtr<OperationDecl> - OperationDeclPtr; - - - // - // Module - // - class Module : public virtual Scope - { - public: - virtual - ~Module () throw () {} - - Module (SimpleName const& name, ScopePtr const& scope) - : Declaration (name, scope), - Scope (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "module"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - typedef - StrictPtr<Module> - ModulePtr; - - // - // - // - class FileScope : public virtual Scope - { - public: - virtual - ~FileScope () throw () {} - - FileScope (DeclarationTable& table, Order const& order); - - virtual ScopePtr - scope () const throw (NotInScope) - { - throw NotInScope (); - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "file scope"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<FileScope> - FileScopePtr; - - typedef - DeclarationOrderComparator<FileScopePtr> - FileScopeOrderComparator; - - typedef - std::set<FileScopePtr, FileScopeOrderComparator> - FileScopeSet; - - - // - // - // - class TranslationRegion; - - typedef - StrictPtr<TranslationRegion> - TranslationRegionPtr; - - typedef - std::vector<TranslationRegionPtr> - TranslationRegionList; - - class TranslationRegion : public virtual Node - { - public: - virtual - ~TranslationRegion () throw () {} - - TranslationRegion (DeclarationTable& table, - Order const& order) - : order_ (order), - table_ (table), - next_order_ (0) - { - scope_ = FileScopePtr (new FileScope (table_, Order (order_, 1))); - - //@@ eh! - table.insert (scope_); - } - - public: - DeclarationTable const& - table () const - { - return table_; - } - - DeclarationTable& - table () - { - return table_; - } - - public: - Order - create_order () - { - return Order (Order (order_, 0), next_order_++); - } - - public: - FileScopePtr - scope () - { - return scope_; - } - - public: - class InvalidArgument {}; - - void - insert (TranslationRegionPtr const& tr) throw (InvalidArgument); - - typedef - TranslationRegionList::const_iterator - Iterator; - - Iterator - begin () const; - - Iterator - end () const; - - private: - Order order_; - FileScopePtr scope_; - DeclarationTable& table_; - unsigned long next_order_; - TranslationRegionList region_list_; - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - - // - // - // - class IncludeTranslationRegion : public virtual TranslationRegion - { - public: - virtual - ~IncludeTranslationRegion () throw () {} - - IncludeTranslationRegion (fs::path const& file_path, - DeclarationTable& table, - Order const& order) - : TranslationRegion (table, order), - file_path_ (file_path) - { - } - - public: - fs::path file_path () const - { - return file_path_; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - fs::path file_path_; - }; - typedef - StrictPtr<IncludeTranslationRegion> - IncludeTranslationRegionPtr; - - // - // - // - class SysIncludeTranslationRegion : public virtual TranslationRegion - { - public: - virtual - ~SysIncludeTranslationRegion () throw () {} - - SysIncludeTranslationRegion (fs::path const& file_path, - DeclarationTable& table, - Order const& order) - : TranslationRegion (table, order), - file_path_ (file_path) - { - } - - public: - fs::path file_path () const - { - return file_path_; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - fs::path file_path_; - }; - typedef - StrictPtr<SysIncludeTranslationRegion> - SysIncludeTranslationRegionPtr; - - // - // - // - class ImpliedIncludeTranslationRegion : public virtual TranslationRegion - { - public: - virtual - ~ImpliedIncludeTranslationRegion () throw () {} - - ImpliedIncludeTranslationRegion (fs::path const& file_path, - DeclarationTable& table, - Order const& order) - : TranslationRegion (table, order), - file_path_ (file_path) - { - } - - public: - fs::path file_path () const - { - return file_path_; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - fs::path file_path_; - }; - typedef - StrictPtr<ImpliedIncludeTranslationRegion> - ImpliedIncludeTranslationRegionPtr; - - - // - // - // - class PrincipalTranslationRegion : public virtual TranslationRegion - { - public: - virtual - ~PrincipalTranslationRegion () throw () {} - - PrincipalTranslationRegion (fs::path const& file_path, - DeclarationTable& table, - Order const& order) - : TranslationRegion (table, order), - file_path_ (file_path) - { - } - - public: - fs::path file_path () const - { - return file_path_; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - fs::path file_path_; - }; - typedef - StrictPtr<PrincipalTranslationRegion> - PrincipalTranslationRegionPtr; - - - //@@ TranslationUnit should not contain FileScope or should it? - //@@ Seems not - // - // - class TranslationUnit : public virtual Node - { - public: - virtual - ~TranslationUnit () throw () {} - - TranslationUnit () - : order_ (0), - next_order_ (0) - { - } - - public: - - DeclarationTable const& - table () const - { - return table_; - } - - DeclarationTable& - table () - { - return table_; - } - - public: - Order - create_order () - { - return Order (order_, next_order_++); - } - - public: - class InvalidArgument {}; - - void - insert (TranslationRegionPtr const& tr) throw (InvalidArgument); - - typedef - TranslationRegionList::const_iterator - Iterator; - - Iterator - begin () const; - - Iterator - end () const; - - - class NotFound {}; - - PrincipalTranslationRegionPtr - principal_translation_region () const throw (NotFound) - { - for (Iterator i = begin (); i != end (); i++) - { - if ((*i)->is_a<PrincipalTranslationRegion> ()) - { - return (*i)->dynamic_type<PrincipalTranslationRegion> (); - } - } - - throw NotFound (); - } - - private: - Order order_; - DeclarationTable table_; - unsigned long next_order_; - TranslationRegionList region_list_; - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<TranslationUnit> - TranslationUnitPtr; - } -} - -//@@ tmp -#include "CCF/IDL2/IDL2_SyntaxTree_BuiltIn.hpp" -#include "CCF/IDL2/IDL2_SyntaxTree_Value.hpp" - -#include "CCF/IDL2/IDL2_SyntaxTree.tpp" - -#endif // CCF_IDL2_SYNTAX_TREE_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.tpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.tpp deleted file mode 100644 index 1c1953b9649..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree.tpp +++ /dev/null @@ -1,126 +0,0 @@ -namespace IDL2 -{ - namespace SyntaxTree - { - - // - // DeclarationRef - // - template <typename T, typename Ptr> - DeclarationRef<T, Ptr>:: - DeclarationRef (DeclarationTable const& table, ScopedName const& name) - : table_ (table), - name_ (name), - order_ (0), - initialized_ (true), - with_order_ (false) - { - } - - template <typename T, typename Ptr> - DeclarationRef<T, Ptr>:: - DeclarationRef (DeclarationTable const& table, - ScopedName const& name, - Order const& order) - : table_ (table), - name_ (name), - order_ (order), - initialized_ (true), - with_order_ (true) - { - } - - template <typename T, typename Ptr> - DeclarationRef<T, Ptr>:: - DeclarationRef (DeclarationPtr decl) - : table_ (decl->scope ()->table ()), - name_ (decl->name ()), - order_ (decl->order ()), - initialized_ (true), - with_order_ (true) - { - } - - template <typename T, typename Ptr> - DeclarationRef<T, Ptr>:: - DeclarationRef (DeclarationTable const& table) - : table_ (table), - name_ (""), - order_ (0), - initialized_ (false), - with_order_ (false) - { - } - - template <typename T, typename Ptr> - Ptr DeclarationRef<T, Ptr>:: - resolve () const throw (NotInitialized, DeclarationNotFound, TypeMismatch) - { - if (!initialized_) throw NotInitialized (); - - try - { - //@@ gcc bug - return with_order_ - ? table_.template lookup<T> (name_, order_) - : table_.template lookup<T> (name_); - } - catch (DeclarationTable::TypeMismatch const&) - { - throw TypeMismatch (); - } - catch (DeclarationTable::DeclarationNotFound const&) - { - throw DeclarationNotFound (); - } - } - - // - // DeclarationTable - // - template <typename T> - StrictPtr<T> DeclarationTable:: - lookup (ScopedName const& n) const - throw (DeclarationNotFound, TypeMismatch) - { - IteratorPair pair = lookup (n); - - if (pair.first == pair.second) throw DeclarationNotFound (); - - for (; pair.first != pair.second; pair.first++) - { - DeclarationPtr d = (*pair.first); - - //@@ gcc bug - StrictPtr<T> p ((*pair.first)->template dynamic_type<T> ()); - - if (p != 0) return p; - } - - throw TypeMismatch (); - } - - - template <typename T> - StrictPtr<T> DeclarationTable:: - lookup (ScopedName const& n, Order const& o) const - throw (DeclarationNotFound, TypeMismatch) - { - IteratorPair pair = lookup (n); - - for (; pair.first != pair.second; pair.first++) - { - if ((*pair.first)->order () != o) continue; - - //@@ gcc bug - StrictPtr<T> p ((*pair.first)->template dynamic_type<T> ()); - - if (p != 0) return p; - - throw TypeMismatch (); - } - - throw DeclarationNotFound (); - } - } -} diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTreeFwd.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTreeFwd.hpp deleted file mode 100644 index 12b6a183516..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTreeFwd.hpp +++ /dev/null @@ -1,162 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_SYNTAX_TREE_FWD_HPP -#define CCF_IDL2_SYNTAX_TREE_FWD_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CompilerElements/ReferenceCounting.hpp" - -namespace IDL2 -{ - namespace SyntaxTree - { - using ReferenceCounting::StrictPtr; - - class Comma; - typedef - StrictPtr<Comma> - CommaPtr; - - class Declaration; - typedef - StrictPtr<Declaration> - DeclarationPtr; - - class TypeDecl; - typedef - StrictPtr<TypeDecl> - TypeDeclPtr; - - class TypeDef; - typedef - StrictPtr<TypeDef> - TypeDefPtr; - - class BuiltInTypeDef; - typedef - StrictPtr<BuiltInTypeDef> - BuiltInTypeDefPtr; - - class Void; - typedef - StrictPtr<Void> - VoidPtr; - - class Long; - typedef - StrictPtr<Long> - LongPtr; - - class Boolean; - typedef - StrictPtr<Boolean> - BooleanPtr; - - class String; - typedef - StrictPtr<String> - StringPtr; - - class Scope; - typedef - StrictPtr<Scope> - ScopePtr; - - class Module; - typedef - StrictPtr<Module> - ModulePtr; - - class InterfaceDecl; - typedef - StrictPtr<InterfaceDecl> - InterfaceDeclPtr; - - class InterfaceDef; - typedef - StrictPtr<InterfaceDef> - InterfaceDefPtr; - - class AbstractInterfaceDecl; - typedef - StrictPtr<AbstractInterfaceDecl> - AbstractInterfaceDeclPtr; - - class AbstractInterfaceDef; - typedef - StrictPtr<AbstractInterfaceDef> - AbstractInterfaceDefPtr; - - class LocalInterfaceDecl; - typedef - StrictPtr<LocalInterfaceDecl> - LocalInterfaceDeclPtr; - - class LocalInterfaceDef; - typedef - StrictPtr<LocalInterfaceDef> - LocalInterfaceDefPtr; - - class UnconstrainedInterfaceDecl; - typedef - StrictPtr<UnconstrainedInterfaceDecl> - UnconstrainedInterfaceDeclPtr; - - class UnconstrainedInterfaceDef; - typedef - StrictPtr<UnconstrainedInterfaceDef> - UnconstrainedInterfaceDefPtr; - - class AttributeDecl; - typedef - StrictPtr<AttributeDecl> - AttributeDeclPtr; - - class OperationParameter; - typedef - StrictPtr<OperationParameter> - OperationParameterPtr; - - class OperationDecl; - typedef - StrictPtr<OperationDecl> - OperationDeclPtr; - - class FileScope; - typedef - StrictPtr<FileScope> - FileScopePtr; - - class TranslationRegion; - typedef - StrictPtr<TranslationRegion> - TranslationRegionPtr; - - class IncludeTranslationRegion; - typedef - StrictPtr<IncludeTranslationRegion> - IncludeTranslationRegionPtr; - - class SysIncludeTranslationRegion; - typedef - StrictPtr<SysIncludeTranslationRegion> - SysIncludeTranslationRegionPtr; - - class ImpliedIncludeTranslationRegion; - typedef - StrictPtr<ImpliedIncludeTranslationRegion> - ImpliedIncludeTranslationRegionPtr; - - class PrincipalTranslationRegion; - typedef - StrictPtr<PrincipalTranslationRegion> - PrincipalTranslationRegionPtr; - - class TranslationUnit; - typedef - StrictPtr<TranslationUnit> - TranslationUnitPtr; - } -} - -#endif // CCF_IDL2_SYNTAX_TREE_FWD_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_BuiltIn.cpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_BuiltIn.cpp deleted file mode 100644 index f1ea69edb59..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_BuiltIn.cpp +++ /dev/null @@ -1,99 +0,0 @@ -// $Id$ -#include "IDL2_SyntaxTree_BuiltIn.hpp" - -#include "IDL2_Traversal.hpp" - -namespace IDL2 -{ - namespace SyntaxTree - { - using ReferenceCounting::StrictPtr; - using CCF::Traversal::try_visit; - - // - // BuiltInTypeDef - // - - void BuiltInTypeDef:: - accept (CCF::Traversal::Visitor* v) - { - BuiltInTypeDefPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::BuiltInTypeDef> (&Traversal::BuiltInTypeDef::visit_built_in_type_def, - v, - self)) - { - TypeDef::accept (v); - } - } - - - // - // Void - // - - void Void:: - accept (CCF::Traversal::Visitor* v) - { - VoidPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::Void> (&Traversal::Void::visit_void, - v, - self)) - { - BuiltInTypeDef::accept (v); - } - } - - // - // Long - // - - void Long:: - accept (CCF::Traversal::Visitor* v) - { - LongPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::Long> (&Traversal::Long::visit_long, - v, - self)) - { - BuiltInTypeDef::accept (v); - } - } - - // - // Boolean - // - - void Boolean:: - accept (CCF::Traversal::Visitor* v) - { - BooleanPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::Boolean> (&Traversal::Boolean::visit_boolean, - v, - self)) - { - BuiltInTypeDef::accept (v); - } - } - - // - // String - // - - void String:: - accept (CCF::Traversal::Visitor* v) - { - StringPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::String> (&Traversal::String::visit_string, - v, - self)) - { - BuiltInTypeDef::accept (v); - } - } - } -} diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_BuiltIn.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_BuiltIn.hpp deleted file mode 100644 index 63ea6290a78..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_BuiltIn.hpp +++ /dev/null @@ -1,200 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_SYNTAX_TREE_BUILT_IN_HPP -#define CCF_IDL2_SYNTAX_TREE_BUILT_IN_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_SyntaxTree.hpp" - -namespace IDL2 -{ - namespace SyntaxTree - { - - //@@ I have a potential problem with two-word built-in types - // e.g. unsigned long. Though I don't see anything bad in - // allowing (internally) for names to contain spaces e.g. - // '::unsigned long'. I will also have to teach LexicalAnalyzer - // to parse this stuff properly. - // - - // - // - // - class BuiltInTypeDef : public virtual TypeDef - { - protected: - virtual - ~BuiltInTypeDef () throw () {} - - BuiltInTypeDef (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - TypeDef (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "built-in type"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<BuiltInTypeDef> - BuiltInTypeDefPtr; - - - // - // - // - class Void : public virtual BuiltInTypeDef - { - public: - virtual - ~Void () throw () {} - - Void (ScopePtr const& scope) - : Declaration (SimpleName ("void"), scope), - TypeDecl (SimpleName ("void"), scope), - TypeDef (SimpleName ("void"), scope), - BuiltInTypeDef (SimpleName ("void"), scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "built-in type void"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<Void> - VoidPtr; - - // - // - // - class Long : public virtual BuiltInTypeDef - { - public: - virtual - ~Long () throw () {} - - Long (ScopePtr const& scope) - : Declaration (SimpleName ("long"), scope), - TypeDecl (SimpleName ("long"), scope), - TypeDef (SimpleName ("long"), scope), - BuiltInTypeDef (SimpleName ("long"), scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "built-in type long"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<Long> - LongPtr; - - // - // - // - class Boolean : public virtual BuiltInTypeDef - { - public: - virtual - ~Boolean () throw () {} - - Boolean (ScopePtr const& scope) - : Declaration (SimpleName ("boolean"), scope), - TypeDecl (SimpleName ("boolean"), scope), - TypeDef (SimpleName ("boolean"), scope), - BuiltInTypeDef (SimpleName ("boolean"), scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "built-in type boolean"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<Boolean> - BooleanPtr; - - - // - // - // - class String : public virtual BuiltInTypeDef - { - public: - virtual - ~String () throw () {} - - String (ScopePtr const& scope) - : Declaration (SimpleName ("string"), scope), - TypeDecl (SimpleName ("string"), scope), - TypeDef (SimpleName ("string"), scope), - BuiltInTypeDef (SimpleName ("string"), scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "built-in type string"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<String> - StringPtr; - } -} - -#endif // CCF_IDL2_SYNTAX_TREE_BUILT_IN_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_Value.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_Value.hpp deleted file mode 100644 index 1b8d4399fcd..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_SyntaxTree_Value.hpp +++ /dev/null @@ -1,190 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_SYNTAX_TREE_VALUE_HPP -#define CCF_IDL2_SYNTAX_TREE_VALUE_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_SyntaxTree.hpp" - -namespace IDL2 -{ - namespace SyntaxTree - { - // - // - // - class ValueDecl : public virtual TypeDecl - { - public: - virtual - ~ValueDecl () throw () {} - - ValueDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "value"; - } - - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v) - { - } - - }; - - typedef - StrictPtr<ValueDecl> - ValueDeclPtr; - - typedef - DeclarationOrderComparator<ValueDeclPtr> - ValueDeclOrderComparator; - - typedef - std::set<ValueDeclPtr, ValueDeclOrderComparator> - ValueDeclSet; - - typedef - DeclarationRef<ValueDecl> - ValueDeclRef; - - typedef - DeclarationRefOrderComparator<ValueDeclRef> - ValueDeclRefOrderComparator; - - typedef - std::set<ValueDeclRef, ValueDeclRefOrderComparator> - ValueDeclRefSet; - - - // - // - // - class ValueForwardDecl : public virtual ValueDecl, - public virtual TypeForwardDecl - { - public: - virtual - ~ValueForwardDecl () throw () {} - - ValueForwardDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - ValueDecl (name, scope), - TypeForwardDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "value"; - } - }; - - // - // - // - class ValueDef; - - typedef - StrictPtr<ValueDef> - ValueDefPtr; - - typedef - DeclarationRef<ValueDef> - ValueDefRef; - - typedef - DeclarationRefNameComparator<ValueDefRef> - ValueDefRefNameComparator; - - typedef - std::set<ValueDefRef, ValueDefRefNameComparator> - ValueDefRefSetName; - - class ValueDef : public virtual ValueDecl, - public virtual TypeDef, - public virtual Scope - { - public: - virtual - ~ValueDef () throw () {} - - class DuplicateName {}; - - ValueDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& inherits) throw (DuplicateName) - : Declaration (name, scope), - TypeDecl (name, scope), - ValueDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope) - { - for (ScopedNameSet::const_iterator i = inherits.begin (); - i != inherits.end (); - i++) - { - if (!inherits_.insert (ValueDefRef (scope->table (), *i)).second) - { - //@@ this never happens - throw DuplicateName (); - } - } - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "value"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v) - { - } - - - private: - ValueDefRefSetName inherits_; - }; - - typedef - DeclarationOrderComparator<ValueDefPtr> - ValueDefOrderComparator; - - typedef - std::set<ValueDefPtr, ValueDefOrderComparator> - ValueDefSet; - - typedef - DeclarationRefOrderComparator<ValueDefRef> - ValueDefRefOrderComparator; - - typedef - std::set<ValueDefRef, ValueDefRefOrderComparator> - ValueDefRefSet; - } -} - -#endif // CCF_IDL2_SYNTAX_TREE_VALUE_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_Traversal.cpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_Traversal.cpp deleted file mode 100644 index 08bff63ed2d..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_Traversal.cpp +++ /dev/null @@ -1,608 +0,0 @@ -// $Id$ -#include "IDL2_Traversal.hpp" -#include "IDL2_SyntaxTree.hpp" - -namespace IDL2 -{ - namespace Traversal - { - namespace - { - void - iterate_scope (SyntaxTree::ScopePtr const& s, - CCF::Traversal::Visitor* v) - { - for (SyntaxTree::Scope::Iterator i = s->begin (); i != s->end (); i++) - { - (*i)->accept (v); - } - } - } - - - // - // Scope - // - - void Scope:: - visit_scope (NodePtr const& s) - { - visit_scope_pre (s); - visit_scope_scope (s); - visit_scope_post (s); - } - - void Scope:: - visit_scope_scope (NodePtr const& s) - { - iterate_scope (s, this); - } - - - // - // Module - // - - void Module:: - visit_module (NodePtr const& m) - { - visit_module_pre (m); - visit_module_scope (m); - visit_module_post (m); - } - - void Module:: - visit_module_pre (NodePtr const& m) - { - } - - void Module:: - visit_module_scope (NodePtr const& m) - { - iterate_scope (m, this); - } - - void Module:: - visit_module_post (NodePtr const& m) - { - } - - // - // InterfaceDecl - // - - void InterfaceDecl:: - visit_interface_decl (NodePtr const& i) - { - visit_interface_decl_pre (i); - visit_interface_decl_post (i); - } - - void InterfaceDecl:: - visit_interface_decl_pre (NodePtr const&) - { - } - - void InterfaceDecl:: - visit_interface_decl_post (NodePtr const&) - { - } - - - // - // InterfaceDef - // - - void InterfaceDef:: - visit_interface_def (NodePtr const& i) - { - visit_interface_def_pre (i); - visit_interface_def_scope (i); - visit_interface_def_post (i); - } - - void InterfaceDef:: - visit_interface_def_pre (NodePtr const&) - { - } - - void InterfaceDef:: - visit_interface_def_scope (NodePtr const& i) - { - iterate_scope (i, this); - } - - void InterfaceDef:: - visit_interface_def_post (NodePtr const&) - { - } - - // - // AbstractInterfaceDecl - // - - void AbstractInterfaceDecl:: - visit_abstract_interface_decl (NodePtr const& i) - { - visit_abstract_interface_decl_pre (i); - visit_abstract_interface_decl_post (i); - } - - void AbstractInterfaceDecl:: - visit_abstract_interface_decl_pre (NodePtr const&) - { - } - - void AbstractInterfaceDecl:: - visit_abstract_interface_decl_post (NodePtr const&) - { - } - - - // - // AbstractInterfaceDef - // - - void AbstractInterfaceDef:: - visit_abstract_interface_def (NodePtr const& i) - { - visit_abstract_interface_def_pre (i); - visit_abstract_interface_def_scope (i); - visit_abstract_interface_def_post (i); - } - - void AbstractInterfaceDef:: - visit_abstract_interface_def_pre (NodePtr const&) - { - } - - void AbstractInterfaceDef:: - visit_abstract_interface_def_scope (NodePtr const& i) - { - iterate_scope (i, this); - } - - void AbstractInterfaceDef:: - visit_abstract_interface_def_post (NodePtr const&) - { - } - - // - // LocalInterfaceDecl - // - - void LocalInterfaceDecl:: - visit_local_interface_decl (NodePtr const& i) - { - visit_local_interface_decl_pre (i); - visit_local_interface_decl_post (i); - } - - void LocalInterfaceDecl:: - visit_local_interface_decl_pre (NodePtr const&) - { - } - - void LocalInterfaceDecl:: - visit_local_interface_decl_post (NodePtr const&) - { - } - - - // - // LocalInterfaceDef - // - - void LocalInterfaceDef:: - visit_local_interface_def (NodePtr const& i) - { - visit_local_interface_def_pre (i); - visit_local_interface_def_scope (i); - visit_local_interface_def_post (i); - } - - void LocalInterfaceDef:: - visit_local_interface_def_pre (NodePtr const&) - { - } - - void LocalInterfaceDef:: - visit_local_interface_def_scope (NodePtr const& i) - { - iterate_scope (i, this); - } - - void LocalInterfaceDef:: - visit_local_interface_def_post (NodePtr const&) - { - } - - // - // UnconstrainedInterfaceDecl - // - - void UnconstrainedInterfaceDecl:: - visit_unconstrained_interface_decl (NodePtr const& i) - { - visit_unconstrained_interface_decl_pre (i); - visit_unconstrained_interface_decl_post (i); - } - - void UnconstrainedInterfaceDecl:: - visit_unconstrained_interface_decl_pre (NodePtr const&) - { - } - - void UnconstrainedInterfaceDecl:: - visit_unconstrained_interface_decl_post (NodePtr const&) - { - } - - - // - // UnconstrainedInterfaceDef - // - - void UnconstrainedInterfaceDef:: - visit_unconstrained_interface_def (NodePtr const& i) - { - visit_unconstrained_interface_def_pre (i); - visit_unconstrained_interface_def_scope (i); - visit_unconstrained_interface_def_post (i); - } - - void UnconstrainedInterfaceDef:: - visit_unconstrained_interface_def_pre (NodePtr const&) - { - } - - void UnconstrainedInterfaceDef:: - visit_unconstrained_interface_def_scope (NodePtr const& i) - { - iterate_scope (i, this); - } - - void UnconstrainedInterfaceDef:: - visit_unconstrained_interface_def_post (NodePtr const&) - { - } - - // - // - // - - void AttributeDecl:: - visit_attribute_decl (NodePtr const& n) - { - visit_attribute_pre (n); - - if (type_) n->type ()->accept (type_); - else n->type ()->accept (this); - - visit_attribute_post (n); - } - - - void AttributeDecl:: - visit_attribute_pre (NodePtr const& n) - { - } - - void AttributeDecl:: - visit_attribute_post (NodePtr const& n) - { - } - - - // - // OperationParameter - // - void OperationParameter:: - visit_operation_parameter (NodePtr const& op) - { - visit_operation_parameter_pre (op); - - CCF::Traversal::Visitor* v = this; - - switch (op->direction ()) - { - case SyntaxTree::OperationParameter::Direction::IN: - { - if (in_) v = in_; - break; - } - case SyntaxTree::OperationParameter::Direction::OUT: - { - if (out_) v = out_; - break; - } - case SyntaxTree::OperationParameter::Direction::INOUT: - { - if (inout_) v = inout_; - break; - } - } - - op->type ()->accept (v); - - visit_operation_parameter_post (op); - } - - // - // OperationDecl - // - - void OperationDecl:: - visit_operation_decl (NodePtr const& n) - { - visit_operation_decl_pre (n); - visit_operation_decl_type (n); - visit_operation_decl_name (n); - visit_operation_decl_parameters (n); - visit_operation_decl_post (n); - } - - void OperationDecl:: - visit_operation_decl_pre (NodePtr const& n) - { - } - - void OperationDecl:: - visit_operation_decl_type (NodePtr const& n) - { - if (type_) n->type ()->accept (type_); - else n->type ()->accept (this); - } - - void OperationDecl:: - visit_operation_decl_name (NodePtr const& n) - { - } - - void OperationDecl:: - visit_operation_decl_parameters (NodePtr const& n) - { - for (SyntaxTree::OperationDecl::Iterator i = n->begin (); - i != n->end (); - i++) - { - (*i)->accept (this); - - if (i + 1 != n->end ()) - { - //@@ could be OperationParameterComma - SyntaxTree::CommaPtr c (new SyntaxTree::Comma); - c->accept (this); - } - } - } - - void OperationDecl:: - visit_operation_decl_post (NodePtr const& n) - { - } - - // - // FileScope - // - - void FileScope:: - visit_file_scope (NodePtr const& fs) - { - visit_file_scope_pre (fs); - visit_file_scope_scope (fs); - visit_file_scope_post (fs); - } - - void FileScope:: - visit_file_scope_pre (NodePtr const& fs) - { - } - - void FileScope:: - visit_file_scope_scope (NodePtr const& fs) - { - iterate_scope (fs, this); - } - - void FileScope:: - visit_file_scope_post (NodePtr const& fs) - { - } - - // - // TranslationRegion - // - - namespace - { - void - iterate_translation_region (SyntaxTree::TranslationRegionPtr const& tr, - CCF::Traversal::Visitor* v) - { - // visit nested translation regions - for (SyntaxTree::TranslationRegion::Iterator i = tr->begin (); - i != tr->end (); - i++) - { - (*i)->accept (v); - } - - // visit associated scope - tr->scope ()->accept (v); - } - } - - - void TranslationRegion:: - visit_translation_region (NodePtr const& n) - { - visit_translation_region_pre (n); - visit_translation_region_content (n); - visit_translation_region_post (n); - } - - void TranslationRegion:: - visit_translation_region_pre (NodePtr const& n) - { - iterate_translation_region (n, this); - } - - void TranslationRegion:: - visit_translation_region_content (NodePtr const& n) - { - } - - void TranslationRegion:: - visit_translation_region_post (NodePtr const& n) - { - } - - // - // IncludeTranslationRegion - // - - void IncludeTranslationRegion:: - visit_include_translation_region (NodePtr const& n) - { - visit_include_translation_region_pre (n); - visit_include_translation_region_content (n); - visit_include_translation_region_post (n); - } - - void IncludeTranslationRegion:: - visit_include_translation_region_pre (NodePtr const& n) - { - iterate_translation_region (n, this); - } - - void IncludeTranslationRegion:: - visit_include_translation_region_content (NodePtr const& n) - { - } - - void IncludeTranslationRegion:: - visit_include_translation_region_post (NodePtr const& n) - { - } - - // - // SysIncludeTranslationRegion - // - - void SysIncludeTranslationRegion:: - visit_sys_include_translation_region (NodePtr const& n) - { - visit_sys_include_translation_region_pre (n); - visit_sys_include_translation_region_content (n); - visit_sys_include_translation_region_post (n); - } - - void SysIncludeTranslationRegion:: - visit_sys_include_translation_region_pre (NodePtr const& n) - { - iterate_translation_region (n, this); - } - - void SysIncludeTranslationRegion:: - visit_sys_include_translation_region_content (NodePtr const& n) - { - } - - void SysIncludeTranslationRegion:: - visit_sys_include_translation_region_post (NodePtr const& n) - { - } - - // - // ImpliedIncludeTranslationRegion - // - - void ImpliedIncludeTranslationRegion:: - visit_implied_include_translation_region (NodePtr const& n) - { - visit_implied_include_translation_region_pre (n); - visit_implied_include_translation_region_content (n); - visit_implied_include_translation_region_post (n); - } - - void ImpliedIncludeTranslationRegion:: - visit_implied_include_translation_region_pre (NodePtr const& n) - { - iterate_translation_region (n, this); - } - - void ImpliedIncludeTranslationRegion:: - visit_implied_include_translation_region_content (NodePtr const& n) - { - } - - void ImpliedIncludeTranslationRegion:: - visit_implied_include_translation_region_post (NodePtr const& n) - { - } - - - // - // PrincipalTranslationRegion - // - - void PrincipalTranslationRegion:: - visit_principal_translation_region (NodePtr const& n) - { - visit_principal_translation_region_pre (n); - visit_principal_translation_region_content (n); - visit_principal_translation_region_post (n); - } - - void PrincipalTranslationRegion:: - visit_principal_translation_region_pre (NodePtr const& n) - { - iterate_translation_region (n, this); - } - - void PrincipalTranslationRegion:: - visit_principal_translation_region_content (NodePtr const& n) - { - } - - void PrincipalTranslationRegion:: - visit_principal_translation_region_post (NodePtr const& n) - { - } - - // - // TranslationUnit - // - - void TranslationUnit:: - visit_translation_unit (NodePtr const& tu) - { - visit_translation_unit_pre (tu); - visit_translation_unit_content (tu); - visit_translation_unit_post (tu); - } - - void TranslationUnit:: - visit_translation_unit_pre (NodePtr const& tu) - { - } - - void TranslationUnit:: - visit_translation_unit_content (NodePtr const& tu) - { - // Visit nested translation regions - for (SyntaxTree::TranslationUnit::Iterator i = tu->begin (); - i != tu->end (); - i++) - { - (*i)->accept (this); - } - } - - void TranslationUnit:: - visit_translation_unit_post (NodePtr const& tu) - { - } - } -} diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2_Traversal.hpp b/TAO/CIAO/CCF/CCF/IDL2/IDL2_Traversal.hpp deleted file mode 100644 index 741a937a2d3..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2_Traversal.hpp +++ /dev/null @@ -1,519 +0,0 @@ -// $Id$ -#ifndef CCF_IDL2_TRAVERSAL_HPP -#define CCF_IDL2_TRAVERSAL_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CompilerElements/Traversal.hpp" -#include "CCF/IDL2/IDL2_SyntaxTreeFwd.hpp" - -namespace IDL2 -{ - namespace Traversal - { - // - // - // - struct Comma : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::CommaPtr - NodePtr; - - virtual void visit_comma (NodePtr const& s) - { - } - }; - - // - // - // - struct Declaration : virtual CCF::Traversal::Visitor - { - }; - - // - // - // - struct TypeDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::TypeDeclPtr - NodePtr; - - virtual void visit_type_decl (NodePtr const& n) - { - } - }; - - // - // - // - struct TypeDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::TypeDefPtr - NodePtr; - - virtual void visit_type_def (NodePtr const& n) - { - } - }; - - // - // - // - struct BuiltInTypeDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::BuiltInTypeDefPtr - NodePtr; - - virtual void visit_built_in_type_def (NodePtr const& n) - { - } - }; - - - // - // - // - struct Void : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::VoidPtr - NodePtr; - - virtual void visit_void (NodePtr const& n) - { - } - }; - - // - // - // - struct Long : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::LongPtr - NodePtr; - - virtual void visit_long (NodePtr const& n) - { - } - }; - - // - // - // - struct Boolean : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::BooleanPtr - NodePtr; - - virtual void visit_boolean (NodePtr const& n) - { - } - }; - - // - // - // - struct String : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::StringPtr - NodePtr; - - virtual void visit_string (NodePtr const& n) - { - } - }; - - // - // - // - struct Scope : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::ScopePtr - NodePtr; - - // visit_scope () function will never be called because Scope is - // an abstract syntax tree node. It is here for symmetry. - virtual void visit_scope (NodePtr const& s); - virtual void visit_scope_scope (NodePtr const& s); - virtual void visit_scope_pre (NodePtr const& ) {} - virtual void visit_scope_post (NodePtr const& ) {} - }; - - // - // - // - struct Module : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::ModulePtr - NodePtr; - - virtual void visit_module (NodePtr const& m); - virtual void visit_module_pre (NodePtr const& m); - virtual void visit_module_scope (NodePtr const& m); - virtual void visit_module_post (NodePtr const& m); - }; - - - // - // - // - struct InterfaceDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::InterfaceDeclPtr - NodePtr; - - virtual void visit_interface_decl (NodePtr const& i); - virtual void visit_interface_decl_pre (NodePtr const& i); - virtual void visit_interface_decl_post (NodePtr const& i); - }; - - - // - // - // - struct InterfaceDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::InterfaceDefPtr - NodePtr; - - virtual void visit_interface_def (NodePtr const& i); - virtual void visit_interface_def_pre (NodePtr const& i); - virtual void visit_interface_def_scope (NodePtr const& i); - virtual void visit_interface_def_post (NodePtr const& i); - }; - - - // - // - // - struct AbstractInterfaceDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::AbstractInterfaceDeclPtr - NodePtr; - - virtual void visit_abstract_interface_decl (NodePtr const& i); - virtual void visit_abstract_interface_decl_pre (NodePtr const& i); - virtual void visit_abstract_interface_decl_post (NodePtr const& i); - }; - - - // - // - // - struct AbstractInterfaceDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::AbstractInterfaceDefPtr - NodePtr; - - virtual void visit_abstract_interface_def (NodePtr const& i); - virtual void visit_abstract_interface_def_pre (NodePtr const& i); - virtual void visit_abstract_interface_def_scope (NodePtr const& i); - virtual void visit_abstract_interface_def_post (NodePtr const& i); - }; - - // - // - // - struct LocalInterfaceDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::LocalInterfaceDeclPtr - NodePtr; - - virtual void visit_local_interface_decl (NodePtr const& i); - virtual void visit_local_interface_decl_pre (NodePtr const& i); - virtual void visit_local_interface_decl_post (NodePtr const& i); - }; - - - // - // - // - struct LocalInterfaceDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::LocalInterfaceDefPtr - NodePtr; - - virtual void visit_local_interface_def (NodePtr const& i); - virtual void visit_local_interface_def_pre (NodePtr const& i); - virtual void visit_local_interface_def_scope (NodePtr const& i); - virtual void visit_local_interface_def_post (NodePtr const& i); - }; - - - // - // - // - struct UnconstrainedInterfaceDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::UnconstrainedInterfaceDeclPtr - NodePtr; - - virtual void visit_unconstrained_interface_decl (NodePtr const& i); - virtual void visit_unconstrained_interface_decl_pre (NodePtr const& i); - virtual void visit_unconstrained_interface_decl_post (NodePtr const& i); - }; - - - // - // - // - struct UnconstrainedInterfaceDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::UnconstrainedInterfaceDefPtr - NodePtr; - - virtual void visit_unconstrained_interface_def (NodePtr const& i); - virtual void visit_unconstrained_interface_def_pre (NodePtr const& i); - virtual void visit_unconstrained_interface_def_scope (NodePtr const& i); - virtual void visit_unconstrained_interface_def_post (NodePtr const& i); - }; - - - // - // - // - struct AttributeDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::AttributeDeclPtr - NodePtr; - - AttributeDecl (CCF::Traversal::Visitor* type = 0) - : type_ (type) - { - } - - virtual void visit_attribute_decl (NodePtr const& n); - virtual void visit_attribute_pre (NodePtr const& n); - virtual void visit_attribute_post (NodePtr const& n); - - private: - CCF::Traversal::Visitor* type_; - }; - - // - // - // - struct OperationParameter : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::OperationParameterPtr - NodePtr; - - OperationParameter (CCF::Traversal::Visitor* in, - CCF::Traversal::Visitor* out, - CCF::Traversal::Visitor* inout) - : in_ (in), out_ (out), inout_ (inout) - { - } - - OperationParameter () - : in_ (0), out_ (0), inout_ (0) - { - } - - - virtual void visit_operation_parameter (NodePtr const& op); - - virtual void visit_operation_parameter_pre (NodePtr const&) - { - } - - virtual void visit_operation_parameter_post (NodePtr const&) - { - } - - private: - CCF::Traversal::Visitor* in_; - CCF::Traversal::Visitor* out_; - CCF::Traversal::Visitor* inout_; - }; - - // - // - // - struct OperationDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::OperationDeclPtr - NodePtr; - - OperationDecl (CCF::Traversal::Visitor* type = 0) - : type_ (type) - { - } - - - virtual void visit_operation_decl (NodePtr const& n); - - virtual void visit_operation_decl_pre (NodePtr const& n); - virtual void visit_operation_decl_type (NodePtr const& n); - virtual void visit_operation_decl_name (NodePtr const& n); - virtual void visit_operation_decl_parameters (NodePtr const& n); - virtual void visit_operation_decl_post (NodePtr const& n); - - private: - CCF::Traversal::Visitor* type_; - }; - - - - // - // - // - struct FileScope : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::FileScopePtr - NodePtr; - - virtual void visit_file_scope (NodePtr const& r); - virtual void visit_file_scope_pre (NodePtr const& r); - virtual void visit_file_scope_scope (NodePtr const& r); - virtual void visit_file_scope_post (NodePtr const& r); - }; - - // - // - // - struct TranslationRegion : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::TranslationRegionPtr - NodePtr; - - virtual void visit_translation_region (NodePtr const& tr); - virtual void visit_translation_region_pre (NodePtr const& tr); - virtual void visit_translation_region_content (NodePtr const& tr); - virtual void visit_translation_region_post (NodePtr const& tr); - }; - - - // - // - // - struct IncludeTranslationRegion : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::IncludeTranslationRegionPtr - NodePtr; - - virtual void - visit_include_translation_region (NodePtr const& n); - - virtual void - visit_include_translation_region_pre (NodePtr const& n); - - virtual void - visit_include_translation_region_content (NodePtr const& n); - - virtual void - visit_include_translation_region_post (NodePtr const& n); - }; - - - // - // - // - struct SysIncludeTranslationRegion : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::SysIncludeTranslationRegionPtr - NodePtr; - - virtual void - visit_sys_include_translation_region (NodePtr const& n); - - virtual void - visit_sys_include_translation_region_pre (NodePtr const& n); - - virtual void - visit_sys_include_translation_region_content (NodePtr const& n); - - virtual void - visit_sys_include_translation_region_post (NodePtr const& n); - }; - - - // - // - // - struct ImpliedIncludeTranslationRegion : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::ImpliedIncludeTranslationRegionPtr - NodePtr; - - virtual void - visit_implied_include_translation_region (NodePtr const& n); - - virtual void - visit_implied_include_translation_region_pre (NodePtr const& n); - - virtual void - visit_implied_include_translation_region_content (NodePtr const& n); - - virtual void - visit_implied_include_translation_region_post (NodePtr const& n); - }; - - - // - // - // - struct PrincipalTranslationRegion : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::PrincipalTranslationRegionPtr - NodePtr; - - virtual void - visit_principal_translation_region (NodePtr const& n); - - virtual void - visit_principal_translation_region_pre (NodePtr const& n); - - virtual void - visit_principal_translation_region_content (NodePtr const& n); - - virtual void - visit_principal_translation_region_post (NodePtr const& n); - }; - - - // - // - // - struct TranslationUnit : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::TranslationUnitPtr - NodePtr; - - virtual void visit_translation_unit (NodePtr const& tu); - virtual void visit_translation_unit_pre (NodePtr const& tu); - virtual void visit_translation_unit_content (NodePtr const& tu); - virtual void visit_translation_unit_post (NodePtr const& tu); - }; - } -} - -#endif // CCF_IDL2_TRAVERSAL_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/MSVC_Pragmas.hpp b/TAO/CIAO/CCF/CCF/IDL2/MSVC_Pragmas.hpp deleted file mode 100644 index 724b5b52646..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/MSVC_Pragmas.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ -#ifndef MSVC_PRAGMAS_HPP -#define MSVC_PRAGMAS_HPP - - -// Various warnings that have to be disabled for MSVC. - -// 'this' : used in base member initializer list -#pragma warning(disable:4355) -// 'class1' : inherits 'class2::member' via dominance -#pragma warning(disable:4250) -// C++ Exception Specification ignored -#pragma warning(disable:4290) - - -#endif /* MSVC_PRAGMAS_HPP */
\ No newline at end of file diff --git a/TAO/CIAO/CCF/CCF/IDL2/Makefile b/TAO/CIAO/CCF/CCF/IDL2/Makefile deleted file mode 100644 index 8783e8af049..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL2/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# File : Makefile -# Author : Boris Kolpackov <boris@kolpackov.net> -# $Id$ - -root = ../../External/Utility - -include $(root)/Config/Archive.pre.rules - -cxx_translation_units := IDL2.cpp \ - IDL2_LexicalAnalyzer.cpp \ - IDL2_SyntaxTree.cpp \ - IDL2_SyntaxTree_BuiltIn.cpp \ - IDL2_Traversal.cpp - -module_base := IDL2 -module_prefix := -module_suffix := - -CXX_PREPROCESS_FLAGS += -I../.. \ - -I../../External/Utility \ - -I../../External/boost \ - -include $(root)/Config/Archive.post.rules diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3.cpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3.cpp deleted file mode 100644 index cfa1da318d3..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3.cpp +++ /dev/null @@ -1 +0,0 @@ -// $Id$ diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3.vcproj b/TAO/CIAO/CCF/CCF/IDL3/IDL3.vcproj deleted file mode 100644 index 43895adcdd2..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3.vcproj +++ /dev/null @@ -1,156 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="IDL3" - ProjectGUID="{97D61986-05D8-4B2A-B8B2-5095E58909FE}" - Keyword="Win32Proj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(ProjectDir)" - IntermediateDirectory="Debug" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="../..;../../External/Utility" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" - MinimalRebuild="TRUE" - BasicRuntimeChecks="3" - RuntimeLibrary="5" - ForceConformanceInForLoopScope="TRUE" - RuntimeTypeInfo="TRUE" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/IDL3.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - RuntimeLibrary="4" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/IDL3.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> - <File - RelativePath=".\IDL3_SyntaxTree.cpp"> - </File> - <File - RelativePath=".\IDL3_SyntaxTree_EventType.cpp"> - </File> - <File - RelativePath=".\IDL3_Traversal.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> - <File - RelativePath=".\IDL3_LexicalAnalyzer.hpp"> - </File> - <File - RelativePath=".\IDL3_Parser.hpp"> - </File> - <File - RelativePath=".\IDL3_SemanticAction.hpp"> - </File> - <File - RelativePath=".\IDL3_SemanticActionImpl.hpp"> - </File> - <File - RelativePath=".\IDL3_SyntaxTree.hpp"> - </File> - <File - RelativePath=".\IDL3_SyntaxTree_EventType.hpp"> - </File> - <File - RelativePath=".\IDL3_SyntaxTreeFwd.hpp"> - </File> - <File - RelativePath=".\IDL3_Traversal.hpp"> - </File> - <File - RelativePath=".\MSVC_Pragmas.hpp"> - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> - </Filter> - <File - RelativePath=".\ReadMe.txt"> - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_LexicalAnalyzer.hpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_LexicalAnalyzer.hpp deleted file mode 100644 index 610e047f294..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_LexicalAnalyzer.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// $Id$ -#ifndef CCF_IDL3_LEXICAL_ANALYZER_HPP -#define CCF_IDL3_LEXICAL_ANALYZER_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_LexicalAnalyzer.hpp" - -#include <string> - -namespace IDL3 -{ - class LexicalAnalyzer : public virtual IDL2::LexicalAnalyzer - { - public: - virtual - ~LexicalAnalyzer () throw () {} - - public: - - // Keywords (alphabetic order). - - KeywordPtr component; - KeywordPtr consumes; - KeywordPtr emits; - KeywordPtr eventtype; - KeywordPtr home; - KeywordPtr manages; - KeywordPtr provides; - KeywordPtr publishes; - KeywordPtr uses; - - LexicalAnalyzer (CCF::TokenStream<char>& is) - : IDL2::LexicalAnalyzer (is), - - component (new Keyword), - consumes (new Keyword), - emits (new Keyword), - eventtype (new Keyword), - home (new Keyword), - manages (new Keyword), - provides (new Keyword), - publishes (new Keyword), - uses (new Keyword) - { - keyword_table_["component"] = component; - keyword_table_["consumes" ] = consumes; - keyword_table_["emits" ] = emits; - keyword_table_["eventtype"] = eventtype; - keyword_table_["home" ] = home; - keyword_table_["manages" ] = manages; - keyword_table_["provides" ] = provides; - keyword_table_["publishes"] = publishes; - keyword_table_["uses" ] = uses; - } - }; -} - -#endif // CCF_IDL3_LEXICAL_ANALYZER_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_Parser.hpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_Parser.hpp deleted file mode 100644 index 97cade9dca1..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_Parser.hpp +++ /dev/null @@ -1,425 +0,0 @@ -// $Id$ -#ifndef CCF_IDL3_PARSER_HPP -#define CCF_IDL3_PARSER_HPP - - -#include "MSVC_Pragmas.hpp" - -#include "CCF/CompilerElements/Parser.hpp" -#include "CCF/IDL2/IDL2_Parser.hpp" -#include "CCF/IDL3/IDL3_LexicalAnalyzer.hpp" -#include "CCF/IDL3/IDL3_SemanticAction.hpp" - -namespace IDL3 -{ - class Parser : public virtual IDL2::Parser - { - public: - virtual - ~Parser () throw () {} - - protected: - - // - // Semanic action types - // - typedef - SemanticAction::Component - Component; - - typedef - SemanticAction::Provides - Provides; - - typedef - SemanticAction::Uses - Uses; - - typedef - SemanticAction::Publishes - Publishes; - - typedef - SemanticAction::Emits - Emits; - - typedef - SemanticAction::Consumes - Consumes; - - typedef - SemanticAction::EventType - EventType; - - typedef - SemanticAction::Home - Home; - - typedef - SemanticAction::HomeFactory - HomeFactory; - - // - // Primitives (alphabetic order). - // - KeywordParser COMPONENT; - KeywordParser CONSUMES; - KeywordParser EMITS; - KeywordParser EVENTTYPE; - KeywordParser HOME; - KeywordParser MANAGES; - KeywordParser PROVIDES; - KeywordParser PUBLISHES; - KeywordParser USES; - - - // - // Language - // - - Rule extension; - - // Component - Rule component_decl; - Rule component_header; - Rule component_inheritance_spec; - Rule component_support_spec; - Rule component_body; - - // Component body elements - Rule provides_decl; - Rule uses_decl; - Rule emits_decl; - Rule publishes_decl; - Rule consumes_decl; - - // Eventtype - Rule eventtype_decl; - Rule eventtype_header; - Rule eventtype_inheritance_spec; - Rule eventtype_body; - - // Home - Rule home_decl; - Rule home_header; - Rule home_inheritance_spec; - Rule home_support_spec; - Rule home_manage_spec; - Rule home_body; - - Rule home_factory_decl; - Rule home_factory_parameter_list; - Rule home_factory_parameter; - - - public: - - Parser (LexicalAnalyzer const& l, SemanticActionFactory& f) - : IDL2::Parser (l, f), - - COMPONENT (l.component), - CONSUMES (l.consumes), - EMITS (l.emits), - EVENTTYPE (l.eventtype), - HOME (l.home), - MANAGES (l.manages), - PROVIDES (l.provides), - PUBLISHES (l.publishes), - USES (l.uses), - - act_component_begin (f.component (), &Component::begin), - act_component_inherits (f.component (), &Component::inherits), - act_component_supports (f.component (), &Component::supports), - act_component_open_scope (f.component (), &Component::open_scope), - act_component_close_scope (f.component (), &Component::close_scope), - act_component_end (f.component (), &Component::end), - - act_provides_type (f.provides (), &Provides::type), - act_provides_name (f.provides (), &Provides::name), - - act_uses_type (f.uses (), &Uses::type), - act_uses_name (f.uses (), &Uses::name), - - act_publishes_type (f.publishes (), &Publishes::type), - act_publishes_name (f.publishes (), &Publishes::name), - - act_emits_type (f.emits (), &Emits::type), - act_emits_name (f.emits (), &Emits::name), - - act_consumes_type (f.consumes (), &Consumes::type), - act_consumes_name (f.consumes (), &Consumes::name), - - act_event_type_begin (f.event_type (), &EventType::begin), - act_event_type_inherits (f.event_type (), &EventType::inherits), - act_event_type_open_scope (f.event_type (), &EventType::open_scope), - act_event_type_close_scope (f.event_type (), &EventType::close_scope), - act_event_type_end (f.event_type (), &EventType::end), - - act_home_begin (f.home (), &Home::begin), - act_home_inherits (f.home (), &Home::inherits), - act_home_supports (f.home (), &Home::supports), - act_home_manages (f.home (), &Home::manages), - act_home_open_scope (f.home (), &Home::open_scope), - act_home_close_scope (f.home (), &Home::close_scope), - act_home_end (f.home (), &Home::end), - - act_home_factory_begin (f.home_factory (), &HomeFactory::begin), - act_home_factory_parameter (f.home_factory (), - &HomeFactory::parameter), - act_home_factory_end (f.home_factory (), &HomeFactory::end) - - { - IDL2::Parser::extension = - component_decl - | eventtype_decl - | home_decl - | extension - ; - - // - // Component - // - component_decl = - component_header - >> - ( - SEMI[act_component_end] - | - ( - !(COLON >> component_inheritance_spec) - >> !(SUPPORTS >> component_support_spec) - >> LBRACE[act_component_open_scope] - >> component_body - >> RBRACE[act_component_close_scope] - >> SEMI[act_component_end] - ) - ) - ; - - component_header = - COMPONENT - >> simple_identifier[act_component_begin] - ; - - component_inheritance_spec = identifier[act_component_inherits] - ; - - component_support_spec = - identifier[act_component_supports] - >> *(COMMA >> identifier[act_component_supports]) - ; - - component_body = - *( provides_decl - | uses_decl - | emits_decl - | publishes_decl - | consumes_decl - | attribute_decl - ) - ; - - // - // Component body elements - // - provides_decl = - PROVIDES - >> identifier[act_provides_type] - >> simple_identifier[act_provides_name] - >> SEMI - ; - - uses_decl = - USES - >> identifier[act_uses_type] - >> simple_identifier[act_uses_name] - >> SEMI - ; - - emits_decl = - EMITS - >> identifier[act_emits_type] - >> simple_identifier[act_emits_name] - >> SEMI - ; - - publishes_decl = - PUBLISHES - >> identifier[act_publishes_type] - >> simple_identifier[act_publishes_name] - >> SEMI - ; - - consumes_decl = - CONSUMES - >> identifier[act_consumes_type] - >> simple_identifier[act_consumes_name] - >> SEMI - ; - - // - // Eventtype - // - eventtype_decl = - eventtype_header - >> - ( - SEMI[act_event_type_end] - | - ( - !(COLON >> eventtype_inheritance_spec) - >> LBRACE[act_event_type_open_scope] -// >> eventtype_body - >> RBRACE[act_event_type_close_scope] - >> SEMI[act_event_type_end] - ) - ) - ; - - eventtype_header = - !(ABSTRACT) - >> EVENTTYPE - >> simple_identifier[act_event_type_begin] - ; - - eventtype_inheritance_spec = - identifier[act_event_type_inherits] - >> *(COMMA >> identifier[act_event_type_inherits]) - ; - - // - // Home - // - home_decl = - home_header - >> !(COLON >> home_inheritance_spec) - >> !(SUPPORTS >> home_support_spec) - >> MANAGES >> home_manage_spec - >> LBRACE[act_home_open_scope] - >> home_body - >> RBRACE[act_home_close_scope] - >> SEMI[act_home_end] - ; - - home_header = HOME >> simple_identifier[act_home_begin] - ; - - home_inheritance_spec = identifier[act_home_inherits] - ; - - home_support_spec = - identifier[act_home_supports] - >> *(COMMA >> identifier[act_home_supports]) - ; - - home_manage_spec = identifier[act_home_manages] - ; - - home_body = - *( - attribute_decl - | operation_decl - | home_factory_decl - ) - ; - - // - // Home factory - // - home_factory_decl = - FACTORY - >> simple_identifier[act_home_factory_begin] - >> LPAREN - >> home_factory_parameter_list - >> RPAREN - >> SEMI[act_home_factory_end] - ; - - home_factory_parameter_list = - *( - home_factory_parameter - >> *(COMMA >> home_factory_parameter) - ) - ; - - home_factory_parameter = - IN - >> (identifier >> simple_identifier)[act_home_factory_parameter] - ; - - } - - protected: - // - // - // - OneArgAction<SimpleIdentifierPtr, Component> act_component_begin; - OneArgAction<IdentifierPtr, Component> act_component_inherits; - OneArgAction<IdentifierPtr, Component> act_component_supports; - ScopeAction act_component_open_scope; - ScopeAction act_component_close_scope; - NoArgAction<Component> act_component_end; - - // - // Provides - // - OneArgAction<IdentifierPtr, Provides> act_provides_type; - OneArgAction<SimpleIdentifierPtr, Provides> act_provides_name; - - // - // Uses - // - OneArgAction<IdentifierPtr, Uses> act_uses_type; - OneArgAction<SimpleIdentifierPtr, Uses> act_uses_name; - - // - // Publishes - // - OneArgAction<IdentifierPtr, Publishes> act_publishes_type; - OneArgAction<SimpleIdentifierPtr, Publishes> act_publishes_name; - - // - // Emits - // - OneArgAction<IdentifierPtr, Emits> act_emits_type; - OneArgAction<SimpleIdentifierPtr, Emits> act_emits_name; - - // - // Consumes - // - OneArgAction<IdentifierPtr, Consumes> act_consumes_type; - OneArgAction<SimpleIdentifierPtr, Consumes> act_consumes_name; - - // - // - // - OneArgAction<SimpleIdentifierPtr, EventType> act_event_type_begin; - OneArgAction<IdentifierPtr, EventType> act_event_type_inherits; - ScopeAction act_event_type_open_scope; - ScopeAction act_event_type_close_scope; - NoArgAction<EventType> act_event_type_end; - - // - // - // - OneArgAction<SimpleIdentifierPtr, Home> act_home_begin; - OneArgAction<IdentifierPtr, Home> act_home_inherits; - OneArgAction<IdentifierPtr, Home> act_home_supports; - OneArgAction<IdentifierPtr, Home> act_home_manages; - ScopeAction act_home_open_scope; - ScopeAction act_home_close_scope; - NoArgAction<Home> act_home_end; - - // - // Home - // - OneArgAction<SimpleIdentifierPtr, HomeFactory> act_home_factory_begin; - TwoArgAction<IdentifierPtr, - SimpleIdentifierPtr, - HomeFactory> act_home_factory_parameter; - NoArgAction<HomeFactory> act_home_factory_end; - - }; -} - -#endif // CCF_IDL3_PARSER_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SemanticAction.hpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_SemanticAction.hpp deleted file mode 100644 index 51f21d077e3..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SemanticAction.hpp +++ /dev/null @@ -1,179 +0,0 @@ -// $Id$ -#ifndef CCF_IDL3_SEMANTIC_ACTION_HPP -#define CCF_IDL3_SEMANTIC_ACTION_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_SemanticAction.hpp" - -namespace IDL3 -{ - namespace SemanticAction - { - using namespace IDL2::SemanticAction; - - class Component : public virtual Scope - { - public: - - virtual void - begin (SimpleIdentifierPtr const& id) = 0; - - virtual void - inherits (IdentifierPtr const& id) = 0; - - virtual void - supports (IdentifierPtr const& id) = 0; - - virtual void - end () = 0; - }; - - class Provides - { - public: - virtual - ~Provides () throw () {} - - virtual void - type (IdentifierPtr const& id) = 0; - - virtual void - name (SimpleIdentifierPtr const& id) = 0; - }; - - class Uses - { - public: - virtual - ~Uses () throw () {} - - virtual void - type (IdentifierPtr const& id) = 0; - - virtual void - name (SimpleIdentifierPtr const& id) = 0; - }; - - class Publishes - { - public: - virtual - ~Publishes () throw () {} - - virtual void - type (IdentifierPtr const& id) = 0; - - virtual void - name (SimpleIdentifierPtr const& id) = 0; - }; - - class Emits - { - public: - virtual - ~Emits () throw () {} - - virtual void - type (IdentifierPtr const& id) = 0; - - virtual void - name (SimpleIdentifierPtr const& id) = 0; - }; - - class Consumes - { - public: - virtual - ~Consumes () throw () {} - - virtual void - type (IdentifierPtr const& id) = 0; - - virtual void - name (SimpleIdentifierPtr const& id) = 0; - }; - - class EventType : public virtual Scope - { - public: - - virtual void - begin (SimpleIdentifierPtr const& id) = 0; - - virtual void - inherits (IdentifierPtr const& id) = 0; - - virtual void - end () = 0; - }; - - class Home : public virtual Scope - { - public: - - virtual void - begin (SimpleIdentifierPtr const& id) = 0; - - virtual void - inherits (IdentifierPtr const& id) = 0; - - virtual void - supports (IdentifierPtr const& id) = 0; - - virtual void - manages (IdentifierPtr const& id) = 0; - - virtual void - end () = 0; - }; - - class HomeFactory - { - public: - - virtual void - begin (SimpleIdentifierPtr const& id) = 0; - - virtual void - parameter (IdentifierPtr const& type, - SimpleIdentifierPtr const& name) = 0; - - virtual void - end () = 0; - }; - } - - class SemanticActionFactory : public virtual IDL2::SemanticActionFactory - { - public: - virtual SemanticAction::Component& - component () = 0; - - virtual SemanticAction::Provides& - provides () = 0; - - virtual SemanticAction::Uses& - uses () = 0; - - virtual SemanticAction::Publishes& - publishes () = 0; - - virtual SemanticAction::Emits& - emits () = 0; - - virtual SemanticAction::Consumes& - consumes () = 0; - - virtual SemanticAction::EventType& - event_type () = 0; - - virtual SemanticAction::Home& - home () = 0; - - virtual SemanticAction::HomeFactory& - home_factory () = 0; - }; -} - -#endif // CCF_IDL3_SEMANTIC_ACTION_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SemanticActionImpl.hpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_SemanticActionImpl.hpp deleted file mode 100644 index 9cbf1c49c9b..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SemanticActionImpl.hpp +++ /dev/null @@ -1,1365 +0,0 @@ -// $Id$ -#ifndef CCF_IDL3_SEMANTIC_ACTION_IMPL_HPP -#define CCF_IDL3_SEMANTIC_ACTION_IMPL_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL3/IDL3_SyntaxTree.hpp" -#include "CCF/IDL3/IDL3_SyntaxTree_EventType.hpp" - -#include "CCF/IDL3/IDL3_SemanticAction.hpp" -#include "CCF/IDL2/IDL2_SemanticActionImpl.hpp" - -//@@ needed for include handling -#include "CCF/CompilerElements/TokenStream.hpp" -#include "CCF/CompilerElements/Preprocessor.hpp" - -namespace IDL3 -{ - namespace SemanticAction - { - namespace Impl - { - using IDL2::SemanticAction::Impl::ScopeBase; - - // Note: overriding IDL2 include to allow inclusiion of IDL3 files - // - // - class Include : public virtual SemanticAction::Include - { - public: - virtual - ~Include () throw () {} - - Include (SemanticActionFactory& action_factory, - SyntaxTree::TranslationRegionPtr const& region, - SyntaxTree::ScopePtr& scope) - : action_factory_ (action_factory), - scope_ (scope) - { - stack_.push (region); - } - - virtual void - begin (StringLiteralPtr const& sl) - { - cerr << "include \"" << sl << "\"" << endl; - - using namespace SyntaxTree; - - try - { - fs::path file_path (sl->value ()); - - if(!include_file_set_.insert (file_path).second) - { - cerr << "warning: skipping already included file \'" - << sl << "\'" << endl; - return; - } - - fs::ifstream ifs; - ifs.exceptions (ios_base::badbit | ios_base::failbit); - ifs.open (file_path, std::ios_base::in); - - //@@ for some reason ifs throws exception if I don't reset it to - // original state. It probably has something to do with call to - // get after eof. - ifs.exceptions (ios_base::iostate (0)); - - TranslationRegionPtr r ( - new IncludeTranslationRegion (file_path, - stack_.top ()->table (), - stack_.top ()->create_order ())); - - stack_.top ()->insert (r); - stack_.push (r); - - cerr << "push file scope: old scope " << scope_->order (); - - scope_ = stack_.top ()->scope (); - - cerr << "; new scope " << scope_->order () << endl; - - //@@ this code is highly experimental - CCF::InputStreamAdapter isa (ifs); - CCF::Preprocessor pp (isa); - IDL3::LexicalAnalyzer lexer (pp); - - TokenStream token_stream; - - //@@ bad token comparison - for (TokenPtr token = lexer.next (); - token.in () != lexer.eos.in (); - token = lexer.next ()) - { - token_stream.push_back (token); - } - - if (token_stream.size () != 0) - { - IDL3::Parser parser (lexer, action_factory_); - - /*bool result = */Details::parse (token_stream.begin (), - token_stream.end (), - parser.start ()); - } - - cerr << "pop file scope: old scope " << scope_->order (); - - stack_.pop (); - scope_ = stack_.top ()->scope (); - - cerr << "; new scope " << scope_->order () << endl; - } - catch (fs::filesystem_error const&) - { - cerr << sl << ": error: unable to open in read mode" << endl; - } - catch (ios_base::failure const&) - { - cerr << sl << ": error: unable to open in read mode" << endl; - } - } - - virtual void - end () - { - cerr << "end" << endl; - } - - public: - SemanticActionFactory& action_factory_; - SyntaxTree::ScopePtr& scope_; - std::stack<SyntaxTree::TranslationRegionPtr> stack_; - struct FilePathComparator - { - bool operator () (fs::path const& x, fs::path const& y) const - { - return x.string () < y.string (); - } - }; - - std::set<fs::path, FilePathComparator> include_file_set_; - }; - - - // - // - // - class Component : public virtual SemanticAction::Component, - public virtual ScopeBase<SyntaxTree::ComponentDeclPtr> - { - public: - virtual - ~Component () throw () {} - - - Component (SyntaxTree::ScopePtr& scope) - : ScopeBase<SyntaxTree::ComponentDeclPtr> (scope), - name_ (""), - inherits_ ("") - { - } - - virtual void - begin (SimpleIdentifierPtr const& id) - { - cerr << "component " << id << endl; - - name_ = SyntaxTree::SimpleName (id->value ()); - } - - virtual void - inherits (IdentifierPtr const& id) - { - cerr << "inherits " << id << endl; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct InheritancePredicate : - public DeclarationTable::ResolvePredicate - { - struct IncompatibleType : - public DeclarationTable::ResolutionFailure - { - IncompatibleType (std::string const& t) : type (t) {} - std::string type; - }; - - virtual bool - test (DeclarationPtr const& d) - throw (IncompatibleType) - { - std::string type = d->declaration_type (); - - if (type != "component") throw IncompatibleType (type); - - return strict_cast<TypeDecl> (d)->defined (); - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - inherits_ = sn; - } - catch (InheritancePredicate::IncompatibleType const& e) - { - cerr << "error: invalid inheritance specification" << endl; - - cerr << "inheritance of "; - cerr << "component \'" << name_ <<"\' from " - << e.type << " \'" << name << "\' is illegal" << endl; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid inheritance specification" << endl; - cerr << "no component with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid inheritance specification" << endl; - cerr << "no defined component with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - cerr << "inheritance from forward-declared component is illegal" - << endl; - } - } - - - virtual void - supports (IdentifierPtr const& id) - { - cerr << "supports " << id << endl; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct SupportsPredicate : - public DeclarationTable::ResolvePredicate - { - struct IncompatibleType : - public DeclarationTable::ResolutionFailure - { - IncompatibleType (std::string const& t) : type (t) {} - std::string type; - }; - - virtual bool - test (DeclarationPtr const& d) - throw (IncompatibleType) - { - std::string type = d->declaration_type (); - - // Spec doesn't say anything about which interfaces - // component can support. - if (type != "unconstrained interface") - throw IncompatibleType (type); - - return strict_cast<TypeDecl> (d)->defined (); - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - if (supports_.insert (sn).second == false) - { - cerr << "error: invalid support specification" << endl; - cerr << "directly supporting interface \'" - << sn << "\' more than once is illegal" << endl; - } - } - catch (SupportsPredicate::IncompatibleType const& e) - { - cerr << "error: invalid support specification" << endl; - - cerr << "specifying " << e.type << " \'" << name - << "\' in component\'s support clause is illegal" - << endl; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid support specification" << endl; - cerr << "no interface with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid support specification" << endl; - cerr << "no defined interface with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - cerr << "supporting forward-declared interface is illegal" - << endl; - } - } - - virtual void - open_scope () - { - using namespace SyntaxTree; - - ComponentDefPtr def; - - if (inherits_ == ScopedName ("")) - { - def = ComponentDefPtr (new ComponentDef ( - name_, - scope_, - supports_)); - } - else - { - def = ComponentDefPtr (new ComponentDef ( - name_, - scope_, - inherits_, - supports_)); - } - - scope_->insert (def); - push (def); - scope_ = def; - - name_ = SimpleName (""); //indicate that we are done - inherits_ = ScopedName (""); - supports_.clear (); - } - - virtual void - close_scope () - { - scope_ = scope_->scope (); - } - - virtual void - end () - { - cerr << "end" << endl; - - using namespace SyntaxTree; - - if (name_ != SimpleName ("")) - { - ComponentDeclPtr decl (new ComponentForwardDecl (name_, scope_)); - scope_->insert (decl); - } - else - { - pop (); - } - } - private: - SyntaxTree::SimpleName name_; - SyntaxTree::ScopedName inherits_; - SyntaxTree::ScopedNameSet supports_; - }; - - - class Provides : public virtual SemanticAction::Provides - { - public: - virtual - ~Provides () throw () {} - - Provides (SyntaxTree::ScopePtr& current) - : scope_ (current), - type_ ("") - { - } - - virtual void - type (IdentifierPtr const& id) - { - cerr << "provides " << id; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct Predicate : public DeclarationTable::ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw () - { - return strict_cast<InterfaceDecl> (d) != 0; - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - type_ = sn; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid provides declaration" << endl; - cerr << "no interface type with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid provides declaration" << endl; - cerr << "declaration with name \'" << name - << "\' visible from scope \'" << scope_->name () - << "\' is not an interface type declaration" << endl; - cerr << "using non-<interface type> in provides " - << "declaration is illegal" << endl; - } - } - - virtual void - name (SimpleIdentifierPtr const& id) - { - cerr << " " << id << endl; - - using namespace SyntaxTree; - - SimpleName name (id->value ()); - - DeclarationPtr d ( - new SyntaxTree::ProvidesDecl (name, type_, scope_)); - - scope_->insert (d); - - type_ = ScopedName (""); - } - - private: - SyntaxTree::ScopePtr& scope_; - SyntaxTree::ScopedName type_; - }; - - class Uses : public virtual SemanticAction::Uses - { - public: - virtual - ~Uses () throw () {} - - Uses (SyntaxTree::ScopePtr& current) - : scope_ (current), - type_ ("") - { - } - - virtual void - type (IdentifierPtr const& id) - { - cerr << "uses " << id; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct Predicate : public DeclarationTable::ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw () - { - return strict_cast<InterfaceDecl> (d) != 0; - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - type_ = sn; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid uses declaration" << endl; - cerr << "no interface type with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid uses declaration" << endl; - cerr << "declaration with name \'" << name - << "\' visible from scope \'" << scope_->name () - << "\' is not an interface type declaration" << endl; - cerr << "using non-<interface type> in uses " - << "declaration is illegal" << endl; - } - } - - virtual void - name (SimpleIdentifierPtr const& id) - { - cerr << " " << id << endl; - - using namespace SyntaxTree; - - SimpleName name (id->value ()); - - DeclarationPtr d ( - new SyntaxTree::UsesDecl (name, type_, scope_)); - - scope_->insert (d); - - type_ = ScopedName (""); - } - - private: - SyntaxTree::ScopePtr& scope_; - SyntaxTree::ScopedName type_; - }; - - - class Publishes : public virtual SemanticAction::Publishes - { - public: - virtual - ~Publishes () throw () {} - - Publishes (SyntaxTree::ScopePtr& current) - : scope_ (current), - type_ ("") - { - } - - virtual void - type (IdentifierPtr const& id) - { - cerr << "publishes " << id; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct Predicate : public DeclarationTable::ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw () - { - return strict_cast<EventTypeDef> (d) != 0; - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - type_ = sn; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid publishes declaration" << endl; - cerr << "no event type with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid publishes declaration" << endl; - cerr << "declaration with name \'" << name - << "\' visible from scope \'" << scope_->name () - << "\' is not a defined event type" << endl; - cerr << "using non-<defined event type> in publishes " - << "declaration is illegal" << endl; - } - } - - virtual void - name (SimpleIdentifierPtr const& id) - { - cerr << " " << id << endl; - - using namespace SyntaxTree; - - SimpleName name (id->value ()); - - DeclarationPtr d ( - new SyntaxTree::PublishesDecl (name, type_, scope_)); - - scope_->insert (d); - - type_ = ScopedName (""); - } - - private: - SyntaxTree::ScopePtr& scope_; - SyntaxTree::ScopedName type_; - }; - - class Emits : public virtual SemanticAction::Emits - { - public: - virtual - ~Emits () throw () {} - - Emits (SyntaxTree::ScopePtr& current) - : scope_ (current), - type_ ("") - { - } - - virtual void - type (IdentifierPtr const& id) - { - cerr << "emits " << id; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct Predicate : public DeclarationTable::ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw () - { - return strict_cast<EventTypeDef> (d) != 0; - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - type_ = sn; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid emits declaration" << endl; - cerr << "no event type with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid emits declaration" << endl; - cerr << "declaration with name \'" << name - << "\' visible from scope \'" << scope_->name () - << "\' is not a defined event type" << endl; - cerr << "using non-<defined event type> in emits " - << "declaration is illegal" << endl; - } - } - - virtual void - name (SimpleIdentifierPtr const& id) - { - cerr << " " << id << endl; - - using namespace SyntaxTree; - - SimpleName name (id->value ()); - - DeclarationPtr d ( - new SyntaxTree::EmitsDecl (name, type_, scope_)); - - scope_->insert (d); - - type_ = ScopedName (""); - } - - private: - SyntaxTree::ScopePtr& scope_; - SyntaxTree::ScopedName type_; - }; - - class Consumes : public virtual SemanticAction::Consumes - { - public: - virtual - ~Consumes () throw () {} - - Consumes (SyntaxTree::ScopePtr& current) - : scope_ (current), - type_ ("") - { - } - - virtual void - type (IdentifierPtr const& id) - { - cerr << "consumes " << id; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct Predicate : public DeclarationTable::ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw () - { - return strict_cast<EventTypeDef> (d) != 0; - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - type_ = sn; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid consumes declaration" << endl; - cerr << "no event type with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid consumes declaration" << endl; - cerr << "declaration with name \'" << name - << "\' visible from scope \'" << scope_->name () - << "\' is not a defined event type" << endl; - cerr << "using non-<defined event type> in consumes " - << "declaration is illegal" << endl; - } - } - - virtual void - name (SimpleIdentifierPtr const& id) - { - cerr << " " << id << endl; - - using namespace SyntaxTree; - - SimpleName name (id->value ()); - - DeclarationPtr d ( - new SyntaxTree::ConsumesDecl (name, type_, scope_)); - - scope_->insert (d); - - type_ = ScopedName (""); - } - - private: - SyntaxTree::ScopePtr& scope_; - SyntaxTree::ScopedName type_; - }; - - // - // - // - class EventType : public virtual SemanticAction::EventType, - public virtual ScopeBase<SyntaxTree::EventTypeDeclPtr> - { - public: - virtual - ~EventType () throw () {} - - EventType (SyntaxTree::ScopePtr& scope) - : ScopeBase<SyntaxTree::EventTypeDeclPtr> (scope), - name_ ("") - { - } - - public: - - virtual void - begin (SimpleIdentifierPtr const& id) - { - cerr << "eventtype " << id << endl; - name_ = SyntaxTree::SimpleName (id->value ()); - } - - virtual void - inherits (IdentifierPtr const& id) - { - cerr << "inherits " << id << endl; - } - - virtual void - open_scope () - { - using namespace SyntaxTree; - - ConcreteEventTypeDefPtr et( new ConcreteEventTypeDef ( - name_, - scope_, - inherits_)); - scope_->insert (et); - push (et); - scope_ = et; - - name_ = SimpleName (""); //indicate that we are done - inherits_.clear (); - } - - virtual void - close_scope () - { - scope_ = scope_->scope (); - } - - virtual void - end () - { - cerr << "end" << endl; - pop (); - } - - private: - SyntaxTree::SimpleName name_; - SyntaxTree::ScopedNameSet inherits_; - }; - - - // - // - // - class Home : public virtual SemanticAction::Home, - public virtual ScopeBase<SyntaxTree::HomeDefPtr> - { - public: - virtual - ~Home () throw () {} - - Home (SyntaxTree::ScopePtr& scope) - : ScopeBase<SyntaxTree::HomeDefPtr> (scope), - name_ (""), - inherits_ (""), - manages_ ("") - - { - } - - virtual void - begin (SimpleIdentifierPtr const& id) - { - cerr << "home " << id << endl; - name_ = SyntaxTree::SimpleName (id->value ()); - } - - - virtual void - inherits (IdentifierPtr const& id) - { - cerr << "inherits " << id << endl; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct InheritancePredicate : - public DeclarationTable::ResolvePredicate - { - struct IncompatibleType : - public DeclarationTable::ResolutionFailure - { - IncompatibleType (std::string const& t) : type (t) {} - std::string type; - }; - - virtual bool - test (DeclarationPtr const& d) - throw (IncompatibleType) - { - std::string type = d->declaration_type (); - - if (type != "home") throw IncompatibleType (type); - - // This is not really necessary since home cannot be - // forward-declared (yet ;-). - return strict_cast<TypeDecl> (d)->defined (); - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - inherits_ = sn; - } - catch (InheritancePredicate::IncompatibleType const& e) - { - cerr << "error: invalid inheritance specification" << endl; - - cerr << "inheritance of "; - cerr << "home \'" << name_ <<"\' from " - << e.type << " \'" << name << "\' is illegal" << endl; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid inheritance specification" << endl; - cerr << "no home with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid inheritance specification" << endl; - cerr << "no defined home with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - cerr << "inheritance from forward-declared home is illegal" - << endl; - } - } - - - virtual void - supports (IdentifierPtr const& id) - { - cerr << "supports " << id << endl; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct SupportsPredicate : - public DeclarationTable::ResolvePredicate - { - struct IncompatibleType : - public DeclarationTable::ResolutionFailure - { - IncompatibleType (std::string const& t) : type (t) {} - std::string type; - }; - - virtual bool - test (DeclarationPtr const& d) - throw (IncompatibleType) - { - std::string type = d->declaration_type (); - - // Spec doesn't say anything about which interfaces - // component can support. - if (type != "unconstrained interface") - throw IncompatibleType (type); - - return strict_cast<TypeDecl> (d)->defined (); - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - if (supports_.insert (sn).second == false) - { - cerr << "error: invalid support specification" << endl; - cerr << "directly supporting interface \'" - << sn << "\' more than once is illegal" << endl; - } - } - catch (SupportsPredicate::IncompatibleType const& e) - { - cerr << "error: invalid support specification" << endl; - - cerr << "specifying " << e.type << " \'" << name - << "\' in home\'s support clause is illegal" - << endl; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid support specification" << endl; - cerr << "no interface with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid support specification" << endl; - cerr << "no defined interface with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - cerr << "supporting forward-declared interface is illegal" - << endl; - } - } - - - virtual void - manages (IdentifierPtr const& id) - { - cerr << "manages " << id << endl; - - using namespace SyntaxTree; - - Name name (id->value ()); - - struct ManagesPredicate : - public DeclarationTable::ResolvePredicate - { - struct IncompatibleType : - public DeclarationTable::ResolutionFailure - { - IncompatibleType (std::string const& t) : type (t) {} - std::string type; - }; - - virtual bool - test (DeclarationPtr const& d) - throw (IncompatibleType) - { - std::string type = d->declaration_type (); - - if (type != "component") throw IncompatibleType (type); - - return strict_cast<TypeDecl> (d)->defined (); - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - name, - scope_->name (), - scope_->peek_order (), - p); - - manages_ = sn; - } - catch (ManagesPredicate::IncompatibleType const& e) - { - cerr << "error: invalid manages specification" << endl; - - cerr << "specifying " << e.type << " \'" << name - << "\' in home manages clause is illegal" << endl; - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid manages specification" << endl; - cerr << "no component with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid manages specification" << endl; - cerr << "no defined component with name \'" - << name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - cerr << "managing of forward-declared component is illegal" - << endl; - } - } - - virtual void - open_scope () - { - using namespace SyntaxTree; - - HomeDefPtr def (new HomeDef ( - name_, - scope_, - inherits_, - supports_, - manages_)); - - if (inherits_ == ScopedName ("")) - { - def = HomeDefPtr (new HomeDef ( - name_, - scope_, - supports_, - manages_)); - } - else - { - def = HomeDefPtr (new HomeDef ( - name_, - scope_, - inherits_, - supports_, - manages_)); - } - - - scope_->insert (def); - push (def); - scope_ = def; - - name_ = SimpleName (""); //indicate that we are done - inherits_ = ScopedName (""); - supports_.clear (); - manages_ = ScopedName (""); - } - - virtual void - close_scope () - { - scope_ = scope_->scope (); - } - - virtual void - end () - { - cerr << "end" << endl; - - using namespace SyntaxTree; - - if (name_ != SimpleName ("")) - { - // this is not supported by spec yet - } - else - { - pop (); - } - } - private: - SyntaxTree::SimpleName name_; - SyntaxTree::ScopedName inherits_; - SyntaxTree::ScopedNameSet supports_; - SyntaxTree::ScopedName manages_; - }; - - // - // - // - //@@ Name is inconsistent with HomeFactoryDecl - class HomeFactory : public virtual SemanticAction::HomeFactory - { - public: - virtual - ~HomeFactory () throw () - { - } - - HomeFactory (SyntaxTree::ScopePtr& current) - : scope_ (current) - { - } - - virtual void - begin (SimpleIdentifierPtr const& id) - { - cerr << "home factory " << id << endl; - - using namespace SyntaxTree; - - HomeDefPtr home (scope_->dynamic_type<HomeDef> ()); - - if (home == 0) - { - //@@ internal compiler error - } - - ComponentDefPtr component (home->manages ()); - - home_factory_ = HomeFactoryDeclPtr ( - new HomeFactoryDecl (SimpleName (id->value ()), - component->name (), - scope_)); - } - - virtual void - parameter (IdentifierPtr const& type_id, - SimpleIdentifierPtr const& name_id) - { - cerr << "parameter " << type_id << " " << name_id << endl; - - using namespace IDL3::SyntaxTree; - - Name type_name (type_id->value ()); - - struct Predicate : public DeclarationTable::ResolvePredicate - { - virtual bool - test (DeclarationPtr const& d) throw () - { - return strict_cast<TypeDecl> (d) != 0; - } - } p; - - try - { - ScopedName sn = scope_->table ().resolve ( - type_name, - scope_->name (), - scope_->peek_order (), - p); - - HomeFactoryParameterPtr p ( - new HomeFactoryParameter (sn, - SimpleName (name_id->value ()), - scope_->table ())); - - home_factory_->insert (p); - } - catch (DeclarationTable::NameNotFound const&) - { - cerr << "error: invalid home factory declaration" << endl; - cerr << "no type with name \'" - << type_name << "\' visible from scope \'" - << scope_->name () << "\'" << endl; - } - catch (DeclarationTable::PredicateNotMet const&) - { - cerr << "error: invalid home factory declaration" << endl; - cerr << "declaration with name \'" << type_name - << "\' visible from scope \'" << scope_->name () - << "\' is not a type declaration" << endl; - cerr << "using non-type as home factory parameter type is illegal" - << endl; - } - } - - virtual void - end () - { - cerr << "end" << endl; - scope_->insert (home_factory_); - home_factory_ = SyntaxTree::HomeFactoryDeclPtr (); - } - private: - SyntaxTree::ScopePtr& scope_; - SyntaxTree::HomeFactoryDeclPtr home_factory_; - }; - } - } - - class SemanticActionFactoryImpl : - public virtual IDL3::SemanticActionFactory, - public virtual IDL2::SemanticActionFactoryImpl - { - public: - virtual - ~SemanticActionFactoryImpl () throw () {} - - SemanticActionFactoryImpl (SyntaxTree::TranslationRegionPtr const& r) - : IDL2::SemanticActionFactoryImpl (r), - - include_ (*this, r, scope_), - component_ (scope_), - provides_ (scope_), - uses_ (scope_), - publishes_ (scope_), - emits_ (scope_), - consumes_ (scope_), - event_type_ (scope_), - home_ (scope_), - home_factory_ (scope_) - { - - } - - public: - - virtual SemanticAction::Include& - include () - { - return include_; - } - - virtual SemanticAction::Component& - component () - { - return component_; - } - - virtual SemanticAction::Provides& - provides () - { - return provides_; - } - - virtual SemanticAction::Uses& - uses () - { - return uses_; - } - - virtual SemanticAction::Publishes& - publishes () - { - return publishes_; - } - - virtual SemanticAction::Emits& - emits () - { - return emits_; - } - - virtual SemanticAction::Consumes& - consumes () - { - return consumes_; - } - - - virtual SemanticAction::EventType& - event_type () - { - return event_type_; - } - - virtual SemanticAction::Home& - home () - { - return home_; - } - - virtual SemanticAction::HomeFactory& - home_factory () - { - return home_factory_; - } - - - private: - - SemanticAction::Impl::Include include_; - - SemanticAction::Impl::Component component_; - SemanticAction::Impl::Provides provides_; - SemanticAction::Impl::Uses uses_; - SemanticAction::Impl::Publishes publishes_; - SemanticAction::Impl::Emits emits_; - SemanticAction::Impl::Consumes consumes_; - SemanticAction::Impl::EventType event_type_; - SemanticAction::Impl::Home home_; - SemanticAction::Impl::HomeFactory home_factory_; - }; -} - -#endif // CCF_IDL3_SEMANTIC_ACTION_IMPL_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree.cpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree.cpp deleted file mode 100644 index d8afe5f49e4..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree.cpp +++ /dev/null @@ -1,186 +0,0 @@ -// $Id$ -#include "IDL3_Traversal.hpp" -#include "IDL3_SyntaxTree.hpp" - -namespace IDL3 -{ - namespace SyntaxTree - { - using CCF::Traversal::try_visit; - - namespace - { - //@@ repetition of what's already in IDL2 - bool - try_visit_scope (CCF::Traversal::Visitor* v, - ScopePtr const& node) - { - return try_visit<Traversal::Scope> ( - &Traversal::Scope::visit_scope, - v, - node); - } - - bool - try_visit_component_decl (CCF::Traversal::Visitor* v, - ComponentDeclPtr const& node) - { - return try_visit<Traversal::ComponentDecl> ( - &Traversal::ComponentDecl::visit_component_decl, - v, - node); - } - } - - - // - // ComponentDecl - // - - void ComponentDecl:: - accept (CCF::Traversal::Visitor* v) - { - ComponentDeclPtr self (ReferenceCounting::add_ref (this)); - - try_visit_component_decl (v, self); - } - - // - // ComponentForwardDecl - // - - void ComponentForwardDecl:: - accept (CCF::Traversal::Visitor* v) - { - } - - // - // ComponentDef - // - - void ComponentDef:: - accept (CCF::Traversal::Visitor* v) - { - ComponentDefPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::ComponentDef> ( - &Traversal::ComponentDef::visit_component_def, - v, - self)) - { - try_visit_component_decl (v, self); - try_visit_scope (v, self); - } - } - - // - // ProvidesDecl - // - - void ProvidesDecl:: - accept (CCF::Traversal::Visitor* v) - { - ProvidesDeclPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::ProvidesDecl> ( - &Traversal::ProvidesDecl::visit_provides_decl, - v, - self); - } - - // - // UsesDecl - // - - void UsesDecl:: - accept (CCF::Traversal::Visitor* v) - { - UsesDeclPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::UsesDecl> ( - &Traversal::UsesDecl::visit_uses_decl, - v, - self); - } - - // - // PublishesDecl - // - - void PublishesDecl:: - accept (CCF::Traversal::Visitor* v) - { - PublishesDeclPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::PublishesDecl> ( - &Traversal::PublishesDecl::visit_publishes_decl, - v, - self); - } - - // - // EmitsDecl - // - - void EmitsDecl:: - accept (CCF::Traversal::Visitor* v) - { - EmitsDeclPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::EmitsDecl> ( - &Traversal::EmitsDecl::visit_emits_decl, - v, - self); - } - - // - // ConsumesDecl - // - - void ConsumesDecl:: - accept (CCF::Traversal::Visitor* v) - { - ConsumesDeclPtr self (ReferenceCounting::add_ref (this)); - try_visit<Traversal::ConsumesDecl> ( - &Traversal::ConsumesDecl::visit_consumes_decl, - v, - self); - } - - - // - // HomeDef - // - - void HomeDef:: - accept (CCF::Traversal::Visitor* v) - { - HomeDefPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::HomeDef> ( - &Traversal::HomeDef::visit_home_def, - v, - self)) - { - try_visit_scope (v, self); - } - } - - // - // HomeFactoryDecl - // - - void HomeFactoryDecl:: - accept (CCF::Traversal::Visitor* v) - { - HomeFactoryDeclPtr self (ReferenceCounting::add_ref (this)); - - if(!try_visit<Traversal::HomeFactoryDecl> ( - &Traversal::HomeFactoryDecl::visit_home_factory_decl, - v, - self)) - { - try_visit<Traversal::OperationDecl> ( - &Traversal::OperationDecl::visit_operation_decl, - v, - self); - } - } - } -} diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree.hpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree.hpp deleted file mode 100644 index 2ea652787c5..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree.hpp +++ /dev/null @@ -1,627 +0,0 @@ -// $Id$ -#ifndef CCF_IDL3_SYNTAX_TREE_HPP -#define CCF_IDL3_SYNTAX_TREE_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_SyntaxTree.hpp" - -namespace IDL3 -{ - namespace SyntaxTree - { - // Import nodes from IDL2 - using namespace IDL2::SyntaxTree; - - - // - // - // - class ComponentDecl : public virtual TypeDecl - { - public: - virtual - ~ComponentDecl () throw () {} - - ComponentDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "component"; - } - - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<ComponentDecl> - ComponentDeclPtr; - - typedef - DeclarationRef<ComponentDecl> - ComponentDeclRef; - - - // - // - // - class ComponentForwardDecl : public virtual ComponentDecl, - public virtual TypeForwardDecl - { - public: - virtual - ~ComponentForwardDecl () throw () {} - - ComponentForwardDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - ComponentDecl (name, scope), - TypeForwardDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "component"; - } - - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - - - // - // - // - class ComponentDef; - - typedef - StrictPtr<ComponentDef> - ComponentDefPtr; - - typedef - DeclarationRef<ComponentDef> - ComponentDefRef; - - class ComponentDef : public virtual TypeDef, - public virtual ComponentDecl, - public virtual Scope - { - public: - virtual - ~ComponentDef () throw () {} - - class DuplicateName {}; - - ComponentDef (SimpleName const& name, - ScopePtr const& scope, - ScopedName const& inherits, - ScopedNameSet const& supports) throw (DuplicateName) - : Declaration (name, scope), - TypeDecl (name, scope), - TypeDef (name, scope), - ComponentDecl (name, scope), - Scope (name, scope), - inherits_ (scope->table (), inherits) - { - copy_supports_list (supports); - } - - ComponentDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& supports) throw (DuplicateName) - : Declaration (name, scope), - TypeDecl (name, scope), - TypeDef (name, scope), - ComponentDecl (name, scope), - Scope (name, scope), - inherits_ (scope->table ()) - { - copy_supports_list (supports); - } - - private: - void - copy_supports_list (ScopedNameSet const& supports) - { - for (ScopedNameSet::const_iterator i = supports.begin (); - i != supports.end (); - i++) - { - if (!supports_.insert ( - InterfaceDefRef (scope ()->table (), *i)).second) - { - //@@ this never happens - throw DuplicateName (); - } - } - } - - - public: - ComponentDefRef - inherits () - { - return inherits_; - } - - - public: - - typedef - InterfaceDefRefSetName::const_iterator - Iterator; - - Iterator - supports_begin () const - { - return supports_.begin (); - } - - Iterator - supports_end () const - { - return supports_.end (); - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "component"; - } - - private: - ComponentDefRef inherits_; - InterfaceDefRefSetName supports_; - }; - - typedef - DeclarationOrderComparator<ComponentDefPtr> - ComponentDefOrderComparator; - - typedef - std::set<ComponentDefPtr, ComponentDefOrderComparator> - ComponentDefSet; - - // - // - // - class ProvidesDecl : public virtual Declaration - { - public: - virtual - ~ProvidesDecl () throw () {} - - ProvidesDecl (SimpleName const& name, - ScopedName const& type, - ScopePtr const& scope) - : Declaration (name, scope), - type_ (scope->table (), type) - { - } - - public: - InterfaceDeclPtr - type () - { - return type_.resolve (); - } - - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "provides"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - InterfaceDeclRef type_; - }; - - - // - // - // - class UsesDecl : public virtual Declaration - { - public: - virtual - ~UsesDecl () throw () {} - - UsesDecl (SimpleName const& name, - ScopedName const& type, - ScopePtr const& scope) - : Declaration (name, scope), - type_ (scope->table (), type) - - { - } - - public: - TypeDeclPtr - type () - { - return type_.resolve (); - } - - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "uses"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - TypeDeclRef type_; - }; - - - // - // - // - class PublishesDecl : public virtual Declaration - { - public: - virtual - ~PublishesDecl () throw () {} - - PublishesDecl (SimpleName const& name, - ScopedName const& type, - ScopePtr const& scope) - : Declaration (name, scope), - type_ (scope->table (), type) - { - } - - public: - TypeDeclPtr - type () - { - return type_.resolve (); - } - - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "publishes"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - TypeDeclRef type_; - }; - - - // - // - // - class EmitsDecl : public virtual Declaration - { - public: - virtual - ~EmitsDecl () throw () {} - - EmitsDecl (SimpleName const& name, - ScopedName const& type, - ScopePtr const& scope) - : Declaration (name, scope), - type_ (scope->table (), type) - { - } - - public: - TypeDeclPtr - type () - { - return type_.resolve (); - } - - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "emits"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - TypeDeclRef type_; - }; - - - // - // - // - class ConsumesDecl : public virtual Declaration - { - public: - virtual - ~ConsumesDecl () throw () {} - - ConsumesDecl (SimpleName const& name, - ScopedName const& type, - ScopePtr const& scope) - : Declaration (name, scope), - type_ (scope->table (), type) - { - } - - public: - TypeDeclPtr - type () - { - return type_.resolve (); - } - - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "consumes"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - TypeDeclRef type_; - }; - - - - // According to the spec Home cannot be forward-declared. Did they - // goof again? - you would probably think... - // - - class HomeDef; - - typedef - StrictPtr<HomeDef> - HomeDefPtr; - - typedef - DeclarationRef<HomeDef> - HomeDefRef; - - class HomeDef : public virtual TypeDef, - public virtual Scope - { - public: - virtual - ~HomeDef () throw () {} - - class DuplicateName {}; - - HomeDef (SimpleName const& name, - ScopePtr const& scope, - ScopedName const& inherits, - ScopedNameSet const& supports, - ScopedName const& manages) throw (DuplicateName) - - : Declaration (name, scope), - TypeDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope), - inherits_ (scope->table (), inherits), - manages_ (scope->table (), manages) - { - copy_supports_list (supports); - } - - HomeDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& supports, - ScopedName const& manages) throw (DuplicateName) - - : Declaration (name, scope), - TypeDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope), - inherits_ (scope->table ()), - manages_ (scope->table (), manages) - { - copy_supports_list (supports); - } - - private: - void - copy_supports_list (ScopedNameSet const& supports) - { - for (ScopedNameSet::const_iterator i = supports.begin (); - i != supports.end (); - i++) - { - if (!supports_.insert ( - InterfaceDefRef (scope ()->table (), *i)).second) - { - //@@ this never happens - throw DuplicateName (); - } - } - } - - public: - HomeDefRef - inherits () - { - return inherits_; - } - - public: - typedef - InterfaceDefRefSetName::const_iterator - Iterator; - - Iterator - supports_begin () - { - return supports_.begin (); - } - - Iterator - supports_end () - { - return supports_.end (); - } - - public: - ComponentDefPtr - manages () const - { - return manages_.resolve (); - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "home"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - - private: - HomeDefRef inherits_; - InterfaceDefRefSetName supports_; - ComponentDefRef manages_; - }; - - typedef - DeclarationOrderComparator<HomeDefPtr> - HomeDefOrderComparator; - - typedef - std::set<HomeDefPtr, HomeDefOrderComparator> - HomeDefSet; - - - // - // - // - class HomeFactoryParameter : public virtual OperationParameter - { - public: - virtual - ~HomeFactoryParameter () throw () - { - } - - HomeFactoryParameter (ScopedName type, - SimpleName name, - DeclarationTable const& table) - : OperationParameter (Direction::IN, type, name, table) - { - } - }; - - typedef - StrictPtr<HomeFactoryParameter> - HomeFactoryParameterPtr; - - // - // - // - class HomeFactoryDecl : public virtual OperationDecl - { - public: - virtual - ~HomeFactoryDecl () throw () {} - - HomeFactoryDecl (SimpleName const& name, - ScopedName const& type, - ScopePtr const& scope) - : Declaration (name, scope), - OperationDecl (name, type, scope) - { - } - - //@@ It would be nice to be able to kind of virtual override - // type () mf from OperationDecl with covariant return type - // technique. - - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "home factory"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - typedef - StrictPtr<HomeFactoryDecl> - HomeFactoryDeclPtr; - } -} - -//@@ tmp -#include "CCF/IDL3/IDL3_SyntaxTree_EventType.hpp" - -#endif // CCF_IDL3_SYNTAX_TREE_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTreeFwd.hpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTreeFwd.hpp deleted file mode 100644 index d581ad0daa5..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTreeFwd.hpp +++ /dev/null @@ -1,69 +0,0 @@ -// $Id$ -#ifndef CCF_IDL3_SYNTAX_TREE_FWD_HPP -#define CCF_IDL3_SYNTAX_TREE_FWD_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_SyntaxTreeFwd.hpp" - -namespace IDL3 -{ - namespace SyntaxTree - { - // Import all nodes of IDL2 - using namespace IDL2::SyntaxTree; - - class ComponentDecl; - typedef - StrictPtr<ComponentDecl> - ComponentDeclPtr; - - class ComponentDef; - typedef - StrictPtr<ComponentDef> - ComponentDefPtr; - - class ProvidesDecl; - typedef - StrictPtr<ProvidesDecl> - ProvidesDeclPtr; - - class UsesDecl; - typedef - StrictPtr<UsesDecl> - UsesDeclPtr; - - class PublishesDecl; - typedef - StrictPtr<PublishesDecl> - PublishesDeclPtr; - - class EmitsDecl; - typedef - StrictPtr<EmitsDecl> - EmitsDeclPtr; - - class ConsumesDecl; - typedef - StrictPtr<ConsumesDecl> - ConsumesDeclPtr; - - class HomeDef; - typedef - StrictPtr<HomeDef> - HomeDefPtr; - - class HomeFactoryDecl; - typedef - StrictPtr<HomeFactoryDecl> - HomeFactoryDeclPtr; - - //@@ should it be here or in separate file? - class ConcreteEventTypeDef; - typedef - StrictPtr<ConcreteEventTypeDef> - ConcreteEventTypeDefPtr; - } -} - -#endif // CCF_IDL3_SYNTAX_TREE_FWD_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree_EventType.cpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree_EventType.cpp deleted file mode 100644 index bd8ad6e7186..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree_EventType.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// $Id$ -#include "IDL3_Traversal.hpp" -#include "IDL3_SyntaxTree_EventType.hpp" - -namespace IDL3 -{ - namespace SyntaxTree - { - using CCF::Traversal::try_visit; - - void ConcreteEventTypeDef:: - accept (CCF::Traversal::Visitor* v) - { - ConcreteEventTypeDefPtr self (ReferenceCounting::add_ref (this)); - - try_visit<Traversal::ConcreteEventTypeDef> ( - &Traversal::ConcreteEventTypeDef::visit_concrete_event_type_def, - v, - self); - } - } -} diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree_EventType.hpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree_EventType.hpp deleted file mode 100644 index ff8004c7829..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_SyntaxTree_EventType.hpp +++ /dev/null @@ -1,215 +0,0 @@ -// $Id$ -#ifndef CCF_IDL3_SYNTAX_TREE_VALUE_HPP -#define CCF_IDL3_SYNTAX_TREE_VALUE_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_SyntaxTree_Value.hpp" - -namespace IDL3 -{ - namespace SyntaxTree - { - // Import nodes from IDL2 - using namespace IDL2::SyntaxTree; - - // - // - // - class EventTypeDecl : public virtual ValueDecl - { - public: - virtual - ~EventTypeDecl () throw () {} - - EventTypeDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - ValueDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "event type"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v) - { - } - - }; - - typedef - StrictPtr<EventTypeDecl> - EventTypeDeclPtr; - - - // - // - // - class EventTypeForwardDecl : public virtual ValueForwardDecl, - public virtual EventTypeDecl - { - public: - virtual - ~EventTypeForwardDecl () throw () {} - - EventTypeForwardDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - ValueDecl (name, scope), - TypeForwardDecl (name, scope), - ValueForwardDecl (name, scope), - EventTypeDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "event type"; - } - }; - - // - // - // - class EventTypeDef : public virtual EventTypeDecl, - public virtual ValueDef - { - public: - virtual - ~EventTypeDef () throw () {} - - EventTypeDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& inherits) - : Declaration (name, scope), - TypeDecl (name, scope), - ValueDecl (name, scope), - EventTypeDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope), - ValueDef (name, scope, inherits) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "event type"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v) - { - } - - }; - - - // - // - // - class ConcreteEventTypeDecl : public virtual EventTypeDecl - { - public: - virtual - ~ConcreteEventTypeDecl () throw () {} - - ConcreteEventTypeDecl (SimpleName const& name, - ScopePtr const& scope) - : Declaration (name, scope), - TypeDecl (name, scope), - ValueDecl (name, scope), - EventTypeDecl (name, scope) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "concrete event type"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v) - { - } - - }; - - - // - // - // - class ConcreteEventTypeDef : public virtual ConcreteEventTypeDecl, - public virtual EventTypeDef - { - public: - virtual - ~ConcreteEventTypeDef () throw () {} - - ConcreteEventTypeDef (SimpleName const& name, - ScopePtr const& scope, - ScopedNameSet const& inherits) - : Declaration (name, scope), - TypeDecl (name, scope), - ValueDecl (name, scope), - EventTypeDecl (name, scope), - ConcreteEventTypeDecl (name, scope), - TypeDef (name, scope), - Scope (name, scope), - ValueDef (name, scope, inherits), - EventTypeDef (name, scope, inherits) - { - } - - // Runtime declaration type information - public: - virtual std::string - declaration_type () - { - return "concrete event type"; - } - - // Traversal - public: - virtual void - accept (CCF::Traversal::Visitor* v); - }; - - typedef - StrictPtr<ConcreteEventTypeDef> - ConcreteEventTypeDefPtr; - - typedef - DeclarationOrderComparator<ConcreteEventTypeDefPtr> - ConcreteEventTypeDefOrderComparator; - - typedef - std::set<ConcreteEventTypeDefPtr, ConcreteEventTypeDefOrderComparator> - ConcreteEventTypeDefSet; - } -} - -#endif // CCF_IDL3_SYNTAX_TREE_VALUE_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_Traversal.cpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_Traversal.cpp deleted file mode 100644 index a69e74b54ff..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_Traversal.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// $Id$ -#include "IDL3_Traversal.hpp" - -#include "IDL3_SyntaxTree.hpp" -#include "IDL3_SyntaxTree_EventType.hpp" - -namespace IDL3 -{ - namespace Traversal - { - namespace - { - //@@ code duplication - void - iterate_scope (SyntaxTree::ScopePtr const& s, - CCF::Traversal::Visitor* v) - { - for (SyntaxTree::Scope::Iterator i = s->begin (); i != s->end (); i++) - { - (*i)->accept (v); - } - } - } - - // - // ComponentDecl - // - - void ComponentDecl:: - visit_component_decl (NodePtr const& c) - { - visit_component_decl_pre (c); - visit_component_decl_post (c); - } - - - void ComponentDecl:: - visit_component_decl_pre (NodePtr const&) - { - } - - void ComponentDecl:: - visit_component_decl_post (NodePtr const&) - { - } - - // - // ComponentDef - // - - void ComponentDef:: - visit_component_def (NodePtr const& c) - { - visit_component_def_pre (c); - visit_component_def_scope (c); - visit_component_def_post (c); - } - - - void ComponentDef:: - visit_component_def_pre (NodePtr const&) - { - } - - void ComponentDef:: - visit_component_def_scope (NodePtr const& c) - { - iterate_scope (c, this); - } - - void ComponentDef:: - visit_component_def_post (NodePtr const&) - { - } - - // - // HomeDef - // - - void HomeDef:: - visit_home_def (NodePtr const& h) - { - visit_home_def_pre (h); - visit_home_def_scope (h); - visit_home_def_post (h); - } - - void HomeDef:: - visit_home_def_pre (NodePtr const&) - { - } - - void HomeDef:: - visit_home_def_scope (NodePtr const& h) - { - iterate_scope (h, this); - } - - void HomeDef:: - visit_home_def_post (NodePtr const&) - { - } - - // - // HomeFactoryDecl - // - void HomeFactoryDecl:: - visit_home_factory_decl (NodePtr const& n) - { - visit_home_factory_decl_pre (n); - visit_home_factory_decl_type (n); - visit_home_factory_decl_name (n); - visit_home_factory_decl_parameters (n); - visit_home_factory_decl_post (n); - } - - void HomeFactoryDecl:: - visit_home_factory_decl_pre (NodePtr const& n) - { - } - - void HomeFactoryDecl:: - visit_home_factory_decl_type (NodePtr const& n) - { - if (type_) n->type ()->accept (type_); - else n->type ()->accept (this); - } - - void HomeFactoryDecl:: - visit_home_factory_decl_name (NodePtr const& n) - { - } - - void HomeFactoryDecl:: - visit_home_factory_decl_parameters (NodePtr const& n) - { - for (SyntaxTree::HomeFactoryDecl::Iterator i = n->begin (); - i != n->end (); - i++) - { - (*i)->accept (this); - - if (i + 1 != n->end ()) - { - //@@ could be HomeFactoryParameterComma - SyntaxTree::CommaPtr c (new SyntaxTree::Comma); - c->accept (this); - } - } - } - - void HomeFactoryDecl:: - visit_home_factory_decl_post (NodePtr const& n) - { - } - - // ConcreteEventTypeDef - // - // - void ConcreteEventTypeDef:: - visit_concrete_event_type_def (NodePtr const& et) - { - visit_concrete_event_type_def_pre (et); - visit_concrete_event_type_def_scope (et); - visit_concrete_event_type_def_post (et); - } - - void ConcreteEventTypeDef:: - visit_concrete_event_type_def_pre (NodePtr const&) - { - } - - void ConcreteEventTypeDef:: - visit_concrete_event_type_def_scope (NodePtr const& et) - { - iterate_scope (et, this); - } - - void ConcreteEventTypeDef:: - visit_concrete_event_type_def_post (NodePtr const&) - { - } - } -} diff --git a/TAO/CIAO/CCF/CCF/IDL3/IDL3_Traversal.hpp b/TAO/CIAO/CCF/CCF/IDL3/IDL3_Traversal.hpp deleted file mode 100644 index 0b4b53c5ed1..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/IDL3_Traversal.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// $Id$ -#ifndef CCF_IDL3_TRAVERSAL_HPP -#define CCF_IDL3_TRAVERSAL_HPP - -#include "MSVC_Pragmas.hpp" - -#include "CCF/IDL2/IDL2_Traversal.hpp" -#include "CCF/IDL3/IDL3_SyntaxTreeFwd.hpp" - -namespace IDL3 -{ - namespace Traversal - { - // Import visitors from IDL2 - using namespace IDL2::Traversal; - - // - // - // - struct ComponentDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::ComponentDeclPtr - NodePtr; - - virtual void visit_component_decl (NodePtr const& c); - virtual void visit_component_decl_pre (NodePtr const& c); - virtual void visit_component_decl_post (NodePtr const& c); - }; - - // - // - // - struct ComponentDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::ComponentDefPtr - NodePtr; - - virtual void visit_component_def (NodePtr const& c); - virtual void visit_component_def_pre (NodePtr const& c); - virtual void visit_component_def_scope (NodePtr const& c); - virtual void visit_component_def_post (NodePtr const& c); - }; - - // - // - // - struct ProvidesDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::ProvidesDeclPtr - NodePtr; - - virtual void visit_provides_decl (NodePtr const& c) - { - } - }; - - // - // - // - struct UsesDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::UsesDeclPtr - NodePtr; - - virtual void visit_uses_decl (NodePtr const& c) - { - } - }; - - // - // - // - struct PublishesDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::PublishesDeclPtr - NodePtr; - - virtual void visit_publishes_decl (NodePtr const& c) - { - } - }; - - // - // - // - struct EmitsDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::EmitsDeclPtr - NodePtr; - - virtual void visit_emits_decl (NodePtr const& c) - { - } - }; - - // - // - // - struct ConsumesDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::ConsumesDeclPtr - NodePtr; - - virtual void visit_consumes_decl (NodePtr const& c) - { - } - }; - - // - // - // - struct HomeDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::HomeDefPtr - NodePtr; - - virtual void visit_home_def (NodePtr const& h); - virtual void visit_home_def_pre (NodePtr const& h); - virtual void visit_home_def_scope (NodePtr const& h); - virtual void visit_home_def_post (NodePtr const& h); - - }; - - // - // - // - struct HomeFactoryDecl : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::HomeFactoryDeclPtr - NodePtr; - - HomeFactoryDecl (CCF::Traversal::Visitor* type = 0) - : type_ (type) - { - } - - virtual void visit_home_factory_decl (NodePtr const& n); - - virtual void visit_home_factory_decl_pre (NodePtr const& n); - virtual void visit_home_factory_decl_type (NodePtr const& n); - virtual void visit_home_factory_decl_name (NodePtr const& n); - virtual void visit_home_factory_decl_parameters (NodePtr const& n); - virtual void visit_home_factory_decl_post (NodePtr const& n); - - private: - CCF::Traversal::Visitor* type_; - }; - - // - // - // - struct ConcreteEventTypeDef : virtual CCF::Traversal::Visitor - { - typedef - SyntaxTree::ConcreteEventTypeDefPtr - NodePtr; - - virtual void visit_concrete_event_type_def (NodePtr const& et); - virtual void visit_concrete_event_type_def_pre (NodePtr const& et); - virtual void visit_concrete_event_type_def_scope (NodePtr const& et); - virtual void visit_concrete_event_type_def_post (NodePtr const& et); - }; - } -} - -#endif // CCF_IDL3_TRAVERSAL_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL3/MSVC_Pragmas.hpp b/TAO/CIAO/CCF/CCF/IDL3/MSVC_Pragmas.hpp deleted file mode 100644 index 724b5b52646..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/MSVC_Pragmas.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ -#ifndef MSVC_PRAGMAS_HPP -#define MSVC_PRAGMAS_HPP - - -// Various warnings that have to be disabled for MSVC. - -// 'this' : used in base member initializer list -#pragma warning(disable:4355) -// 'class1' : inherits 'class2::member' via dominance -#pragma warning(disable:4250) -// C++ Exception Specification ignored -#pragma warning(disable:4290) - - -#endif /* MSVC_PRAGMAS_HPP */
\ No newline at end of file diff --git a/TAO/CIAO/CCF/CCF/IDL3/Makefile b/TAO/CIAO/CCF/CCF/IDL3/Makefile deleted file mode 100644 index 6222a052c9a..00000000000 --- a/TAO/CIAO/CCF/CCF/IDL3/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# File : Makefile -# Author : Boris Kolpackov <boris@kolpackov.net> -# $Id$ - -root = ../../External/Utility - -include $(root)/Config/Archive.pre.rules - -cxx_translation_units := IDL3.cpp \ - IDL3_SyntaxTree.cpp \ - IDL3_SyntaxTree_EventType.cpp \ - IDL3_Traversal.cpp - -module_base := IDL3 -module_prefix := -module_suffix := - -CXX_PREPROCESS_FLAGS += -I../.. \ - -I../../External/Utility \ - -I../../External/boost \ - -include $(root)/Config/Archive.post.rules diff --git a/TAO/CIAO/CCF/CCF/Makefile b/TAO/CIAO/CCF/CCF/Makefile deleted file mode 100644 index d2fc5f62489..00000000000 --- a/TAO/CIAO/CCF/CCF/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# file : CCF/Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html -# cvs-id : $Id$ - -root := .. - -include $(root)/External/Utility/Config/Recursion.pre.rules - -target_makefile_list := -target_directory_list := IDL2 IDL3 CIDL CodeGenerationKit - -include $(root)/External/Utility/Config/Recursion.post.rules diff --git a/TAO/CIAO/CCF/DesignNotes b/TAO/CIAO/CCF/DesignNotes deleted file mode 100644 index b01fd452762..00000000000 --- a/TAO/CIAO/CCF/DesignNotes +++ /dev/null @@ -1,457 +0,0 @@ - -Intention of this file is to capture and document CIDL complier design -ideas/decisions. - -Conceptual parts of CIDL compiler design ----------------------------------------- - -Option Parser Consists of option parser and option - database. - -C Preprocessor Interfacing Represents mechanism of preprocessing - cidl files. - -IDL Compiler Interfacing Represents mechanism of invoking IDL - compiler. - -Scanner Scanner for preprocessed cidl file. - -Parser CIDL grammar parser. Consists of grammar - and semantic rules. - -Syntax Tree Intermediate representation of cidl file. - Consists of syntax tree nodes itself and - perhaps symbol tables. - -Semantic Analyzer Traverses Syntax Tree and performs - semantic analysis as well as some - semantic expansions. - - -Code Generation Stream Stream to output generated code to. Used - by concrete Code Generators - -Code Generators -{ - - Executor Mapping Generator Generator for local executor mapping. - - Executor Implementation Generator Generator for partial implementation - of local executor mapping. - - Skeleton Thunk Generator Generator for skeleton thunks i.e. - code that implements skeleton and - thunks user-defined functions to - executor mapping. -} - -Compiler driver Establishes order of execution of - different components as part of - compilation process. - - -How everything works together ------------------------------ - -(1) Compiler Driver executes Option Parser to populate Option Database - -(2) Compiler Driver executes C Preprocessor on a supplied cidl file - -(3) Compiler Driver executes Parser which uses Scanner to scan preprocessed - cidl file and generates Syntax Tree by means of semantic rules. - -(4) At this point we have Syntax Tree corresponding to the original cidl - file. Compiler Driver executes Executor Mapping Generator, - Executor Implementation Generator and Skeleton Thunk Generator on - Syntax Tree. - - - -General Design Ideas/Decision -------------- - -[IDEA]: There is an effort to use autoconf/automake in ACE/TAO. Maybe it's - a good idea to start using it with CIDLC? There is one side advantage - of this approach: if we decide to embed GCC CPP then we will have to - use configure (or otherwise ACE-ify the code which doesn't sound like - a right solution). - -[IDEA]: CIDLC is a prototype for a new IDLC, PSDLC and IfR model. Here are - basic concepts: - - - use common IDL grammar, semantic rules and syntax tree nodes - for IDLC, CIDLC, PSDLC and IfR. Possibly have several libraries - for example ast_idl-2.so, ast_idl-3.so, scaner_idl-2.so - scaner_idl-3.so, parser_idl-2.so, parser_idl-3.so. Dependency - graph would look like this: - - - ast_idl-2.so scanner_idl-2.so - | | - |---------------------------------| - | | | - | | | - | parser_idl-2.so | - | | | - ast_idl-3.so | scanner_idl-3.so - | | | - | | | - | | | - ---------parser_idl-3.so--------- - - Same idea applies for CIDL and PSDL. - - - - use the same internal representation (syntax tree) in all - compilers and IfR. This way at some stage if we will need - to make one of the compilers IfR-integrated (import keyword?) - then it will be a much easier task than it's now. This internal - representation may also be usable in typecodes - - @@ boris: not clear to me. - - @@ jeff: A typecode is like a piece of the Syntax Tree with these - exceptions - - - (1) There is no typecode for an IDL module. - - (2) Typecodes for interfaces and valuetypes lack some of the - information in the corresponding Syntax Tree nodes. - - With these exceptions in mind, a typecode can be composed and - traversed in the same manner as a Syntax Tree, perhaps with - different classes than used to compose the ST itself. - - @@ boris: Ok, let me see if I got it right. So when typecode - is kept in parsed state (as opposite to binary) (btw, when - does it happen?) it makes sense to apply the same techniques - (if in fact not the same ST nodes and traversal mechs) as - for XIDL compilation. - -[IDEA]: We should be consistent with the way external compilers that we call - report errors. For now those are CPP and IDLC. - -Option Parser -------------- - -[IDEA]: Use Spirit parser framework to generate option parser. - -[IDEA]: Option Database is probably a singleton. - - @@ jeff: This is a good idea, especially when passing some of the - options to a preprocessor or spawned IDL compier. But I think we - will still need 'state' classes for the front and back ends (to - hold values set by command line options and default values) so - we can keep them decoupled). - - - @@ boris: I understand what you mean. Though I think we will be - able to do with one 'runtime database'. Each 'compiler module' - will be able to populate its 'namespace' with (1) default - values, (2) with module-specific options and (3) arbitrary - runtime information. I will present prototopy design shortly. - - -[IDEA]: It seems we will have to execute at least two external programs - as part of CIDLC execution: CPP and IDLC. Why wouldn't we follow - GCC specs model (gcc -dumpspecs). Here are candidates to be put into - specs: - - - default CPP name and options - - default IDLC name and options - - default file extensions and formats for different mappings - - other ideas? - -[IDEA]: Provide short and long option names (e.g. -o and --output-dir) - for every option (maybe except -I, -D, etc). - - -C Preprocessor Interfacing --------------------------- - -[IDEA]: Embed/require GCC CPP - -[IDEA]: We need a new model of handling includes in CIDLC (as well as IDLC). - Right now I'm mentally testing a new model (thanks to Carlos for the - comments). Soon I will put the description here. - -[IDEA]: We cannot move cidl file being preprocessed to for example /tmp - as it's currently the case with IDLC. - -[IDEA]: Can we use pipes (ACE Pipes) portably to avoid temporary files? - (Kitty, you had some ideas about that?) - - - -IDL Compiler Interfacing ------------------------- - -[IDEA]: Same as for CPP: Can we use pipes? - - @@ jeff: check with Nanbor on this. I think there may be CCM/CIAO - use cases where we need the intermediate IDL file. - -[IDEA]: Will need a mechanism to pass options to IDLC from CIDLC command - line (would be nice to have this ability for CPP as well). - Something like -x in xterm? Better ideas? - - - -Scanner ------- - -[IDEA]: Use Spirit framework to construct scanner. The resulting sequence - can be sequence of objects? BTW, Spirit parser expects a "forward - iterator"-based scanner. So this basically mean that we may have to - keep the whole sequence in memory. BTW, this is another good reason - to have scanner: if we manage to make scanner a predictable parser - (i.e. no backtracking) then we don't have to keep the whole - preprocessed cidl file in memory. - - - -Parser ------- - -[IDEA]: Use Spirit framework to construct parser. - -[IDEA]: Define IDL grammar as a number of grammar capsules. This way it's - much easier to reuse/inherit even dynamically. Need to elaborate - this idea. - -[IDEA]: Use functors as semantic actions. This way we can specify (via - functor's data member) on which Syntax Tree they are working. - Bad side: semantic rules are defined during grammar construction. - However we can use a modification of the factory method pattern. - Better ideas? - - @@ jeff: I think ST node creation with a factory - is a good idea - another ST implementation could be plugged in, - as long as it uses a factory with the same method names. - - @@ boris: Right. In fact it's our 'improved' way of handling 'BE' - usecases. - - - -Syntax Tree ------------ - -[IDEA]: Use interface repository model as a base for Syntax Tree hierarchy. - -[IDEA]: Currently (in IDLC) symbol lookup is accomplished by AST navigation, - and is probably the biggest single bottleneck in performance. Perhaps - a separate symbol table would be preferable. Also, lookups could be - specialized, e.g., for declaration, for references, and perhaps a - third type for argument-related lookups. - -[NOTE]: If we are to implement symbol tables then we need to think how we - are going to inherit (extend) this tables. - -[NOTE]: Inheritance/supports graphs: these graphs need to be traversed at - several points in the back end. Currently they are rebuilt for each - use, using an n-squared algorithm. We could at least build them only - once for each interface/valuetype, perhaps even with a better - algorithm. It could be integrated into inheritance/supports error - checking at node creation time, which also be streamlined. - - @@ boris: Well, I think we should design our Syntax Tree so that - every interface/valuetype has a list (flat?) of interfaces it - inherits from/supports. - -[IDEA]: We will probably want to use factories to instantiate Syntax Tree - Nodes (STN). This will allow a concrete code generators to alter (i.e. - inherit off and extend) vanilla STNs (i.e. alternative to BE nodes - in current IDLC design). - - -Common Syntax Tree traversal Design Ideas/Decision --------------------------------------------------- - -[IDEA] If we specify Syntax Tree traversal facility then we will be able - to specify (or even plug dynamically) Syntax Tree traversal agents - that may not only generate something but also annotate or modify - Syntax Tree. We are already using this technique for a number of - features (e.g. AMI, IDL3 extension, what else?) but all these agents - are hardwired inside TAO IDLC. If we have this facility then we will - be able to produce modular and highly extensible design. Notes: - - - Some traversal agents can change Syntax Tree so that it will be - unusable by some later traversal agents. So maybe the more - generic approach would be to produce new Syntax Tree? - - @@ jeff: Yes, say for example that we were using a common ST - representation for the IDL compiler and the IFR. We would not - want to send the extra AMI nodes to the IFR so in that case - simple modification of the ST might not be best. - -[IDEA] Need a generic name for "Syntax Tree Traversal Agents". What about - "Syntax Tree Traverser"? - - -Code Generation Stream ----------------------- - -[IDEA] Use language indentation engines for code generation (like a c-mode - in emacs). The idea is that code like this - - out << "long foo (long arg0, " << endl - << " long arg1) " << endl - << "{ " << endl - << " return arg0 + arg1; " << endl - << "} " << endl; - - will result in a generated code like this: - - namespace N - { - ... - - long foo (long arg0, - long arg1) - { - return arg0 + arg1; - } - - ... - } - - Note that no special actions were taken to ensure proper indentation. - Instead the stream's indentation engine is responsible for that. - The same mech can be used for different languages (e.g. XML). - - -Code Generators ---------------- - -[IDEA] It makes sense to establish a general concept of code generators. - "Executor Mapping Generator", "Executor Implementation Generator" - and "Skeleton Thunk Generator" would be a concrete code generators. - -[IDEA] Expression evaluation: currently the result (not the expression) - is generated, which may not always be necessary. - - @@ boris: I would say may not always be correct - - - However, for purposes of type coercion and other checking (such as - for positive integer values in string, array and sequence bounds) - evaluation must be done internally. - - @@ boris: note that evaluation is needed to only verify that things - are correct. You don't have to (shouldn't?) substitute original - (const) expression with what's been evaluated. - - - @@ jeff: it may be necessary in some cases to append 'f' or 'U' to - a generated number to avoid a C++ compiler warning. - - @@ boris: shouldn't this 'f' and 'U' be in IDL as well? - -[IDEA] I wonder if it's a good idea to use a separate pass over syntax tree - for semantic checking (e.g. type coercion, positive values for - sequence bounds). - - @@ jeff: This may hurt performance a little - more lookups - but it - will improve error reporting. - - @@ boris: As we dicussed earlier this pass could be used to do - 'semantic expansions' (e.g. calculate a flat list of interface's - children, etc). Also I don't think we should worry about speed - very much here (of course I don't say we have to be stupid ;-) - In fact if we are trading better design vs faster compilation - at this stage we should always go for better design. - - -Executor Mapping Generator --------------------------- - - - -Executor Implementation Generator --------------------------------- - -[IDEA]: Translate CIDL composition to C++ namespace. - - - -Skeleton Thunk Generator ------------------------- - - - - -Compiler driver ---------------- - - - -Vault ------ - -Some thoughts from Jeff that I are not directly related to CIDLC and are -rather current IDLC design defects: - -* AMI/AMH implied IDL: more can be done in the BE preprocessing pass, - hopefully eliminating a big chunk of the huge volume of AMI/AMH visitor - code. The implied IDL generated for CCM types, for example, leaves almost - nothing extra for the visitors to do. - -* Fwd decl redefinition: forward declaration nodes all initially contain a - heap-allocated dummy full-definition member, later replaced by a copy - of the full definition. This needs to be streamlined. - -* Memory leaks: inconsistent copying/passing policies make it almost - impossible to eliminate the huge number of leaks. The front end will be - more and more reused, and it may be desirable to make it executable as a - function call, in which case it will important to eliminate the leaks. - Perhaps copying of AST nodes can be eliminated with reference counting or - just with careful management, similarly for string identifiers and literals. - Destroy() methods have been put in all the node classes, and are called - recursively from the AST root at destruction time, but they are far from - doing a complete job. - -* Visitor instantiation: the huge visitor factory has already been much - reduced, and the huge enum of context state values is being reduced. - However there will still be an abundance of switch statements at nearly - every instance of visitor creation at scope nesting. We could make better - use of polymorphism to get rid of them. - -* Node narrowing: instead of the impenetrable macros we use now, we - could either generate valuetype-like downcast methods for the (C)IDL - types, or we could just use dynamic_cast. - -* Error reporting: making error messages more informative, and error recovery - could both be a lot better, as they are in most other IDL compilers. If a - recursive descent parser is used (such as Spirit), there is a simple - generic algorithm for error recovery. - - -* FE/BE node classes: if BE node classes are implemented at all, there should - be a complete separation of concerns - BE node classes should contain only - info related to code generation, and FE node classes should contain only - info related to the AST representation. As the front end becomes more - modular and reusable, this will become more and more necessary. - - @@ boris: It doesn't seem we will need two separate and parallel hierarhies. - -* Undefined fwd decls: now that we have dropped support for platforms without - namespaces, the code generated for fwd declarations not defined in the same - translation unit can be much improved, most likely by the elimination of - generated flat-name global methods, and perhaps other improvements as well. - -* Strategized code generation: many places now have either lots of - duplication, or an explosion of branching in a single visitor. Adding code - generation for use cases incrementally may give us an opportunity to - refactor and strategize it better. - -* Node generator: this class does nothing more than call 'new' and pass - unchanged the arguments it gets to the appropriate constructor - it can be - eliminated. - -* Virtual methods: there are many member functions in the IDL compiler that - are needlessly virtual. - -* Misc. leveraging: redesign of mechanisms listed above can have an effect - on other mechanisms, such as the handling of pragma prefix, typeprefix, and - reopened modules. diff --git a/TAO/CIAO/CCF/External/Utility/Config/Archive.gcc.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Archive.gcc.post.rules deleted file mode 100644 index b43e4d01363..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Archive.gcc.post.rules +++ /dev/null @@ -1,45 +0,0 @@ -# file : Config/Archive.gcc.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - - -# -# Note: normally you wouldn't want to change anything below. -# - -FULL_MODULE_PREFIX := $(MODULE_PREFIX)$(module_prefix) -FULL_MODULE_SUFFIX := $(module_suffix)$(MODULE_SUFFIX) -MODULE := $(FULL_MODULE_PREFIX)$(module_base)$(FULL_MODULE_SUFFIX) - -# -# Pattern rules catalog. -# { - -# Defined pattern rule to build .o from .cpp -%.o : %.cpp - $(CXX) $(CXX_PREPROCESS_FLAGS) $(CXX_COMPILE_FLAGS) -MD -MP -MT $(@:.o=.d) -MF $(@:.o=.d) -c $< -o $@ - -# Defines pattern rule to build <module> from <module>.o -$(MODULE_PREFIX)$(module_prefix)%$(module_suffix)$(MODULE_SUFFIX) : %.o - $(AR) $(AR_FLAGS) $@ $^ - -# } - -# Defines the rule to build module from tarnslated c++ translation units. -$(MODULE) : $(cxx_translation_units:.cpp=.o) - -# Defines a phony target to clean all what's been generated -.PHONY : clean -clean : - -rm -f $(cxx_translation_units:.cpp=.o) - -rm -f $(cxx_translation_units:.cpp=.d) - -rm -f $(MODULE) - -rm -f *~ - -# Include dependencies for c++ translation units. --include $(cxx_translation_units:.cpp=.d) - - -# The following catch-all rule will skip unknown targets -%:: ;@: diff --git a/TAO/CIAO/CCF/External/Utility/Config/Archive.gcc.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Archive.gcc.pre.rules deleted file mode 100644 index 148f6bfbc8a..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Archive.gcc.pre.rules +++ /dev/null @@ -1,27 +0,0 @@ -# file : Config/Archive.gcc.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# Forces make to delete targets whos rebuild commands failed but -# updated the target. -.DELETE_ON_ERROR: - -# Empties the suffix list for which old-fassion implicit rules would -# be used. The net effect is that all predefined implicit rules are -# disabled now. -.SUFFIXES: - -CXX ?= g++ -CXX_DEP ?= $(CXX) -M - -CXX_PREPROCESS_FLAGS := -CXX_COMPILE_FLAGS := -Wall -CXX_LINK_FLAGS := -CXX_LINK_LIBS := - -AR ?= ar -AR_FLAGS := -rc - -MODULE_PREFIX := lib -MODULE_SUFFIX := .a diff --git a/TAO/CIAO/CCF/External/Utility/Config/Archive.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Archive.post.rules deleted file mode 100644 index 59aa7e59e91..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Archive.post.rules +++ /dev/null @@ -1,7 +0,0 @@ -# file : Config/Archive.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -include $(root)/Config/Archive.gcc.post.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Archive.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Archive.pre.rules deleted file mode 100644 index 17004f6df75..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Archive.pre.rules +++ /dev/null @@ -1,7 +0,0 @@ -# file : Config/Archive.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -include $(root)/Config/Archive.gcc.pre.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Documentation.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Documentation.post.rules deleted file mode 100644 index a4b69a2debe..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Documentation.post.rules +++ /dev/null @@ -1,35 +0,0 @@ -# file : Config/Documentation.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# -# Note: normally you wouldn't want to change anything below. -# - -# -# Pattern rules catalog. -# { - -# Defined pattern rule to build .hpp.html from .hpp -%.html : % - $(DOC) $(DOC_FLAGS) -o $@ $< - -# } - -# The following rule will inhibit treatment of documentation as -# default target. -.PHONY : all -all: ;@: - -.PHONY : documentation -documentation : $(patsubst %,%.html,$(doc_translation_units)) - -# Defines a phony target to clean all what's been generated -.PHONY : clean -clean : - -rm -f $(patsubst %,%.html,$(doc_translation_units)) - -# The following catch-all rule will skip unknown targets -%:: ;@: - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Documentation.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Documentation.pre.rules deleted file mode 100644 index 6d89b37ffda..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Documentation.pre.rules +++ /dev/null @@ -1,17 +0,0 @@ -# file : Config/Documentation.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# Forces make to delete targets whos rebuild commands failed but -# updated the target. -.DELETE_ON_ERROR: - -# Empties the suffix list for which old-fassion implicit rules would -# be used. The net effect is that all predefined implicit rules are -# disabled now. -.SUFFIXES: - -DOC ?= cpp_to_html -CXX_FLAGS := - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Executable.gcc.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Executable.gcc.post.rules deleted file mode 100644 index 548b2737661..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Executable.gcc.post.rules +++ /dev/null @@ -1,49 +0,0 @@ -# file : Config/Executable.gcc.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# -# Note: normally you wouldn't want to change anything below. -# - -FULL_MODULE_PREFIX := $(MODULE_PREFIX)$(module_prefix) -FULL_MODULE_SUFFIX := $(module_suffix)$(MODULE_SUFFIX) -MODULE := $(FULL_MODULE_PREFIX)$(module_base)$(FULL_MODULE_SUFFIX) - -# -# Pattern rules catalog. -# { - -# Defined pattern rule to build .o from .cpp -%.o : %.cpp - $(CXX) $(CXX_PREPROCESS_FLAGS) $(CXX_COMPILE_FLAGS) -MD -MP -MT $(@:.o=.d) -MF $(@:.o=.d) -c $< -o $@ - -# Defines pattern rule to build <module> from <module>.o -$(MODULE_PREFIX)$(module_prefix)%$(module_suffix)$(MODULE_SUFFIX) : %.o - $(CXX) $(CXX_LINK_FLAGS) -o $@ $^ $(CXX_LINK_LIBS) - -# } - -# Defines the rule to build module from tarnslated c++ translation units. -$(MODULE) : $(cxx_translation_units:.cpp=.o) - -# Defines a phony target to clean all what's been generated -.PHONY : clean -clean : - -rm -f $(cxx_translation_units:.cpp=.o) - -rm -f $(cxx_translation_units:.cpp=.d) - -rm -f $(MODULE) - -rm -f *~ - -# Define a phony target to invoke the test driver. -.PHONY : test -test : $(MODULE) - ./$(MODULE) - -# Include dependencies for c++ translation units. --include $(cxx_translation_units:.cpp=.d) - -# The following catch-all rule will skip unknown targets -%:: ;@: - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Executable.gcc.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Executable.gcc.pre.rules deleted file mode 100644 index 770e19f3dc9..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Executable.gcc.pre.rules +++ /dev/null @@ -1,25 +0,0 @@ -# file : Config/Executable.gcc.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# Forces make to delete targets whos rebuild commands failed but -# updated the target. -.DELETE_ON_ERROR: - -# Empties the suffix list for which old-fassion implicit rules would -# be used. The net effect is that all predefined implicit rules are -# disabled now. -.SUFFIXES: - -CXX ?= g++ - -CXX_PREPROCESS_FLAGS := -CXX_COMPILE_FLAGS := -Wall -CXX_LINK_FLAGS := -CXX_LINK_LIBS := - - -MODULE_PREFIX := -MODULE_SUFFIX := - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Executable.generic.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Executable.generic.post.rules deleted file mode 100644 index b6947246499..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Executable.generic.post.rules +++ /dev/null @@ -1,57 +0,0 @@ -# file : Config/Executable.generic.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# -# Note: normally you wouldn't want to change anything below. -# - -FULL_MODULE_PREFIX := $(MODULE_PREFIX)$(module_prefix) -FULL_MODULE_SUFFIX := $(module_suffix)$(MODULE_SUFFIX) -MODULE := $(FULL_MODULE_PREFIX)$(module_base)$(FULL_MODULE_SUFFIX) - -# -# Pattern rules catalog. -# { - -# Defines pattern rule to build .d from .cpp -%.d: %.cpp - set -e; $(CXX_DEP) $(CXX_PREPROCESS_FLAGS) $< \ - | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \ - [ -s $@ ] || rm -f $@ - - - -# Defined pattern rule to build .o from .cpp -%.o : %.cpp - $(CXX) $(CXX_PREPROCESS_FLAGS) $(CXX_COMPILE_FLAGS) -c $< -o $@ - -# Defines pattern rule to build <module> from <module>.o -$(MODULE_PREFIX)$(module_prefix)%$(module_suffix)$(MODULE_SUFFIX) : %.o - $(CXX) $(CXX_LINK_FLAGS) -o $@ $^ $(CXX_LINK_LIBS) - -# } - -# Defines the rule to build module from tarnslated c++ translation units. -$(MODULE) : $(cxx_translation_units:.cpp=.o) - -# Defines a phony target to clean all what's been generated -.PHONY : clean -clean : - -rm -f $(cxx_translation_units:.cpp=.o) - -rm -f $(cxx_translation_units:.cpp=.d) - -rm -f $(MODULE) - -rm -f *~ - -# Define a phony target to invoke the test driver. -.PHONY : test -test : $(MODULE) - ./$(MODULE) - -# Include dependencies for c++ translation units. -# Optimization: if we are cleaning there is no reason to calculate -# dependencies because they will be removed a second later. -ifneq ($(MAKECMDGOALS),clean) - include $(cxx_translation_units:.cpp=.d) -endif diff --git a/TAO/CIAO/CCF/External/Utility/Config/Executable.generic.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Executable.generic.pre.rules deleted file mode 100644 index 13cb5cdeaf9..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Executable.generic.pre.rules +++ /dev/null @@ -1,25 +0,0 @@ -# file : Config/Executable.generic.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# Forces make to delete targets whos rebuild commands failed but -# updated the target. -.DELETE_ON_ERROR: - -# Empties the suffix list for which old-fassion implicit rules would -# be used. The net effect is that all predefined implicit rules are -# disabled now. -.SUFFIXES: - -CXX ?= g++ -CXX_DEP ?= $(CXX) -M - -CXX_PREPROCESS_FLAGS := -CXX_COMPILE_FLAGS := -Wall -CXX_LINK_FLAGS := -CXX_LINK_LIBS := - - -MODULE_PREFIX := -MODULE_SUFFIX := diff --git a/TAO/CIAO/CCF/External/Utility/Config/Executable.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Executable.post.rules deleted file mode 100644 index c1850c716ee..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Executable.post.rules +++ /dev/null @@ -1,7 +0,0 @@ -# file : Config/Executable.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -include $(root)/Config/Executable.gcc.post.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Executable.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Executable.pre.rules deleted file mode 100644 index 999b6d2c26b..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Executable.pre.rules +++ /dev/null @@ -1,7 +0,0 @@ -# file : Config/Executable.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -include $(root)/Config/Executable.gcc.pre.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Recursion.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Recursion.post.rules deleted file mode 100644 index 866ad7a0b64..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Recursion.post.rules +++ /dev/null @@ -1,29 +0,0 @@ -# file : Config/Recursion.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -.PHONY: $(target_directory_list) $(target_makefile_list) - -_submodules:: $(target_directory_list) $(target_makefile_list) - -$(target_directory_list): - $(MAKE) -C $@ $(MAKECMDGOALS) - -$(target_makefile_list): - $(MAKE) --no-print-directory -f $@ $(MAKECMDGOALS) - -# These rules keep make from trying to use the match-anything rule below to -# rebuild the makefiles. -# -Makefile : ; -%.mk :: ; -%.rules :: ; - - -# Anything we don't know how to build will use this rule. The command is a -# do-nothing command, but the prerequisites ensure that the appropriate -# recursive invocations of make will occur. -# -% :: $(target_directory_list) $(target_makefile_list) ; - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Recursion.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Recursion.pre.rules deleted file mode 100644 index 4beffdcb281..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Recursion.pre.rules +++ /dev/null @@ -1,11 +0,0 @@ -# file : Config/Recursion.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -.SUFFIXES: - -.PHONY: _submodules - -_submodules:: - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Shared.gcc.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Shared.gcc.post.rules deleted file mode 100644 index e6a67627768..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Shared.gcc.post.rules +++ /dev/null @@ -1,45 +0,0 @@ -# file : Config/Shared.gcc.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - - -# -# Note: normally you wouldn't want to change anything below. -# - -FULL_MODULE_PREFIX := $(MODULE_PREFIX)$(module_prefix) -FULL_MODULE_SUFFIX := $(module_suffix)$(MODULE_SUFFIX) -MODULE := $(FULL_MODULE_PREFIX)$(module_base)$(FULL_MODULE_SUFFIX) - -# -# Pattern rules catalog. -# { - -# Defined pattern rule to build .o from .cpp -%.o : %.cpp - $(CXX) $(CXX_PREPROCESS_FLAGS) $(CXX_COMPILE_FLAGS) -MD -MP -MT $(@:.o=.d) -MF $(@:.o=.d) -c $< -o $@ - -# Defines pattern rule to build <module> from <module>.o -$(MODULE_PREFIX)$(module_prefix)%$(module_suffix)$(MODULE_SUFFIX) : %.o - $(CXX) $(CXX_LINK_FLAGS) -o $@ $^ $(CXX_LINK_LIBS) - -# } - -# Defines the rule to build module from tarnslated c++ translation units. -$(MODULE) : $(cxx_translation_units:.cpp=.o) - -# Defines a phony target to clean all what's been generated -.PHONY : clean -clean : - -rm -f $(cxx_translation_units:.cpp=.o) - -rm -f $(cxx_translation_units:.cpp=.d) - -rm -f $(MODULE) - -rm -f *~ - -# Include dependencies for c++ translation units. --include $(cxx_translation_units:.cpp=.d) - - -# The following catch-all rule will skip unknown targets -%:: ;@: diff --git a/TAO/CIAO/CCF/External/Utility/Config/Shared.gcc.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Shared.gcc.pre.rules deleted file mode 100644 index b8c83c14c23..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Shared.gcc.pre.rules +++ /dev/null @@ -1,25 +0,0 @@ -# file : Config/Shared.gcc.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# Forces make to delete targets whos rebuild commands failed but -# updated the target. -.DELETE_ON_ERROR: - -# Empties the suffix list for which old-fassion implicit rules would -# be used. The net effect is that all predefined implicit rules are -# disabled now. -.SUFFIXES: - -CXX ?= g++ -CXX_DEP ?= $(CXX) -M - -CXX_PREPROCESS_FLAGS := -CXX_COMPILE_FLAGS := -fPIC -Wall -CXX_LINK_FLAGS := -shared -CXX_LINK_LIBS := - - -MODULE_PREFIX := lib -MODULE_SUFFIX := .so diff --git a/TAO/CIAO/CCF/External/Utility/Config/Shared.generic.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Shared.generic.post.rules deleted file mode 100644 index d21cd0e5840..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Shared.generic.post.rules +++ /dev/null @@ -1,53 +0,0 @@ -# file : Config/Shared.generic.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - - -# -# Note: normally you wouldn't want to change anything below. -# - -FULL_MODULE_PREFIX := $(MODULE_PREFIX)$(module_prefix) -FULL_MODULE_SUFFIX := $(module_suffix)$(MODULE_SUFFIX) -MODULE := $(FULL_MODULE_PREFIX)$(module_base)$(FULL_MODULE_SUFFIX) - -# -# Pattern rules catalog. -# { - -# Defines pattern rule to build .d from .cpp -%.d: %.cpp - set -e; $(CXX_DEP) $(CXX_PREPROCESS_FLAGS) $< \ - | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \ - [ -s $@ ] || rm -f $@ - - - -# Defined pattern rule to build .o from .cpp -%.o : %.cpp - $(CXX) $(CXX_PREPROCESS_FLAGS) $(CXX_COMPILE_FLAGS) -c $< -o $@ - -# Defines pattern rule to build <module> from <module>.o -$(MODULE_PREFIX)$(module_prefix)%$(module_suffix)$(MODULE_SUFFIX) : %.o - $(CXX) $(CXX_LINK_FLAGS) -o $@ $^ $(CXX_LINK_LIBS) - -# } - -# Defines the rule to build module from tarnslated c++ translation units. -$(MODULE) : $(cxx_translation_units:.cpp=.o) - -# Defines a phony target to clean all what's been generated -.PHONY : clean -clean : - -rm -f $(cxx_translation_units:.cpp=.o) - -rm -f $(cxx_translation_units:.cpp=.d) - -rm -f $(MODULE) - -rm -f *~ - -# Include dependencies for c++ translation units. -# Optimization: if we are cleaning there is no reason to calculate -# dependencies because they will be removed a second later. -ifneq ($(MAKECMDGOALS),clean) - include $(cxx_translation_units:.cpp=.d) -endif diff --git a/TAO/CIAO/CCF/External/Utility/Config/Shared.generic.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Shared.generic.pre.rules deleted file mode 100644 index 71fe4be0eb4..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Shared.generic.pre.rules +++ /dev/null @@ -1,25 +0,0 @@ -# file : Config/Shared.generic.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -# Forces make to delete targets whos rebuild commands failed but -# updated the target. -.DELETE_ON_ERROR: - -# Empties the suffix list for which old-fassion implicit rules would -# be used. The net effect is that all predefined implicit rules are -# disabled now. -.SUFFIXES: - -CXX ?= g++ - -CXX_PREPROCESS_FLAGS := -CXX_COMPILE_FLAGS := -fPIC -Wall -CXX_LINK_FLAGS := -shared -CXX_LINK_LIBS := - - -MODULE_PREFIX := lib -MODULE_SUFFIX := .so - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Shared.post.rules b/TAO/CIAO/CCF/External/Utility/Config/Shared.post.rules deleted file mode 100644 index 0e00b9333a6..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Shared.post.rules +++ /dev/null @@ -1,7 +0,0 @@ -# file : Config/Shared.post.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -include $(root)/Config/Shared.gcc.post.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Shared.pre.rules b/TAO/CIAO/CCF/External/Utility/Config/Shared.pre.rules deleted file mode 100644 index 032730f684a..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Shared.pre.rules +++ /dev/null @@ -1,7 +0,0 @@ -# file : Config/Shared.pre.rules -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -include $(root)/Config/Shared.gcc.pre.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Config/Thoughts b/TAO/CIAO/CCF/External/Utility/Config/Thoughts deleted file mode 100644 index ffdd383d5fd..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Config/Thoughts +++ /dev/null @@ -1,54 +0,0 @@ - -Makefile variable naming style. - -* Each target is usually invoking one or more commands of the following type: - - (1) translator which translates target's prerequsites to target(s) - - (2) arbitrary command which doesn't create target (aka PHONY targets) - -Examples of type (1) are: - - - translation of c++ source to object code - - - translation of object code to executable/shared - -Examples of type (2) are: - - - test: terget - - - clean: target - - -Some properties of these types of targets: - - (1) - usually implemented as an implicit rule - - - sometimes the same program is used as two separate translators - (e.g. CXX is used as a compiler and as a linker) - - - - (2) - seldom (never?) implemented as an implicit rule - - - -Approach #1 - -For type (1) name is derived from the translator's name e.g. - -CXX_COMPILE_FLAGS -CXX_PREPROCESS_FLAGS -CXX_LINK_FLAGS -CXX_LINK_LIBS - -CC_ -LD_ - - -For type (2) name is derived from the target's name e.g. - -TEST_FLAGS -CLEAN_FLAGS -INSTALL_FLAGS - diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/Build.html b/TAO/CIAO/CCF/External/Utility/Documentation/Build.html deleted file mode 100644 index 5fa22bece31..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/Build.html +++ /dev/null @@ -1,99 +0,0 @@ -<!-- -$Id$ ---> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/Build.html -author : Boris Kolpackov <boris@dre.vanderbilt.edu> ---> - -<html> - -<head> - - <title>Building CCF</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="keywords" content="build,compile,make,CCF,CORBA,compiler,framework,library"/> - <meta name="description" content="CCF building instructions"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - - </style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - -<h1>Prerequisites</h1> - -<p> -In order to build CCF you will need a standard-conformant C++ compiler. -Currently you can expect CCF to compile fine with -<a href="http://gcc.gnu.org">GCC</a> and having work-around -patch<sup><a href="#sup-1">1</a></sup> applied with -<a href="http://microsoft.com">MS VC7.1</a>. -<p> - -<p> -CCF uses a number of libraries from <a href="http://boost.org">boost</a>. -So if you don't have it installed yet then you will need to -<a href="http://boost.org/more/download.html">download and build boost</a>. -In particular <code>boost::filesystem</code> and <code>boost::regex</code> -are used by CCF and require building. So if you don't want to build what -you don't need then you may just build those two libraries. -</p> - -<p> -If you are going to use a Makefile build then you will also need -<a href="http://gnu.org/software/make">GNU make</a>. -</p> - -<h1>Building with VC7.1</h1> -<p> -In order to build CCF with VC7.1 you will need to add boost include and -library paths to your search path. After having that done you can open -MSVC solution file in <code>CCF/CCF/</code> and proceed as usual. -</p> - -<h1>Building with Makefiles</h1> -<p> -Before you run <code>make</code> you will need to create a soft link in -<code>CCF/External/</code> with name <code>boost</code> to point to -your boost directory. Also inside the boost distribution you will need -to create directory <code>lib</code> and copy (or soft link) -<code>libboost_filesystem.a</code> and <code>libboost_regex.a</code> into it. -After having all this set you can run <code>make</code> in <code>CCF/</code> -to build all libraries, tests and examples. By default compiler with name -<code>g++</code> will be used. You can change this by setting environment -variable <code>CXX</code> to whatever compiler you prefer. -</p> - -<hr size="1" /> -<a name="sup-1">1.</a> If you got CCF as part of ACE+TAO source code then -all compatibility patches are already applied. - -</td> -</tr> -</table> -</div> -</body> -</html> diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Example/Makefile b/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Example/Makefile deleted file mode 100644 index f76e88812ce..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Example/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# $Id$ -# file : Documentation/ExH/Example/Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := ../../.. - -include $(root)/Config/Documentation.pre.rules - -vpath %.cpp $(root)/Example/ExH/BadCast -vpath %.cpp $(root)/Example/ExH/Compound -vpath %.cpp $(root)/Example/ExH/HelloWorld -vpath %.cpp $(root)/Example/ExH/LogicToSystem - -doc_translation_units := bad_cast.cpp \ - compound.cpp \ - hello_world.cpp \ - logic_to_system.cpp - -DOC_FLAGS := -css $(root)/Documentation/Style/CXX.css - -include $(root)/Config/Documentation.post.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Logic/Makefile b/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Logic/Makefile deleted file mode 100644 index 2d7a2213ae4..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Logic/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# $Id$ -# file : Documentation/ExH/Logic/Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := ../../.. - -include $(root)/Config/Documentation.pre.rules - -vpath %.hpp $(root)/Utility/ExH/Logic - -doc_translation_units := Exception.hpp DescriptiveException.hpp - -DOC_FLAGS := --strip-preprocessor -css $(root)/Documentation/Style/CXX.css - -include $(root)/Config/Documentation.post.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Makefile b/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Makefile deleted file mode 100644 index 6d84c4bee2b..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $Id$ -# file : Documentation/ExH/Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := ../.. - -include $(root)/Config/Recursion.pre.rules - -target_makefile_list := Makefile.documentation -target_directory_list := Logic System Example - -include $(root)/Config/Recursion.post.rules diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Makefile.documentation b/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Makefile.documentation deleted file mode 100644 index b9c4cf8845e..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/Makefile.documentation +++ /dev/null @@ -1,18 +0,0 @@ -# $Id$ -# file : Documentation/ExH/Make.doc.mk -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := ../.. - -include $(root)/Config/Documentation.pre.rules - -vpath %.hpp $(root)/Utility/ExH - -doc_translation_units := Compound.hpp - -DOC_FLAGS := --strip-preprocessor -css $(root)/Documentation/Style/CXX.css - -include $(root)/Config/Documentation.post.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/News.html b/TAO/CIAO/CCF/External/Utility/Documentation/ExH/News.html deleted file mode 100644 index c2c6df5519e..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/News.html +++ /dev/null @@ -1,60 +0,0 @@ -<!-- -// $Id$ ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/ExH/News.html -author : Boris Kolpackov <boris@kolpackov.net> -copyright : Copyright (c) 2003 Boris Kolpackov -license : http://kolpackov.net/license.html - ---> - -<html> - -<head> - - <title>ExH library news</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="copyright" content="© 2001-2003 Boris Kolpackov"/> - <meta name="keywords" content="news,C++,exception,handling,model"/> - <meta name="description" content="ExH library news"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - - </style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - -<h1>1.1.0</h1> -<ul> - <li><p>New and complete test coverage</p></li> -</ul> - - -</td> -</tr> -</table> -</div> -</body> -</html> diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/System/Makefile b/TAO/CIAO/CCF/External/Utility/Documentation/ExH/System/Makefile deleted file mode 100644 index 0966c220c8f..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/System/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# $Id$ -# file : Documentation/ExH/System/Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := ../../.. - -include $(root)/Config/Documentation.pre.rules - -vpath %.hpp $(root)/Utility/ExH/System - -doc_translation_units := Exception.hpp DescriptiveException.hpp - -DOC_FLAGS := --strip-preprocessor -css $(root)/Documentation/Style/CXX.css - -include $(root)/Config/Documentation.post.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/index.html b/TAO/CIAO/CCF/External/Utility/Documentation/ExH/index.html deleted file mode 100644 index 6ef8e522593..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ExH/index.html +++ /dev/null @@ -1,80 +0,0 @@ -<!-- -// $Id$ ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/ExH/index.html -author : Boris Kolpackov <boris@kolpackov.net> -copyright : Copyright (c) 2003 Boris Kolpackov -license : http://kolpackov.net/license.html - ---> - -<html> - -<head> - - <title>Utility::ExH</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="copyright" content="© 2001-2003 Boris Kolpackov"/> - <meta name="keywords" content="C++,utility,exception,handling,model,ExH"/> - <meta name="description" content="Utility::ExH"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - -</style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - - -<H1>Utility::ExH</H1> - -<p> -Exception Handling library was designed to promote consistent usage of -exceptions and exception handling mechanisms throughout the project. -For a quick overview of the basic idea you may want to look at these -examples:</p> - -<blockquote> - <p><a href="Example/bad_cast.cpp.html">bad_cast.cpp</a></p> - <p><a href="Example/compound.cpp.html">compound.cpp</a></p> - <p><a href="Example/hello_world.cpp.html">hello_world.cpp</a></p> - <p><a href="Example/logic_to_system.cpp.html">logic_to_system.cpp</a></p> -</blockquote> - -<p>Here are the definitions of the main blocks of the model:</p> - -<blockquote> - <p><a href="Compound.hpp.html">ExH::Compound</a></p> - <p><a href="System/Exception.hpp.html">ExH::System::Exception</a></p> - <p><a href="System/DescriptiveException.hpp.html">ExH::System::DescriptiveException</a></p> - <p><a href="Logic/Exception.hpp.html">ExH::Logic::Exception</a></p> - <p><a href="Logic/DescriptiveException.hpp.html">ExH::Logic::DescriptiveException</a></p> -</blockquote> - -</td> -</tr> -</table> -</div> -</body> -</html> diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/Makefile b/TAO/CIAO/CCF/External/Utility/Documentation/Makefile deleted file mode 100644 index f37e9b02bc0..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $Id$ -# file : Documentation/Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := .. - -include $(root)/Config/Recursion.pre.rules - -target_makefile_list := -target_directory_list := ExH ReferenceCounting Synch - -include $(root)/Config/Recursion.post.rules diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/News.html b/TAO/CIAO/CCF/External/Utility/Documentation/News.html deleted file mode 100644 index 9c6cacdb2ce..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/News.html +++ /dev/null @@ -1,69 +0,0 @@ -<!-- -// $Id$ ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/News.html -author : Boris Kolpackov <boris@kolpackov.net> -copyright : Copyright (c) 2003 Boris Kolpackov -license : http://kolpackov.net/license.html - ---> - -<html> - -<head> - - <title>Utility library news</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="copyright" content="© 2001-2003 Boris Kolpackov"/> - <meta name="keywords" content="news,C++,utility,exception,handling,model,reference,counting,thread,synchronization"/> - <meta name="description" content="Utility library news"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - - </style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - -<p>Sub-library news:</p> - -<blockquote> - <p><a href="ExH/News.html">Exception Handling Library News</a></p> - <p><a href="ReferenceCounting/News.html">Reference Counting Library News</a></p> - <p><a href="Synch/News.html">Synchronization Library News</a></p> -</blockquote> - -<h1>1.1.0</h1> -<ul> - <li><p>New directory structure</p></li> - <li><p>New dependency generation mechanism</p></li> - <li><p>Automatic documentation generation (<code>make documentation</code>)</p></li> -</ul> - -</td> -</tr> -</table> -</div> -</body> -</html> diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/Makefile b/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/Makefile deleted file mode 100644 index 347833799f5..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# $Id$ -# file : Documentation/ReferenceCounting/Make.doc.mk -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := ../.. - -include $(root)/Config/Documentation.pre.rules - -vpath %.hpp $(root)/Utility/ReferenceCounting - -doc_translation_units := DefaultImpl.hpp \ - Interface.hpp \ - SmartPtr.hpp \ - StrictPtr.hpp - -DOC_FLAGS := --strip-preprocessor -css $(root)/Documentation/Style/CXX.css - -include $(root)/Config/Documentation.post.rules diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/News.html b/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/News.html deleted file mode 100644 index a4f84d17afb..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/News.html +++ /dev/null @@ -1,108 +0,0 @@ -<!-- -// $Id$ ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/ReferenceCounting/News.html -author : Boris Kolpackov <boris@kolpackov.net> -copyright : Copyright (c) 2003 Boris Kolpackov -license : http://kolpackov.net/license.html - ---> - -<html> - -<head> - - <title>ReferenceCounting library news</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="copyright" content="© 2001-2003 Boris Kolpackov"/> - <meta name="keywords" content="news,C++,reference,counting,smart,pointer"/> - <meta name="description" content="ReferenceCounting library news"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - - </style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - -<h1>1.1.0</h1> -<ul> - <li><p>New and complete test coverage</p></li> - - <li><p> - <code><a href="SmartPtr.hpp.html">Utility::ReferenceCounting::SmartPtr</a></code>: - added - <p><code> - template<typename Other> SmartPtr (SmartPtr<Other> const&) - </code></p> - and - <p><code> - template<typename Other> operator= (SmartPtr<Other> const&) - </code></p> - </p></li> - - <li><p> - <code><a href="SmartPtr.hpp.html">Utility::ReferenceCounting::SmartPtr</a></code>: - added - <p><code> - typedef T Type; - </code></p> - to provide access to underlying type. - </p></li> - - <li><p> - <code><a href="index.html">Utility::ReferenceCounting</a></code>: - added - <p><code> - template <typename D, typename S> - D* smart_cast (SmartPtr<S> const&) - </code></p> - to provide more convenient <code>dynamic_cast</code> functionality. - </p></li> - - <li><p> - <code><a href="index.html">Utility::ReferenceCounting</a></code>: - added - <p><code> - template <typename T> - SmartPtr<T> acquire (T*) - </code></p> - </p></li> - - <li><p> - New - <code><a href="StrictPtr.hpp.html"> - Utility::ReferenceCounting::StrictPtr - </a></code> automatic pointer. - </p></li> - -</ul> - - -</td> -</tr> -</table> -</div> -</body> -</html> diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/index.html b/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/index.html deleted file mode 100644 index d2cbbb10dc0..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/ReferenceCounting/index.html +++ /dev/null @@ -1,82 +0,0 @@ -<!-- -// $Id$ ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/ReferenceCounting/index.html -author : Boris Kolpackov <boris@kolpackov.net> -copyright : Copyright (c) 2003 Boris Kolpackov -license : http://kolpackov.net/license.html - ---> - -<html> - -<head> - - <title>Utility::ReferenceCounting</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="copyright" content="© 2001-2003 Boris Kolpackov"/> - <meta name="keywords" content="C++,utility,reference,counting"/> - <meta name="description" content="Utility::ReferenceCounting"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - - </style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - - -<H1>Utility::ReferenceCounting</H1> - -<p>ReferenceCounting library provides basic building blocks for -reference-countable objects. Implementation is modelled after CORBA -IDL-to-C++ mapping's reference-countable objects and significantly -extended. - -<!-- -For a quick overview of the basic idea you -may want to look at these examples:</p> - -<blockquote> - <p><a href="Test/DefaultImpl/default_impl.cpp.html">default_impl.cpp</a></p> - <p><a href="Test/SmartPtr/smart_ptr.cpp.html">smart_ptr.cpp</a></p> -</blockquote> ---> - -<p>Here are the definitions of the key classes:</p> - -<blockquote> - <p><a href="Interface.hpp.html">ReferenceCounting::Interface</a></p> - <p><a href="DefaultImpl.hpp.html">ReferenceCounting::DefaultImpl</a></p> - <p><a href="SmartPtr.hpp.html">ReferenceCounting::SmartPtr</a></p> - <p><a href="StrictPtr.hpp.html">ReferenceCounting::StrictPtr</a></p> -</blockquote> - -</td> -</tr> -</table> -</div> -</body> -</html> - diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/Style/CXX.css b/TAO/CIAO/CCF/External/Utility/Documentation/Style/CXX.css deleted file mode 100644 index dc6b4835b64..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/Style/CXX.css +++ /dev/null @@ -1,8 +0,0 @@ -pre { BORDER-RIGHT: gray 1pt solid; PADDING-RIGHT: 2pt; BORDER-TOP: gray 1pt solid; DISPLAY: block; PADDING-LEFT: 2pt; PADDING-BOTTOM: 2pt; MARGIN-LEFT: 32pt; BORDER-LEFT: gray 1pt solid; MARGIN-RIGHT: 32pt; PADDING-TOP: 2pt; BORDER-BOTTOM: gray 1pt solid; FONT-FAMILY: "Courier New", Courier, mono; background-color: #EEEEEE; font-size: small} -.keyword { color: #000099} -.identifier { } -.comment { color: #990000} -.special { color: #800040} -.preprocessor { color: #006600} -.string { color: #666666} -.number { color: #666666} diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/Style/CXX_Blue.css b/TAO/CIAO/CCF/External/Utility/Documentation/Style/CXX_Blue.css deleted file mode 100644 index 88dbe046bc7..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/Style/CXX_Blue.css +++ /dev/null @@ -1,24 +0,0 @@ -pre { - BORDER-RIGHT: gray 1pt solid; - PADDING-RIGHT: 2pt; - BORDER-TOP: gray 1pt solid; - DISPLAY: block; - PADDING-LEFT: 2pt; - PADDING-BOTTOM: 2pt; - MARGIN-LEFT: 32pt; - BORDER-LEFT: gray 1pt solid; - MARGIN-RIGHT: 32pt; - PADDING-TOP: 2pt; - BORDER-BOTTOM: gray 1pt solid; - FONT-FAMILY: "Courier New", Courier, mono; background-color: #191970; - font-size: small -} - -.keyword { font-weight: bold; color: #afeeee} -.identifier { color: #98fb98 } -.comment { color: #add8e6} -.special { color: #bebebe} -.preprocessor { color: #7fffd4} -.string { color: #87cefa} -.number { color: #bebebe} -.literal { color: #FF0000} diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/Synch/Makefile b/TAO/CIAO/CCF/External/Utility/Documentation/Synch/Makefile deleted file mode 100644 index 63b5c86f113..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/Synch/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# $Id$ -# file : Documentation/Synch/Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := ../.. - -include $(root)/Config/Recursion.pre.rules - -target_makefile_list := -target_directory_list := Policy - -include $(root)/Config/Recursion.post.rules diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/Synch/News.html b/TAO/CIAO/CCF/External/Utility/Documentation/Synch/News.html deleted file mode 100644 index 7987453a31f..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/Synch/News.html +++ /dev/null @@ -1,60 +0,0 @@ -<!-- -// $Id$ ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/Synch/News.html -author : Boris Kolpackov <boris@kolpackov.net> -copyright : Copyright (c) 2003 Boris Kolpackov -license : http://kolpackov.net/license.html - ---> - -<html> - -<head> - - <title>Synchronization library news</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="copyright" content="© 2001-2003 Boris Kolpackov"/> - <meta name="keywords" content="news,C++,synchronization,policy,thread"/> - <meta name="description" content="Synchronization library news"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - - </style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - -<h1>1.1.0</h1> -<ul> - <li><p>New and complete test coverage</p></li> -</ul> - - -</td> -</tr> -</table> -</div> -</body> -</html> diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/Synch/Policy/Makefile b/TAO/CIAO/CCF/External/Utility/Documentation/Synch/Policy/Makefile deleted file mode 100644 index 419f63364e1..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/Synch/Policy/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# $Id$ -# file : Documentation/Synch/Policy/Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - -root := ../../.. - -include $(root)/Config/Documentation.pre.rules - -vpath %.hpp $(root)/Utility/Synch/Policy - -doc_translation_units := Null.hpp - -DOC_FLAGS := --strip-preprocessor -css $(root)/Documentation/Style/CXX.css - -include $(root)/Config/Documentation.post.rules - diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/Synch/index.html b/TAO/CIAO/CCF/External/Utility/Documentation/Synch/index.html deleted file mode 100644 index 87a7b9086fa..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/Synch/index.html +++ /dev/null @@ -1,70 +0,0 @@ -<!-- -// $Id$ ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/Synch/index.html -author : Boris Kolpackov <boris@kolpackov.net> -copyright : Copyright (c) 2003 Boris Kolpackov -license : http://kolpackov.net/license.html - ---> - -<html> - -<head> - - <title>Utility::Synch</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="copyright" content="© 2001-2003 Boris Kolpackov"/> - <meta name="keywords" content="C++,utility,thread,synchronization,policy"/> - <meta name="description" content="Utility::Synch"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - -</style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - -<H1>Utility::Synch</H1> - -<p> -Synchronization library provides a compile-time policy-based configurable -facility of selecting synchronization mechanisms. For now there is only -no-op synchronization policy provided which is suitable only for -single-threaded applications. However it shouldn't be difficult to porvide -a wrapper policy for synchronization mechanisms used in a particular project. -</p> - -<p>Here are the definitions of the key classes:</p> - -<blockquote> - <p><a href="Policy/Null.hpp.html">Synch::Policy::Null</a></p> -</blockquote> - -</td> -</tr> -</table> -</div> -</body> -</html> diff --git a/TAO/CIAO/CCF/External/Utility/Documentation/index.html b/TAO/CIAO/CCF/External/Utility/Documentation/index.html deleted file mode 100644 index be5667c86f8..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Documentation/index.html +++ /dev/null @@ -1,92 +0,0 @@ -<!-- -// $Id$ ---> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- - -file : Documentation/index.html -author : Boris Kolpackov <boris@kolpackov.net> -copyright : Copyright (c) 2003 Boris Kolpackov -license : http://kolpackov.net/license.html - ---> - -<html> - -<head> - - <title>Utility library</title> - - <meta name="author" content="Boris Kolpackov"/> - <meta name="copyright" content="© 2001-2003 Boris Kolpackov"/> - <meta name="keywords" content="C++,utility,exception,handling,model,reference,counting,thread,synchronization"/> - <meta name="description" content="Utility library"/> - <meta http-equiv="Content-Language" content="en"/> - - <style type="text/css"> - body { - font-family : arial,sans-serif; - font-size : 10pt; - } - - h1 { - font-size : 12pt; - } - - </style> - -</head> - -<body> - -<div align="center"> -<table width="700" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td> - -<p> -Utility library is a place for generic C++ facilities that I found useful -in more than one project. - -Here you can download the -<a href="http://kolpackov.net/projects/Utility/Download.html"> -latest version of the library</a>. - -Licensing information is provided as a separate page, -<a href="http://kolpackov.net/license.html">license</a>. - -For updates check out <a href="News.html">news section</a>.</p> - -<H1>Supported Platforms</H1> - -<p> -For the time being I test Utility library with at least GNU G++ on Linux and -Compaq (Digital) C++ (-std strict_ansi) on Tru64 UNIX. It also should compile -and work fine with any decent C++ compiler. Also note that I don't have any -plans to bloat source code in attempt to support broken compilers.</p> - -<H1>How to Build</H1> - -<p> -Utility library itself consists of header and inline files so you don't actually need -to build anything to start using it. In order to build tests or examples -you will need at least GNU make.</p> - -<H1>Content</H1> - -<p>Currently Utility library contains the following sub-libraries:</p> - -<blockquote> - <p><a href="ExH/index.html">Exception Handling Library (Utility::ExH)</a></p> - <p><a href="ReferenceCounting/index.html">Reference Counting Library (Utility::ReferenceCounting)</a></p> - <p><a href="Synch/index.html">Synchronization Library (Utility::Synch)</a></p> -</blockquote> - -</td> -</tr> -</table> -</div> -</body> -</html> diff --git a/TAO/CIAO/CCF/External/Utility/Makefile b/TAO/CIAO/CCF/External/Utility/Makefile deleted file mode 100644 index 7bb7e798d31..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $Id$ -# file : Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html - - -root := . - -include $(root)/Config/Recursion.pre.rules - -target_makefile_list := -target_directory_list := Test Example Documentation - -include $(root)/Config/Recursion.post.rules diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Compound.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/Compound.hpp deleted file mode 100644 index e0c2487274c..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Compound.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// file : Utility/ExH/Compound.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_COMPOUND_HPP -#define UTILITY_EX_H_COMPOUND_HPP - -namespace Utility -{ - namespace ExH - { - template <typename Type, typename Base> - class Compound : public virtual Base - { - public: - explicit - Compound (char const* description) throw (); - - template <typename T> - explicit - Compound (T const& description) throw (); - - Compound (Compound const& src) throw (); - - virtual - ~Compound () throw (); - - public: - Compound& - operator= (Compound const& src) throw (); - - protected: - Compound () throw (); - }; - } -} - -#include "Utility/ExH/Compound.tpp" - -#endif // UTILITY_EX_H_COMPOUND_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Compound.tpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/Compound.tpp deleted file mode 100644 index 54122eba980..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Compound.tpp +++ /dev/null @@ -1,57 +0,0 @@ -// file : Utility/ExH/Compound.tpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#include "Utility/ExH/Converter.hpp" - -namespace Utility -{ - namespace ExH - { - // c-tor's & d-tor - template <typename Type, typename Base> - Compound<Type, Base>:: - Compound () throw () - { - } - - template <typename Type, typename Base> - Compound<Type, Base>:: - Compound (char const* description) throw () - { - Base::init (description); - } - - template <typename Type, typename Base> - template <typename T> - Compound<Type, Base>:: - Compound (T const& description) throw () - { - Base::init (converter<T> (description)); - } - - template <typename Type, typename Base> - Compound<Type, Base>:: - Compound (Compound const& src) throw () - { - Base::init (src.what ()); - } - - template <typename Type, typename Base> - Compound<Type, Base>:: - ~Compound () throw () - { - } - - // operator= - - template <typename Type, typename Base> - Compound<Type, Base>& Compound<Type, Base>:: - operator= (Compound const& src) throw () - { - Base::init (src.what ()); - return *this; - } - } -} diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Converter.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/Converter.hpp deleted file mode 100644 index 399c5931fab..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Converter.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// file : Utility/ExH/Converter.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_CONVERTER_HPP -#define UTILITY_EX_H_CONVERTER_HPP - -namespace Utility -{ - namespace ExH - { - template <typename T> - char const* - converter (T const& t) throw (); - } -} - -#include "Utility/ExH/Converter.tpp" - -#endif // UTILITY_EX_H_CONVERTER_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Converter.tpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/Converter.tpp deleted file mode 100644 index 018776cad71..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Converter.tpp +++ /dev/null @@ -1,19 +0,0 @@ -// file : Utility/ExH/Converter.tpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ExH - { - template <typename T> - char const* - converter (T const& t) throw () - { - // Default implementation just assumes that implicit converion exist. - return t; - } - } -} - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/ExH.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/ExH.hpp deleted file mode 100644 index 8e41c822cab..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/ExH.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// file : Utility/ExH/ExH.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_EX_H_HPP -#define UTILITY_EX_H_EX_H_HPP - -#include "Utility/ExH/System/Exception.hpp" -#include "Utility/ExH/System/DescriptiveException.hpp" - -#include "Utility/ExH/Logic/Exception.hpp" -#include "Utility/ExH/Logic/DescriptiveException.hpp" - -#include "Utility/ExH/Compound.hpp" - -#include "Utility/ExH/Converter.hpp" -#include "Utility/ExH/StringConverter.hpp" -#include "Utility/ExH/StringStreamConverter.hpp" - -#endif // UTILITY_EX_H_EX_H_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/DescriptiveException.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/DescriptiveException.hpp deleted file mode 100644 index e7852690ebc..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/DescriptiveException.hpp +++ /dev/null @@ -1,60 +0,0 @@ -// file : Utility/ExH/Logic/DescriptiveException.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_LOGIC_DESCRIPTIVE_EXCEPTION_HPP -#define UTILITY_EX_H_LOGIC_DESCRIPTIVE_EXCEPTION_HPP - -#include <memory> -#include <string> - - -#include "Utility/ExH/Logic/Exception.hpp" - -namespace Utility -{ - namespace ExH - { - namespace Logic - { - class DescriptiveException : public virtual Exception - { - public: - explicit - DescriptiveException (char const* description) throw (); - - template <typename T> - explicit - DescriptiveException (T const& description) throw (); - - DescriptiveException (DescriptiveException const& src) throw (); - - virtual - ~DescriptiveException () throw (); - - DescriptiveException& - operator= (DescriptiveException const& src) throw (); - - protected: - DescriptiveException () throw (); - - void - init (char const* description) throw (); - - public: - virtual char const* - what () const throw (); - - private: - std::auto_ptr<std::string> description_; - }; - } - } -} - -#include "Utility/ExH/Logic/DescriptiveException.ipp" - -#endif // UTILITY_EX_H_LOGIC_DESCRIPTIVE_EXCEPTION_HPP - - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/DescriptiveException.ipp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/DescriptiveException.ipp deleted file mode 100644 index 44cce34f59a..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/DescriptiveException.ipp +++ /dev/null @@ -1,101 +0,0 @@ -// file : Utility/ExH/Logic/DescriptiveException.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#include "Utility/ExH/Converter.hpp" - -namespace Utility -{ - namespace ExH - { - namespace Logic - { - // c-tor's & d-tor - - inline DescriptiveException:: - DescriptiveException () throw () - { - } - - inline DescriptiveException:: - DescriptiveException (char const* description) throw () - { - init (description); - } - - template <typename T> - DescriptiveException:: - DescriptiveException (T const& description) throw () - { - init (converter<T> (description)); - } - - inline DescriptiveException:: - DescriptiveException (DescriptiveException const& src) throw () - { - init (src.what ()); - } - - inline DescriptiveException:: - ~DescriptiveException () throw () - { - } - - inline DescriptiveException& DescriptiveException:: - operator= (DescriptiveException const& src) throw () - { - init (src.what ()); - return *this; - } - - - // accessors / modifiers - - inline void - DescriptiveException::init (char const* description) throw () - { - try - { - if (description == 0 || description[0] == '\0') - { - description_.reset (0); - } - else - { - if (description_.get () != 0) - { - *description_ = description; - } - else - { - description_.reset (new std::string (description)); - } - } - } - catch (...) - { - description_.reset (0); - } - } - - inline char const* - DescriptiveException::what () const throw () - { - try - { - if (description_.get () != 0) - { - return description_->c_str (); - } - } - catch (...) - { - } - - return Exception::what (); - } - } - } -} - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/Exception.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/Exception.hpp deleted file mode 100644 index 711caea3587..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/Exception.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// file : Utility/ExH/Logic/Exception.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_LOGIC_EXCEPTION_HPP -#define UTILITY_EX_H_LOGIC_EXCEPTION_HPP - -#include "Utility/ExH/System/Exception.hpp" - -namespace Utility -{ - namespace ExH - { - namespace Logic - { - - // Logic::Exception inherits from System::Exception for the - // following reason. Semantically for some part of the - // system particular instance of Logic::Exception may seem as - // opaque System::Exception and the only way to handle it would - // be to propagate it further. In other words Logic::Exception - // can be seemlesly "converted" to System::Exception if there is - // no part of the system interested in handling it. - // - - class Exception : public virtual System::Exception - { - public: - virtual - ~Exception () throw (); - }; - } - } -} - -#include "Utility/ExH/Logic/Exception.ipp" - -#endif // UTILITY_EX_H_LOGIC_EXCEPTION_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/Exception.ipp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/Exception.ipp deleted file mode 100644 index 84fc99e8d2c..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/Logic/Exception.ipp +++ /dev/null @@ -1,19 +0,0 @@ -// file : Utility/ExH/Logic/Exception.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ExH - { - namespace Logic - { - inline Exception:: - ~Exception () throw () - { - } - } - } -} - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringConverter.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringConverter.hpp deleted file mode 100644 index 279ccbfaf60..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringConverter.hpp +++ /dev/null @@ -1,26 +0,0 @@ -// file : Utility/ExH/StringConverter.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_STRING_CONVERTER_HPP -#define UTILITY_EX_H_STRING_CONVERTER_HPP - -#include <string> - -#include "Utility/ExH/Converter.hpp" - -namespace Utility -{ - namespace ExH - { - template <> - char const* - converter (std::string const& t) throw (); - } -} - -#include "Utility/ExH/StringConverter.ipp" - -#endif // UTILITY_EX_H_STRING_CONVERTER_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringConverter.ipp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringConverter.ipp deleted file mode 100644 index 4703d47da17..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringConverter.ipp +++ /dev/null @@ -1,17 +0,0 @@ -// file : Utility/ExH/StringConverter.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ExH - { - template <> - inline char const* - converter (std::string const& t) throw () - { - return t.c_str (); - } - } -} diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringStreamConverter.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringStreamConverter.hpp deleted file mode 100644 index 8882bd69690..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringStreamConverter.hpp +++ /dev/null @@ -1,26 +0,0 @@ -// file : Utility/ExH/StringStreamConverter.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_STRING_STREAM_CONVERTER_HPP -#define UTILITY_EX_H_STRING_STREAM_CONVERTER_HPP - -#include <sstream> - -#include "Utility/ExH/Converter.hpp" - -namespace Utility -{ - namespace ExH - { - template <> - char const* - converter (std::ostringstream const& t) throw (); - } -} - -#include "Utility/ExH/StringStreamConverter.ipp" - -#endif // UTILITY_EX_H_STRING_STREAM_CONVERTER_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringStreamConverter.ipp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringStreamConverter.ipp deleted file mode 100644 index 9c1e7f14489..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/StringStreamConverter.ipp +++ /dev/null @@ -1,19 +0,0 @@ -// file : Utility/ExH/StringStreamConverter.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ExH - { - template <> - inline char const* - converter (std::ostringstream const& t) throw () - { - return t.str ().c_str (); - } - - } -} - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/DescriptiveException.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/DescriptiveException.hpp deleted file mode 100644 index 0f58f10f30e..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/DescriptiveException.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// file : Utility/ExH/System/DescriptiveException.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_SYSTEM_DESCRIPTIVE_EXCEPTION_HPP -#define UTILITY_EX_H_SYSTEM_DESCRIPTIVE_EXCEPTION_HPP - -#include "Utility/ExH/System/Exception.hpp" - -namespace Utility -{ - namespace ExH - { - namespace System - { - class DescriptiveException : public virtual Exception - { - public: - explicit - DescriptiveException (char const* description) throw (); - - template <typename T> - explicit - DescriptiveException (T const& description) throw (); - - DescriptiveException (DescriptiveException const& src) throw (); - - virtual - ~DescriptiveException () throw (); - - DescriptiveException& - operator= (DescriptiveException const& src) throw (); - - protected: - DescriptiveException () throw (); - - void - init (char const* description) throw (); - - public: - virtual char const* - what () const throw (); - - private: - - static unsigned long const DESCRIPTION_SIZE = 256; - - char description_ [DESCRIPTION_SIZE]; - }; - } - } -} - -#include "Utility/ExH/System/DescriptiveException.ipp" - -#endif // UTILITY_EX_H_SYSTEM_DESCRIPTIVE_EXCEPTION_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/DescriptiveException.ipp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/DescriptiveException.ipp deleted file mode 100644 index e35f5aaa60f..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/DescriptiveException.ipp +++ /dev/null @@ -1,87 +0,0 @@ -// file : Utility/ExH/System/DescriptiveException.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#include <cstring> - -#include "Utility/ExH/Converter.hpp" - -namespace Utility -{ - namespace ExH - { - namespace System - { - // c-tor's & d-tor - - inline DescriptiveException:: - DescriptiveException () throw () - { - description_[0] = '\0'; - } - - inline DescriptiveException:: - DescriptiveException (char const* description) throw () - { - init (description); - } - - template <typename T> - inline DescriptiveException:: - DescriptiveException (T const& description) throw () - { - init (converter<T> (description)); - } - - inline DescriptiveException:: - DescriptiveException (DescriptiveException const& src) throw () - { - init (src.what ()); - } - - inline DescriptiveException:: - ~DescriptiveException () throw () - { - } - - inline DescriptiveException& DescriptiveException:: - operator= (DescriptiveException const& src) throw () - { - init (src.what ()); - return *this; - } - - - // accessors / modifiers - - inline void DescriptiveException:: - init (char const* description) throw () - { - if (description != 0) - { - std::strncpy (description_, description, DESCRIPTION_SIZE - 1); - description_[DESCRIPTION_SIZE - 1] = '\0'; - } - else - { - description_[0] = '\0'; - } - } - - inline char const* DescriptiveException:: - what () const throw () - { - if (description_[0] != '\0') - { - return description_; - } - else - { - return Exception::what (); - } - } - } - } -} - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/Exception.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/Exception.hpp deleted file mode 100644 index 4d074b66c23..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ExH/System/Exception.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// file : Utility/ExH/System/Exception.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_EX_H_SYSTEM_EXCEPTION_HPP -#define UTILITY_EX_H_SYSTEM_EXCEPTION_HPP - -#include <exception> - -namespace Utility -{ - namespace ExH - { - namespace System - { - // This is the only way to make predefined exceptions like - // std::bad_alloc, etc to appear in the right place of the hierarchy. - // - - typedef std::exception Exception; - } - } -} - -#endif // UTILITY_EX_H_SYSTEM_EXCEPTION_HPP - - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/DefaultImpl.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/DefaultImpl.hpp deleted file mode 100644 index 43277035329..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/DefaultImpl.hpp +++ /dev/null @@ -1,95 +0,0 @@ -// file : Utility/ReferenceCounting/DefaultImpl.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_REFERENCE_COUNTING_DEFAULT_IMPL_HPP -#define UTILITY_REFERENCE_COUNTING_DEFAULT_IMPL_HPP - -#include "Utility/ExH/Compound.hpp" -#include "Utility/ExH/Logic/DescriptiveException.hpp" - -#include "Utility/Synch/Policy/Null.hpp" - -#include "Utility/ReferenceCounting/Interface.hpp" - -namespace Utility -{ - namespace ReferenceCounting - { - // Default reference counter implementation with parameterised - // synchronization policy. It is assumed that none of the SynchPolicy - // types throw any logic exceptions. If in fact they do then these - // exceptions won't be handled and will be automatically converted - // to system exceptions. - - template <typename SynchPolicy = Utility::Synch::Policy::Null> - class DefaultImpl : public virtual Interface - { - public: - class InconsistentState_ {}; - typedef - ExH::Compound<InconsistentState_, Exception> - InconsistentState; - - public: - DefaultImpl () throw (SystemException); - - virtual - ~DefaultImpl () throw (); - - public: - virtual void - add_ref () const throw (Exception, SystemException); - - virtual void - remove_ref () const throw (); - - virtual count_t - refcount_value () const throw (Exception, SystemException); - - protected: - virtual void - add_ref_i () const throw (Exception, SystemException); - - virtual bool - remove_ref_i () const throw (Exception, SystemException); - - virtual count_t - refcount_value_i () const throw (Exception, SystemException); - - typename SynchPolicy::Mutex& - lock_i () const throw (); - - protected: - typedef - typename SynchPolicy::Mutex - Mutex_; - - typedef - typename SynchPolicy::ReadGuard - ReadGuard_; - - typedef - typename SynchPolicy::WriteGuard - WriteGuard_; - - protected: - mutable count_t ref_count_; - - private: - mutable Mutex_ lock_; - - private: - // Copy semanic is not supported. - DefaultImpl (DefaultImpl const&) throw (); - DefaultImpl& - operator= (DefaultImpl const&) throw (); - }; - } -} - -#include "Utility/ReferenceCounting/DefaultImpl.ipp" - -#endif // UTILITY_REFERENCE_COUNTING_DEFAULT_IMPL_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/DefaultImpl.ipp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/DefaultImpl.ipp deleted file mode 100644 index e86fac128a0..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/DefaultImpl.ipp +++ /dev/null @@ -1,104 +0,0 @@ -// file : Utility/ReferenceCounting/DefaultImpl.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ReferenceCounting - { - // c-tor & d-tor - - template <typename SynchPolicy> - DefaultImpl<SynchPolicy>:: - DefaultImpl () throw (Interface::SystemException) - : ref_count_ (1), - lock_ () - { - } - - template <typename SynchPolicy> - DefaultImpl<SynchPolicy>:: - ~DefaultImpl () throw () - { - } - - // add_ref, remove_ref and refcount_value member functions - - template <typename SynchPolicy> - void DefaultImpl<SynchPolicy>:: - add_ref () const throw (Exception, SystemException) - { - WriteGuard_ guard (lock_); - add_ref_i (); - } - - template <typename SynchPolicy> - void DefaultImpl<SynchPolicy>:: - remove_ref () const throw () - { - bool destroy (false); - try - { - WriteGuard_ guard (lock_); - destroy = remove_ref_i (); - } - catch (...) - { - // there is nothing we can do - } - - if (destroy) delete this; - } - - template <typename SynchPolicy> - Interface::count_t DefaultImpl<SynchPolicy>:: - refcount_value () const throw (Exception, SystemException) - { - ReadGuard_ guard (lock_); - return refcount_value_i (); - } - - // add_ref_i, remove_ref_i and refcount_value_i member functions - - template <typename SynchPolicy> - void DefaultImpl<SynchPolicy>:: - add_ref_i () const throw (Exception, SystemException) - { - ref_count_++; - } - - template <typename SynchPolicy> - bool DefaultImpl<SynchPolicy>:: - remove_ref_i () const throw (Exception, SystemException) - { - bool destroy (false); - if (ref_count_ > 0) - { - if (--ref_count_ == 0) destroy = true; - } - else - { - throw InconsistentState ( - "Utility::ReferenceCounting::DefaultImpl::_remove_ref_i: " - "reference counter is zero."); - } - return destroy; - - } - - template <typename SynchPolicy> - Interface::count_t DefaultImpl<SynchPolicy>:: - refcount_value_i () const throw (Exception, SystemException) - { - return ref_count_; - } - - template <typename SynchPolicy> - typename SynchPolicy::Mutex& DefaultImpl<SynchPolicy>:: - lock_i() const throw () - { - return lock_; - } - } -} diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ExternalLockImpl.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ExternalLockImpl.hpp deleted file mode 100644 index ba115aaeec1..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ExternalLockImpl.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// file : Utility/ReferenceCounting/ExternalLockImpl.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_REFERENCE_COUNTING_EXTERNAL_LOCK_IMPL_HPP -#define UTILITY_REFERENCE_COUNTING_EXTERNAL_LOCK_IMPL_HPP - -namespace Utility -{ - namespace ReferenceCounting - { - - /* - - Not ported yet. - - class ExternalLockRefCounter : public virtual Util::RefCountBase - { - public: - ExternalLockRefCounter (ACE_Lock* lock = 0); - virtual ~ExternalLockRefCounter (); - - void init (ACE_Lock* lock); - - public: - - virtual void _add_ref (); - virtual void _remove_ref (); - virtual unsigned long _refcount_value (); - - protected: - - virtual void _add_ref_i (); - virtual bool _remove_ref_i (); - virtual unsigned long _refcount_value_i (); - - ACE_Lock* lock_i (); - - private: - - typedef ACE_Guard <ACE_Lock> Guard_; - - ACE_Lock* lock_; - unsigned long ref_count_; - - private: - ExternalLockRefCounter (const ExternalLockRefCounter& ); - void operator= (const ExternalLockRefCounter& ); - }; - - */ - } -} - -#include "Utility/ReferenceCounting/ExternalLockImpl.ipp" - -#endif // UTILITY_REFERENCE_COUNTING_EXTERNAL_LOCK_IMPL_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ExternalLockImpl.ipp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ExternalLockImpl.ipp deleted file mode 100644 index 46fde227919..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ExternalLockImpl.ipp +++ /dev/null @@ -1,121 +0,0 @@ -// file : Utility/ReferenceCounting/ExternalLockImpl.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ReferenceCounting - { - /* - inline - ExternalLockRefCounter::ExternalLockRefCounter (ACE_Lock* lock) - : lock_ (lock), - ref_count_ (1) - { - } - - inline - void - ExternalLockRefCounter::init (ACE_Lock* lock) - { - lock_ = lock; - } - - inline - ExternalLockRefCounter::~ExternalLockRefCounter () - { - } - - inline - ACE_Lock* - ExternalLockRefCounter::lock_i () - { - return lock_; - } - - inline - void - ExternalLockRefCounter::_add_ref () - { - if (lock_) - { - Guard_ guard (*lock_); - _add_ref_i (); - } - else - { - _add_ref_i (); - } - } - - inline - void - ExternalLockRefCounter::_remove_ref () - { - bool destroy = false; - { - if (lock_) - { - Guard_ guard (*lock_); - destroy = _remove_ref_i (); - } - else - { - destroy = _remove_ref_i (); - } - } - if (destroy) delete this; - } - - inline - unsigned long - ExternalLockRefCounter::_refcount_value () - { - if (lock_) - { - Guard_ guard (*lock_); - return _refcount_value_i (); - } - else - { - return _refcount_value_i (); - } - } - - inline - void - ExternalLockRefCounter::_add_ref_i () - { - ref_count_++; - } - - inline - bool - ExternalLockRefCounter::_remove_ref_i () - { - bool destroy = false; - if (ref_count_ > 0) - { - if (--ref_count_ == 0) destroy = true; - } - else - { - ACE_ERROR ((LM_ERROR, - "ExternalLockRefCounter::_remove_ref() " - " _remove_ref() called while ref_coundt == 0\n" - )); - } - return destroy; - } - - inline - unsigned long - ExternalLockRefCounter::_refcount_value_i () - { - return ref_count_; - } - */ - } -} - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.hpp deleted file mode 100644 index f55c81696a9..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.hpp +++ /dev/null @@ -1,84 +0,0 @@ -// file : Utility/ReferenceCounting/Interface.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_REFERENCE_COUNTING_INTERFACE_HPP -#define UTILITY_REFERENCE_COUNTING_INTERFACE_HPP - -#include "Utility/ExH/Compound.hpp" -#include "Utility/ExH/System/Exception.hpp" -#include "Utility/ExH/Logic/Exception.hpp" -#include "Utility/ExH/Logic/DescriptiveException.hpp" - -namespace Utility -{ - namespace ReferenceCounting - { - // Interface to a reference-countable object. Note that _remove_ref () - // member function has a no-throw semantic. Even though it can lead to - // a diagnostic loss it was made no-throw because it has a destructor - // semantic. - - class Interface - { - public: - typedef - unsigned long - count_t; - - typedef - ExH::System::Exception - SystemException; - - class Exception_ {}; - typedef - ExH::Compound<Exception_, ExH::Logic::DescriptiveException> - Exception; - - public: - virtual void - add_ref () const throw (Exception, SystemException) = 0; - - virtual void - remove_ref () const throw () = 0; - - virtual count_t - refcount_value () const throw (Exception, SystemException) = 0; - - protected: - Interface () throw (); - - virtual - ~Interface () throw (); - - protected: - virtual void - add_ref_i () const throw (Exception, SystemException) = 0; - - virtual bool - remove_ref_i () const throw (Exception, SystemException) = 0; - - virtual count_t - refcount_value_i () const throw (Exception, SystemException) = 0; - - private: - // Copy semanic is not supported. - Interface (Interface const&) throw (); - Interface& - operator= (Interface const&) throw (); - }; - - template <typename Type> - Type* - add_ref (Type* ptr) - throw (Interface::Exception, Interface::SystemException); - } -} - -#include "Utility/ReferenceCounting/Interface.tpp" -#include "Utility/ReferenceCounting/Interface.ipp" - - -#endif // UTILITY_REFERENCE_COUNTING_INTERFACE_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.ipp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.ipp deleted file mode 100644 index 61801d218b6..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.ipp +++ /dev/null @@ -1,21 +0,0 @@ -// file : Utility/ReferenceCounting/Interface.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ReferenceCounting - { - inline Interface:: - ~Interface () throw () - { - } - - inline Interface:: - Interface () throw () - { - } - } -} - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.tpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.tpp deleted file mode 100644 index e4cebab5aa0..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/Interface.tpp +++ /dev/null @@ -1,19 +0,0 @@ -// file : Utility/ReferenceCounting/Interface.tpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ReferenceCounting - { - template <typename Type> - inline Type* - add_ref (Type* ptr) - throw (Interface::Exception, Interface::SystemException) - { - if (ptr != 0) ptr->add_ref (); - return ptr; - } - } -} diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ReferenceCounting.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ReferenceCounting.hpp deleted file mode 100644 index e3929549768..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/ReferenceCounting.hpp +++ /dev/null @@ -1,15 +0,0 @@ -// file : Utility/ReferenceCounting/ReferenceCounting.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_REFERENCE_COUNTING_REFERENCE_COUNTING_HPP -#define UTILITY_REFERENCE_COUNTING_REFERENCE_COUNTING_HPP - -#include "Utility/ReferenceCounting/Interface.hpp" -#include "Utility/ReferenceCounting/DefaultImpl.hpp" -#include "Utility/ReferenceCounting/SmartPtr.hpp" -#include "Utility/ReferenceCounting/StrictPtr.hpp" - -#endif // UTILITY_REFERENCE_COUNTING_REFERENCE_COUNTING_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/SmartPtr.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/SmartPtr.hpp deleted file mode 100644 index 9a0b25adef7..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/SmartPtr.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// file : Utility/ReferenceCounting/SmartPtr.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_REFERENCE_COUNTING_SMART_PTR_HPP -#define UTILITY_REFERENCE_COUNTING_SMART_PTR_HPP - -#include "Utility/ExH/Compound.hpp" -#include "Utility/ExH/Logic/DescriptiveException.hpp" - -#include "Utility/ReferenceCounting/Interface.hpp" - -namespace Utility -{ - namespace ReferenceCounting - { - template <typename T> - class SmartPtr - { - public: - typedef - T - Type; - - class NotInitialized_ {}; - typedef - ExH::Compound<NotInitialized_, ExH::Logic::DescriptiveException> - NotInitialized; - - public: - // c-tor's - - SmartPtr () throw (); - SmartPtr (Type* ptr) throw (); - SmartPtr (SmartPtr<Type> const& s_ptr) - throw (Interface::Exception, Interface::SystemException); - - template <typename Other> - SmartPtr (SmartPtr<Other> const& s_ptr) - throw (Interface::Exception, Interface::SystemException); - - // d-tor - - ~SmartPtr () throw (); - - // assignment & copy-assignment operators - - SmartPtr<Type>& - operator= (Type* ptr) throw (); - - SmartPtr<Type>& - operator= (SmartPtr<Type> const& s_ptr) - throw (Interface::Exception, Interface::SystemException); - - template <typename Other> - SmartPtr<Type>& - operator= (SmartPtr<Other> const& s_ptr) - throw (Interface::Exception, Interface::SystemException); - - //conversions - - operator Type* () const throw (); - - // accessors - - Type* - operator-> () const throw (NotInitialized); - - Type* - in () const throw (); - - Type* - retn() throw (); - - private: - Type* ptr_; - }; - - // Specialization of add_ref function for SmartPtr<T> - template <typename T> - T* - add_ref (SmartPtr<T> const& ptr) - throw (Interface::Exception, Interface::SystemException); - - - // Dynamic type conversion function for SmartPtr's - template <typename D, typename S> - D* - smart_cast (SmartPtr<S> const& s) - throw (Interface::Exception, Interface::SystemException); - - // Acquisition function - template <typename T> - SmartPtr<T> - acquire (T* ptr) throw (Interface::Exception, Interface::SystemException); - } -} - -#include "Utility/ReferenceCounting/SmartPtr.tpp" - - -#endif // UTILITY_REFERENCE_COUNTING_SMART_PTR_HPP diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/SmartPtr.tpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/SmartPtr.tpp deleted file mode 100644 index 405fc1503f4..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/SmartPtr.tpp +++ /dev/null @@ -1,169 +0,0 @@ -// file : Utility/ReferenceCounting/SmartPtr.tpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ReferenceCounting - { - // c-tor's & d-tor - - template <typename T> - SmartPtr<T>:: - SmartPtr () throw () - : ptr_ (0) - { - } - - template <typename T> - SmartPtr<T>:: - SmartPtr (Type* ptr) throw () - : ptr_ (ptr) - { - } - - template <typename T> - SmartPtr<T>:: - SmartPtr (SmartPtr<Type> const& s_ptr) - throw (Interface::Exception, Interface::SystemException) - : ptr_ (add_ref (s_ptr.in ())) - { - } - - template <typename T> - template <typename Other> - SmartPtr<T>:: - SmartPtr (SmartPtr<Other> const& s_ptr) - throw (Interface::Exception, Interface::SystemException) - : ptr_ (add_ref (s_ptr.in ())) - { - } - - - template <typename T> - SmartPtr<T>:: - ~SmartPtr () throw () - { - // This is an additional catch-all layer to protect from - // non-conformant Type. - try - { - if (ptr_ != 0) ptr_->remove_ref (); - } - catch (...) - { - } - } - - // operator= - - template <typename T> - SmartPtr<T>& SmartPtr<T>:: - operator= (Type* ptr) throw () - { - if (ptr_ != 0) ptr_->remove_ref (); - ptr_ = ptr; - return *this; - } - - - template <typename T> - SmartPtr<T>& SmartPtr<T>:: - operator= (SmartPtr<Type> const& s_ptr) - throw (Interface::Exception, Interface::SystemException) - { - Type* old_ptr (ptr_); - Type* new_ptr (add_ref (s_ptr.in ())); // this can throw - if (old_ptr != 0) old_ptr->remove_ref (); - - ptr_ = new_ptr; // commit - - return *this; - } - - - template <typename T> - template <typename Other> - SmartPtr<T>& SmartPtr<T>:: - operator= (SmartPtr<Other> const& s_ptr) - throw (Interface::Exception, Interface::SystemException) - { - Type* old_ptr (ptr_); - Other* new_ptr (add_ref (s_ptr.in ())); // this can throw - if (old_ptr != 0) old_ptr->remove_ref (); - - ptr_ = new_ptr; // commit - - return *this; - } - - // conversions - - template <typename T> - SmartPtr<T>:: - operator T* () const throw () - { - return ptr_; - } - - - // accessors - - template <typename T> - T* SmartPtr<T>:: - operator-> () const throw (NotInitialized) - { - if (ptr_ == 0) - { - throw NotInitialized( - "Utility::ReferenceCounting::SmartPtr::operator-> : " - "unable to dereference NULL pointer."); - } - return ptr_; - } - - template <typename T> - T* SmartPtr<T>:: - in () const throw () - { - return ptr_; - } - - template <typename T> - T* SmartPtr<T>:: - retn() throw () - { - Type* ret (ptr_); - ptr_ = 0; - return ret; - } - - // Specialization of add_ref function for SmartPtr<T> - template <typename T> - T* - add_ref (SmartPtr<T> const& ptr) - throw (Interface::Exception, Interface::SystemException) - { - // delegate to generic implementation - return add_ref (ptr.in ()); - } - - // Dynamic type conversion function for SmartPtr's - template <typename D, typename S> - D* - smart_cast (SmartPtr<S> const& s) - throw (Interface::Exception, Interface::SystemException) - { - return add_ref (dynamic_cast<D*>(s.in ())); - } - - // Acquisition function - template <typename T> - SmartPtr<T> - acquire (T* ptr) throw (Interface::Exception, Interface::SystemException) - { - return SmartPtr<T> (ptr); - } - } -} diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/StrictPtr.hpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/StrictPtr.hpp deleted file mode 100644 index 9885e321de9..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/StrictPtr.hpp +++ /dev/null @@ -1,107 +0,0 @@ -// file : Utility/ReferenceCounting/StrictPtr.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_REFERENCE_COUNTING_STRICT_PTR_HPP -#define UTILITY_REFERENCE_COUNTING_STRICT_PTR_HPP - -#include "Utility/ExH/Compound.hpp" -#include "Utility/ExH/Logic/DescriptiveException.hpp" - -#include "Utility/ReferenceCounting/Interface.hpp" - -namespace Utility -{ - namespace ReferenceCounting - { - template <typename T> - class StrictPtr - { - public: - typedef - T - Type; - - class NotInitialized_ {}; - typedef - ExH::Compound<NotInitialized_, ExH::Logic::DescriptiveException> - NotInitialized; - - public: - // c-tor's - - StrictPtr () throw (); - - explicit - StrictPtr (Type* ptr) throw (); - - StrictPtr (StrictPtr<Type> const& s_ptr) - throw (Interface::Exception, Interface::SystemException); - - template <typename Other> - StrictPtr (StrictPtr<Other> const& s_ptr) - throw (Interface::Exception, Interface::SystemException); - // d-tor - - ~StrictPtr () throw (); - - // assignment & copy-assignment operators - - StrictPtr<Type>& - operator= (Type* ptr) throw (); - - StrictPtr<Type>& - operator= (StrictPtr<Type> const& s_ptr) - throw (Interface::Exception, Interface::SystemException); - - template <typename Other> - StrictPtr<Type>& - operator= (StrictPtr<Other> const& s_ptr) - throw (Interface::Exception, Interface::SystemException); - - // conversions - - // Note: implicit conversion (operator Type* ()) is not supported. - - // comparison - - bool - operator== (Type* other) const throw (); - - bool - operator!= (Type* other) const throw (); - - // accessors - - Type* - operator-> () const throw (NotInitialized); - - Type* - in () const throw (); - - Type* - retn() throw (); - - private: - Type* ptr_; - }; - - // Specialization of add_ref function for StrictPtr<T> - template <typename T> - T* - add_ref (StrictPtr<T> const& ptr) - throw (Interface::Exception, Interface::SystemException); - - // Dynamic type conversion function for StrictPtr's - template <typename D, typename S> - StrictPtr<D> - strict_cast (StrictPtr<S> const& s) - throw (Interface::Exception, Interface::SystemException); - } -} - -#include "Utility/ReferenceCounting/StrictPtr.tpp" - -#endif // UTILITY_REFERENCE_COUNTING_STRICT_PTR_HPP - diff --git a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/StrictPtr.tpp b/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/StrictPtr.tpp deleted file mode 100644 index 84d97fb6b30..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/ReferenceCounting/StrictPtr.tpp +++ /dev/null @@ -1,166 +0,0 @@ -// file : Utility/ReferenceCounting/StrictPtr.tpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace ReferenceCounting - { - // c-tor's & d-tor - - template <typename T> - StrictPtr<T>:: - StrictPtr () throw () - : ptr_ (0) - { - } - - template <typename T> - StrictPtr<T>:: - StrictPtr (Type* ptr) throw () - : ptr_ (ptr) - { - } - - template <typename T> - StrictPtr<T>:: - StrictPtr (StrictPtr<Type> const& s_ptr) - throw (Interface::Exception, Interface::SystemException) - : ptr_ (add_ref (s_ptr.in ())) - { - } - - template <typename T> - template <typename Other> - StrictPtr<T>:: - StrictPtr (StrictPtr<Other> const& s_ptr) - throw (Interface::Exception, Interface::SystemException) - : ptr_ (add_ref (s_ptr.in ())) - { - } - - - template <typename T> - StrictPtr<T>:: - ~StrictPtr () throw () - { - // This is an additional catch-all layer to protect from - // non-conformant Type. - try - { - if (ptr_ != 0) ptr_->remove_ref (); - } - catch (...) - { - } - } - - // operator= - - template <typename T> - StrictPtr<T>& - StrictPtr<T>::operator= (Type* ptr) throw () - { - if (ptr_ != 0) ptr_->remove_ref (); - ptr_ = ptr; - return *this; - } - - template <typename T> - StrictPtr<T>& StrictPtr<T>:: - operator= (StrictPtr<Type> const& s_ptr) - throw (Interface::Exception, Interface::SystemException) - { - Type* old_ptr (ptr_); - Type* new_ptr (add_ref (s_ptr.in ())); // this can throw - if (old_ptr != 0) old_ptr->remove_ref (); - - ptr_ = new_ptr; // commit - - return *this; - } - - - template <typename T> - template <typename Other> - StrictPtr<T>& StrictPtr<T>:: - operator= (StrictPtr<Other> const& s_ptr) - throw (Interface::Exception, Interface::SystemException) - { - Type* old_ptr (ptr_); - Other* new_ptr (add_ref (s_ptr.in ())); // this can throw - if (old_ptr != 0) old_ptr->remove_ref (); - - ptr_ = new_ptr; // commit - - return *this; - } - - // comparison - - template <typename T> - bool StrictPtr<T>:: - operator== (Type* other) const throw () - { - return ptr_ == other; - } - - template <typename T> - bool StrictPtr<T>:: - operator!= (Type* other) const throw () - { - return ptr_ != other; - } - - // accessors - - template <typename T> - T* StrictPtr<T>:: - operator-> () const throw (NotInitialized) - { - if (ptr_ == 0) - { - throw NotInitialized( - "Utility::ReferenceCounting::StrictPtr::operator-> : " - "unable to dereference NULL pointer."); - } - return ptr_; - } - - template <typename T> - T* StrictPtr<T>:: - in () const throw () - { - return ptr_; - } - - template <typename T> - T* StrictPtr<T>:: - retn() throw () - { - Type* ret (ptr_); - ptr_ = 0; - return ret; - } - - // Specialization of add_ref function for StrictPtr<T> - template <typename T> - T* - add_ref (StrictPtr<T> const& ptr) - throw (Interface::Exception, Interface::SystemException) - { - // delegate to generic implementation - return add_ref (ptr.in ()); - } - - // Dynamic type conversion function for StrictPtr's - template <typename D, typename S> - StrictPtr<D> - strict_cast (StrictPtr<S> const& s) - throw (Interface::Exception, Interface::SystemException) - { - return StrictPtr<D>(add_ref (dynamic_cast<D*>(s.in ()))); - } - } -} diff --git a/TAO/CIAO/CCF/External/Utility/Utility/Synch/Policy/Null.hpp b/TAO/CIAO/CCF/External/Utility/Utility/Synch/Policy/Null.hpp deleted file mode 100644 index d7a26e81089..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/Synch/Policy/Null.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// file : Utility/Synch/Policy/Null.hpp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -#ifndef UTILITY_SYNCH_POLICY_NULL_HPP -#define UTILITY_SYNCH_POLICY_NULL_HPP - -namespace Utility -{ - namespace Synch - { - namespace Policy - { - - class NullMutex - { - }; - - class NullGuard - { - public: - explicit - NullGuard (NullMutex&) throw (); - - private: - NullGuard (NullGuard const&) throw (); - - NullGuard& - operator= (NullGuard const&) throw (); - }; - - struct Null - { - typedef - NullMutex - Mutex; - - typedef - NullGuard - ReadGuard; - - typedef - NullGuard - WriteGuard; - }; - } - } -} - -#include "Utility/Synch/Policy/Null.ipp" - -#endif // UTILITY_SYNCH_POLICY_NULL_HPP diff --git a/TAO/CIAO/CCF/External/Utility/Utility/Synch/Policy/Null.ipp b/TAO/CIAO/CCF/External/Utility/Utility/Synch/Policy/Null.ipp deleted file mode 100644 index 55c254bafc0..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Utility/Synch/Policy/Null.ipp +++ /dev/null @@ -1,19 +0,0 @@ -// file : Utility/Synch/Policy/Null.ipp -// author : Boris Kolpackov <boris@kolpackov.net> -// copyright : Copyright (c) 2002-2003 Boris Kolpackov -// license : http://kolpackov.net/license.html - -namespace Utility -{ - namespace Synch - { - namespace Policy - { - inline NullGuard:: - NullGuard (NullMutex&) throw () - { - } - } - } -} - diff --git a/TAO/CIAO/CCF/External/Utility/Version b/TAO/CIAO/CCF/External/Utility/Version deleted file mode 100644 index 9084fa2f716..00000000000 --- a/TAO/CIAO/CCF/External/Utility/Version +++ /dev/null @@ -1 +0,0 @@ -1.1.0 diff --git a/TAO/CIAO/CCF/Makefile b/TAO/CIAO/CCF/Makefile deleted file mode 100644 index 91de9e1a44b..00000000000 --- a/TAO/CIAO/CCF/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# file : Makefile -# author : Boris Kolpackov <boris@kolpackov.net> -# copyright : Copyright (c) 2002-2003 Boris Kolpackov -# license : http://kolpackov.net/license.html -# cvs-id : $Id$ - -root := . - -include $(root)/External/Utility/Config/Recursion.pre.rules - -target_makefile_list := -target_directory_list := CCF - -include $(root)/External/Utility/Config/Recursion.post.rules diff --git a/TAO/CIAO/CCF/Version b/TAO/CIAO/CCF/Version deleted file mode 100644 index 7bcd0e3612d..00000000000 --- a/TAO/CIAO/CCF/Version +++ /dev/null @@ -1 +0,0 @@ -0.0.2
\ No newline at end of file |