From 9938fdef6c936443ad8bd69ae11a1492f5303cc8 Mon Sep 17 00:00:00 2001 From: parsons Date: Fri, 24 Oct 2003 23:25:55 +0000 Subject: ChangeLogTag: Fri Oct 24 18:17:21 2003 Jeff Parsons --- TAO/CIAO/CCF/CCF/IDL2/IDL2.vcproj | 223 +++++++++++++++++++++ TAO/CIAO/CCF/CCF/IDL2/SemanticAction.hpp | 1 - .../CCF/CCF/IDL2/SemanticAction/Impl/Member.hpp | 2 + .../CCF/CCF/IDL2/SemanticAction/Impl/TypeId.hpp | 9 +- .../CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp | 2 + TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ElementsCtor.cpp | 3 +- TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/InterfaceCtor.cpp | 3 +- TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Struct.cpp | 4 +- TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp | 7 + TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueTypeCtor.cpp | 3 +- TAO/CIAO/CCF/CCF/IDL2/Traversal.hpp | 1 + TAO/CIAO/CIDLC/TypeNameEmitter.cpp | 61 ++++++ TAO/CIAO/CIDLC/TypeNameEmitter.hpp | 14 ++ TAO/CIAO/ChangeLog | 25 +++ 14 files changed, 348 insertions(+), 10 deletions(-) diff --git a/TAO/CIAO/CCF/CCF/IDL2/IDL2.vcproj b/TAO/CIAO/CCF/CCF/IDL2/IDL2.vcproj index baca9200931..8af0f2191c5 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/IDL2.vcproj +++ b/TAO/CIAO/CCF/CCF/IDL2/IDL2.vcproj @@ -152,21 +152,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -266,6 +320,21 @@ ObjectFile="$(IntDir)/$(InputName)1.obj"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction.hpp index d12d18e4911..bee02c72d47 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction.hpp @@ -15,7 +15,6 @@ #include "CCF/IDL2/SemanticAction/Struct.hpp" #include "CCF/IDL2/SemanticAction/Typedef.hpp" #include "CCF/IDL2/SemanticAction/TypeId.hpp" - #include "CCF/IDL2/SemanticAction/Factory.hpp" #endif // CCF_IDL2_SEMANTIC_ACTION_HPP diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.hpp index f3f5b9e89b1..15e1b5ac6fa 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Member.hpp @@ -8,6 +8,8 @@ #include "CCF/IDL2/SyntaxTree/Member.hpp" #include "CCF/IDL2/SemanticAction/Member.hpp" +using namespace std; + namespace CCF { namespace IDL2 diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.hpp index 4ae2a09462d..40b2510af46 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/TypeId.hpp @@ -130,11 +130,12 @@ namespace CCF virtual bool test (DeclarationPtr const& d) const throw () { + //@@ MSVC bug - requires fully qualified name in parameter. return - d->is_a () - || d->is_a () - || d->is_a () - || d->is_a (); + d->is_a () + || d->is_a () + || d->is_a () + || d->is_a (); } } p; diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp index 00d2c949a50..4a0e5a733e7 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp @@ -11,6 +11,8 @@ #include +using namespace std; + namespace CCF { namespace IDL2 diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ElementsCtor.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ElementsCtor.cpp index 89601eed775..cc800fa9967 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ElementsCtor.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ElementsCtor.cpp @@ -8,8 +8,9 @@ namespace CCF { namespace SyntaxTree { - struct Declaration + class Declaration { + protected: Declaration (); }; diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/InterfaceCtor.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/InterfaceCtor.cpp index 81ef700a8d7..ed9713a50d4 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/InterfaceCtor.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/InterfaceCtor.cpp @@ -8,8 +8,9 @@ namespace CCF { namespace SyntaxTree { - struct InterfaceDef + class InterfaceDef { + protected: InterfaceDef (); }; diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Struct.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Struct.cpp index 4c0999cee8f..4dbba686e64 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Struct.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Struct.cpp @@ -29,12 +29,12 @@ namespace CCF return true; } - catch (DeclarationTable::DeclarationNotFound const& e) + catch (DeclarationTable::DeclarationNotFound const&) { //@@ ICE abort (); } - catch (DeclarationTable::TypeMismatch const& e) + catch (DeclarationTable::TypeMismatch const&) { return false; } diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp index cdd7b5a2024..29f401decb1 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp @@ -50,6 +50,13 @@ namespace CCF return underlying_type ()->complete (); } + public: + ScopedName + type_name () const + { + return type_; + } + public: virtual std::string declaration_class () diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueTypeCtor.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueTypeCtor.cpp index 527f4438787..4fc3cfc11e2 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueTypeCtor.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueTypeCtor.cpp @@ -8,8 +8,9 @@ namespace CCF { namespace SyntaxTree { - struct ValueTypeDef + class ValueTypeDef { + protected: ValueTypeDef (); }; diff --git a/TAO/CIAO/CCF/CCF/IDL2/Traversal.hpp b/TAO/CIAO/CCF/CCF/IDL2/Traversal.hpp index 8f92146e8da..a44c151001e 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/Traversal.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/Traversal.hpp @@ -11,6 +11,7 @@ #include "CCF/IDL2/Traversal/Member.hpp" #include "CCF/IDL2/Traversal/Module.hpp" #include "CCF/IDL2/Traversal/Operation.hpp" +#include "CCF/IDL2/Traversal/Struct.hpp" #include "CCF/IDL2/Traversal/Sequence.hpp" #include "CCF/IDL2/Traversal/Struct.hpp" #include "CCF/IDL2/Traversal/Translation.hpp" diff --git a/TAO/CIAO/CIDLC/TypeNameEmitter.cpp b/TAO/CIAO/CIDLC/TypeNameEmitter.cpp index bf3ae1eac73..1672ecdf534 100644 --- a/TAO/CIAO/CIDLC/TypeNameEmitter.cpp +++ b/TAO/CIAO/CIDLC/TypeNameEmitter.cpp @@ -104,12 +104,24 @@ ReturnTypeNameEmitter::traverse (StringDeclPtr const&) os << "char *"; } +void +ReturnTypeNameEmitter::traverse (TypedefDeclPtr const &, StringDeclPtr const&) +{ + os << "char *"; +} + void ReturnTypeNameEmitter::traverse (WstringDeclPtr const&) { os << "::CORBA::WChar *"; } +void +ReturnTypeNameEmitter::traverse (TypedefDeclPtr const &, WstringDeclPtr const&) +{ + os << "::CORBA::WChar *"; +} + void ReturnTypeNameEmitter::traverse (ObjectDeclPtr const&) { @@ -128,6 +140,18 @@ ReturnTypeNameEmitter::traverse (AnyDeclPtr const&) os << "::CORBA::Any *"; } +void +ReturnTypeNameEmitter::traverse (StructDeclPtr const&) +{ + //os << "::CORBA::Any *"; +} + +void +ReturnTypeNameEmitter::traverse (SequenceDeclPtr const& s) +{ + os << s->name () << " *"; +} + void ReturnTypeNameEmitter::traverse (LocalInterfaceDeclPtr const& i) { @@ -243,6 +267,18 @@ INArgTypeNameEmitter::traverse (AnyDeclPtr const&) os << "const ::CORBA::Any &"; } +void +INArgTypeNameEmitter::traverse (StructDeclPtr const&) +{ + //os << "::CORBA::Any *"; +} + +void +INArgTypeNameEmitter::traverse (SequenceDeclPtr const& s) +{ + os << "const " << s->name () << " &";; +} + // =============================================================== INOUTArgTypeNameEmitter::INOUTArgTypeNameEmitter (ostream& os_) @@ -352,6 +388,18 @@ INOUTArgTypeNameEmitter::traverse (AnyDeclPtr const&) os << "::CORBA::Any &"; } +void +INOUTArgTypeNameEmitter::traverse (StructDeclPtr const&) +{ + //os << "::CORBA::Any *"; +} + +void +INOUTArgTypeNameEmitter::traverse (SequenceDeclPtr const& s) +{ + os << s->name () << " &"; +} + // ================================================================= OUTArgTypeNameEmitter::OUTArgTypeNameEmitter (ostream& os_) @@ -460,3 +508,16 @@ OUTArgTypeNameEmitter::traverse (AnyDeclPtr const&) { os << "::CORBA::Any_out"; } + +void +OUTArgTypeNameEmitter::traverse (StructDeclPtr const&) +{ + //os << "::CORBA::Any *"; +} + +void +OUTArgTypeNameEmitter::traverse (SequenceDeclPtr const& s) +{ + os << s->name () << "_out"; +} + diff --git a/TAO/CIAO/CIDLC/TypeNameEmitter.hpp b/TAO/CIAO/CIDLC/TypeNameEmitter.hpp index eba2dfcde58..b5dbb34f3ac 100644 --- a/TAO/CIAO/CIDLC/TypeNameEmitter.hpp +++ b/TAO/CIAO/CIDLC/TypeNameEmitter.hpp @@ -29,10 +29,14 @@ class TypeNameEmitter : public Traversal::VoidDecl, public Traversal::FloatDecl, public Traversal::DoubleDecl, public Traversal::StringDecl, + public Traversal::TypedefDecl, public Traversal::WstringDecl, + public Traversal::TypedefDecl, public Traversal::ObjectDecl, public Traversal::ValueBaseDecl, public Traversal::AnyDecl, + public Traversal::StructDecl, + public Traversal::SequenceDecl, public Traversal::LocalInterfaceDecl { protected: @@ -63,10 +67,14 @@ public: virtual void traverse (FloatDeclPtr const&); virtual void traverse (DoubleDeclPtr const&); virtual void traverse (StringDeclPtr const&); + virtual void traverse (TypedefDeclPtr const&, StringDeclPtr const&); virtual void traverse (WstringDeclPtr const&); + virtual void traverse (TypedefDeclPtr const&, WstringDeclPtr const&); virtual void traverse (ObjectDeclPtr const&); virtual void traverse (ValueBaseDeclPtr const&); virtual void traverse (AnyDeclPtr const&); + virtual void traverse (StructDeclPtr const&); + virtual void traverse (SequenceDeclPtr const&); virtual void traverse (LocalInterfaceDeclPtr const&); }; @@ -95,6 +103,8 @@ public: virtual void traverse (ObjectDeclPtr const&); virtual void traverse (ValueBaseDeclPtr const&); virtual void traverse (AnyDeclPtr const&); + virtual void traverse (StructDeclPtr const&); + virtual void traverse (SequenceDeclPtr const&); }; // Generates the typename of an INOUT argument. @@ -122,6 +132,8 @@ public: virtual void traverse (ObjectDeclPtr const&); virtual void traverse (ValueBaseDeclPtr const&); virtual void traverse (AnyDeclPtr const&); + virtual void traverse (StructDeclPtr const&); + virtual void traverse (SequenceDeclPtr const&); }; // Generates the typename of an OUT argument. @@ -149,6 +161,8 @@ public: virtual void traverse (ObjectDeclPtr const&); virtual void traverse (ValueBaseDeclPtr const&); virtual void traverse (AnyDeclPtr const&); + virtual void traverse (StructDeclPtr const&); + virtual void traverse (SequenceDeclPtr const&); }; #endif /* TYPENAME_EMITTER_HPP */ diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog index 147647cbfe1..5ba9bdcb707 100644 --- a/TAO/CIAO/ChangeLog +++ b/TAO/CIAO/ChangeLog @@ -1,3 +1,28 @@ +Fri Oct 24 18:17:21 2003 Jeff Parsons + + * CCF/CCF/IDL2/IDL2.vcproj: + + Added new front end files to the project. + + * CCF/CCF/IDL2/SemanticAction.hpp: + * CCF/CCF/IDL2/Traversal.hpp: + * CCF/CCF/IDL2/SemanticAction/Impl/Member.hpp: + * CCF/CCF/IDL2/SemanticAction/Impl/TypeId.hpp: + * CCF/CCF/IDL2/SemanticAction/Impl/Typedef.hpp: + * CCF/CCF/IDL2/SyntaxTree/ElementsCtor.cpp: + * CCF/CCF/IDL2/SyntaxTree/InterfaceCtor.cpp: + * CCF/CCF/IDL2/SyntaxTree/Struct.cpp: + * CCF/CCF/IDL2/SyntaxTree/Typedef.hpp: + * CCF/CCF/IDL2/SyntaxTree/ValueTypeCtor.cpp: + + Fixed various minor errors, such as removal of unused argument + identifiers, and addition of 'using std". + + * CIDLC/TypeNameEmitter.cpp: + * CIDLC/TypeNameEmitter.hpp: + + Added case for sequences, and typedefs of string and wstring. + Fri Oct 24 17:14:51 2003 Boris Kolpackov * CCF/CCF/IDL2/Traversal/Typedef.hpp: New implementation of -- cgit v1.2.1