diff options
author | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-10-16 17:14:25 +0000 |
---|---|---|
committer | boris <boris@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-10-16 17:14:25 +0000 |
commit | 8504eabc35c4520050c866a9301ef0fc137c3552 (patch) | |
tree | 3da0f6de85e8941a1ac7bd0db8dd5224710a2783 | |
parent | a32748fc260bff7767dfee16cbc1afcd85dad308 (diff) | |
download | ATCD-8504eabc35c4520050c866a9301ef0fc137c3552.tar.gz |
ChangeLogTag: Thu Oct 16 12:07:01 2003 Boris Kolpackov <boris@dre.vanderbilt.edu>
33 files changed, 902 insertions, 872 deletions
diff --git a/TAO/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp b/TAO/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp index aaf33d538a6..445f9c34b5b 100644 --- a/TAO/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp +++ b/TAO/CIAO/CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp @@ -79,7 +79,7 @@ namespace CCF throw IncompatibleType (d->declaration_class ()); } - return d->dynamic_type<TypeDecl> ()->defined (); + return d->dynamic_type<HomeDef> ()->defined (); } } p; diff --git a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.hpp b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.hpp index 05306d59113..e0cdeea6597 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Interface.hpp @@ -117,7 +117,7 @@ namespace CCF //@@ could instead check for XXDef // - return d->dynamic_type<TypeDecl> ()->defined (); + return d->dynamic_type<InterfaceDecl> ()->defined (); } private: diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp index 8fabd5669aa..db324d71acf 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp @@ -16,442 +16,442 @@ namespace CCF namespace SyntaxTree { - // BuiltInTypeDef + // BuiltInTypeDecl // // namespace { TypeInfo - built_in_type_def_init_ () + built_in_type_decl_init_ () { - TypeInfo ti (typeid (BuiltInTypeDef)); - ti.add_base (Access::PUBLIC, true, TypeDef::static_type_info ()); + TypeInfo ti (typeid (BuiltInTypeDecl)); + ti.add_base (Access::PUBLIC, true, TypeDecl::static_type_info ()); return ti; } - TypeInfo built_in_type_def_ (built_in_type_def_init_ ()); + TypeInfo built_in_type_decl_ (built_in_type_decl_init_ ()); } - TypeInfo const& BuiltInTypeDef:: - static_type_info () { return built_in_type_def_; } + TypeInfo const& BuiltInTypeDecl:: + static_type_info () { return built_in_type_decl_; } - // Object + // ObjectDecl // // namespace { TypeInfo - object_init_ () + object_decl_init_ () { - TypeInfo ti (typeid (Object)); + TypeInfo ti (typeid (ObjectDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo object_ (object_init_ ()); + TypeInfo object_decl_ (object_decl_init_ ()); } - TypeInfo const& Object:: - static_type_info () { return object_; } + TypeInfo const& ObjectDecl:: + static_type_info () { return object_decl_; } - // ValueBase + // ValueBaseDecl // // namespace { TypeInfo - value_base_init_ () + value_base_decl_init_ () { - TypeInfo ti (typeid (ValueBase)); + TypeInfo ti (typeid (ValueBaseDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo value_base_ (value_base_init_ ()); + TypeInfo value_base_decl_ (value_base_decl_init_ ()); } - TypeInfo const& ValueBase:: - static_type_info () { return value_base_; } + TypeInfo const& ValueBaseDecl:: + static_type_info () { return value_base_decl_; } - // Any + // AnyDecl // // namespace { TypeInfo - any_init_ () + any_decl_init_ () { - TypeInfo ti (typeid (Any)); + TypeInfo ti (typeid (AnyDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo any_ (any_init_ ()); + TypeInfo any_decl_ (any_decl_init_ ()); } - TypeInfo const& Any:: - static_type_info () { return any_; } + TypeInfo const& AnyDecl:: + static_type_info () { return any_decl_; } - // Boolean + // BooleanDecl // // namespace { TypeInfo - boolean_init_ () + boolean_decl_init_ () { - TypeInfo ti (typeid (Boolean)); + TypeInfo ti (typeid (BooleanDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo boolean_ (boolean_init_ ()); + TypeInfo boolean_decl_ (boolean_decl_init_ ()); } - TypeInfo const& Boolean:: - static_type_info () { return boolean_; } + TypeInfo const& BooleanDecl:: + static_type_info () { return boolean_decl_; } - // Char + // CharDecl // // namespace { TypeInfo - char_init_ () + char_decl_init_ () { - TypeInfo ti (typeid (Char)); + TypeInfo ti (typeid (CharDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo char_ (char_init_ ()); + TypeInfo char_decl_ (char_decl_init_ ()); } - TypeInfo const& Char:: - static_type_info () { return char_; } + TypeInfo const& CharDecl:: + static_type_info () { return char_decl_; } - // Double + // DoubleDecl // // namespace { TypeInfo - double_init_ () + double_decl_init_ () { - TypeInfo ti (typeid (Double)); + TypeInfo ti (typeid (DoubleDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo double_ (double_init_ ()); + TypeInfo double_decl_ (double_decl_init_ ()); } - TypeInfo const& Double:: - static_type_info () { return double_; } + TypeInfo const& DoubleDecl:: + static_type_info () { return double_decl_; } - // Float + // FloatDecl // // namespace { TypeInfo - float_init_ () + float_decl_init_ () { - TypeInfo ti (typeid (Float)); + TypeInfo ti (typeid (FloatDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo float_ (float_init_ ()); + TypeInfo float_decl_ (float_decl_init_ ()); } - TypeInfo const& Float:: - static_type_info () { return float_; } + TypeInfo const& FloatDecl:: + static_type_info () { return float_decl_; } - // Long + // LongDecl // // namespace { TypeInfo - long_init_ () + long_decl_init_ () { - TypeInfo ti (typeid (Long)); + TypeInfo ti (typeid (LongDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo long_ (long_init_ ()); + TypeInfo long_decl_ (long_decl_init_ ()); } - TypeInfo const& Long:: - static_type_info () { return long_; } + TypeInfo const& LongDecl:: + static_type_info () { return long_decl_; } - // LongDouble + // LongDoubleDecl // // namespace { TypeInfo - long_double_init_ () + long_double_decl_init_ () { - TypeInfo ti (typeid (LongDouble)); + TypeInfo ti (typeid (LongDoubleDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo long_double_ (long_double_init_ ()); + TypeInfo long_double_decl_ (long_double_decl_init_ ()); } - TypeInfo const& LongDouble:: - static_type_info () { return long_double_; } + TypeInfo const& LongDoubleDecl:: + static_type_info () { return long_double_decl_; } - // LongLong + // LongLongDecl // // namespace { TypeInfo - long_long_init_ () + long_long_decl_init_ () { - TypeInfo ti (typeid (LongLong)); + TypeInfo ti (typeid (LongLongDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo long_long_ (long_long_init_ ()); + TypeInfo long_long_decl_ (long_long_decl_init_ ()); } - TypeInfo const& LongLong:: - static_type_info () { return long_long_; } + TypeInfo const& LongLongDecl:: + static_type_info () { return long_long_decl_; } - // Octet + // OctetDecl // // namespace { TypeInfo - octet_init_ () + octet_decl_init_ () { - TypeInfo ti (typeid (Octet)); + TypeInfo ti (typeid (OctetDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo octet_ (octet_init_ ()); + TypeInfo octet_decl_ (octet_decl_init_ ()); } - TypeInfo const& Octet:: - static_type_info () { return octet_; } + TypeInfo const& OctetDecl:: + static_type_info () { return octet_decl_; } - // Short + // ShortDecl // // namespace { TypeInfo - short_init_ () + short_decl_init_ () { - TypeInfo ti (typeid (Short)); + TypeInfo ti (typeid (ShortDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo short_ (short_init_ ()); + TypeInfo short_decl_ (short_decl_init_ ()); } - TypeInfo const& Short:: - static_type_info () { return short_; } + TypeInfo const& ShortDecl:: + static_type_info () { return short_decl_; } - // String + // StringDecl // // namespace { TypeInfo - string_init_ () + string_decl_init_ () { - TypeInfo ti (typeid (String)); + TypeInfo ti (typeid (StringDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo string_ (string_init_ ()); + TypeInfo string_decl_ (string_decl_init_ ()); } - TypeInfo const& String:: - static_type_info () { return string_; } + TypeInfo const& StringDecl:: + static_type_info () { return string_decl_; } - // UnsignedLong + // UnsignedLongDecl // // namespace { TypeInfo - unsigned_long_init_ () + unsigned_long_decl_init_ () { - TypeInfo ti (typeid (UnsignedLong)); + TypeInfo ti (typeid (UnsignedLongDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo unsigned_long_ (unsigned_long_init_ ()); + TypeInfo unsigned_long_decl_ (unsigned_long_decl_init_ ()); } - TypeInfo const& UnsignedLong:: - static_type_info () { return unsigned_long_; } + TypeInfo const& UnsignedLongDecl:: + static_type_info () { return unsigned_long_decl_; } - // UnsignedLongLong + // UnsignedLongLongDecl // // namespace { TypeInfo - unsigned_long_long_init_ () + unsigned_long_long_decl_init_ () { - TypeInfo ti (typeid (UnsignedLongLong)); + TypeInfo ti (typeid (UnsignedLongLongDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo unsigned_long_long_ (unsigned_long_long_init_ ()); + TypeInfo unsigned_long_long_decl_ (unsigned_long_long_decl_init_ ()); } - TypeInfo const& UnsignedLongLong:: - static_type_info () { return unsigned_long_long_; } + TypeInfo const& UnsignedLongLongDecl:: + static_type_info () { return unsigned_long_long_decl_; } - // UnsignedShort + // UnsignedShortDecl // // namespace { TypeInfo - unsigned_short_init_ () + unsigned_short_decl_init_ () { - TypeInfo ti (typeid (UnsignedShort)); + TypeInfo ti (typeid (UnsignedShortDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo unsigned_short_ (unsigned_short_init_ ()); + TypeInfo unsigned_short_decl_ (unsigned_short_decl_init_ ()); } - TypeInfo const& UnsignedShort:: - static_type_info () { return unsigned_short_; } + TypeInfo const& UnsignedShortDecl:: + static_type_info () { return unsigned_short_decl_; } - // Void + // VoidDecl // // namespace { TypeInfo - void_init_ () + void_decl_init_ () { - TypeInfo ti (typeid (Void)); + TypeInfo ti (typeid (VoidDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo void_ (void_init_ ()); + TypeInfo void_decl_ (void_decl_init_ ()); } - TypeInfo const& Void:: - static_type_info () { return void_; } + TypeInfo const& VoidDecl:: + static_type_info () { return void_decl_; } - // Wchar + // WcharDecl // // namespace { TypeInfo - wchar_init_ () + wchar_decl_init_ () { - TypeInfo ti (typeid (Wchar)); + TypeInfo ti (typeid (WcharDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo wchar_ (wchar_init_ ()); + TypeInfo wchar_decl_ (wchar_decl_init_ ()); } - TypeInfo const& Wchar:: - static_type_info () { return wchar_; } + TypeInfo const& WcharDecl:: + static_type_info () { return wchar_decl_; } - // Wstring + // WstringDecl // // namespace { TypeInfo - wstring_init_ () + wstring_decl_init_ () { - TypeInfo ti (typeid (Wstring)); + TypeInfo ti (typeid (WstringDecl)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } - TypeInfo wstring_ (wstring_init_ ()); + TypeInfo wstring_decl_ (wstring_decl_init_ ()); } - TypeInfo const& Wstring:: - static_type_info () { return wstring_; } + TypeInfo const& WstringDecl:: + static_type_info () { return wstring_decl_; } } } } diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp.m4 b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp.m4 index c57fd3b276d..5472f3eb358 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp.m4 +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp.m4 @@ -7,7 +7,7 @@ divert(-1) include(`BuiltIn.m4') define(`built_in_type', - `built_in_type_impl(`make_class_name(`$1')', `make_var_name(`$1')')')dnl + `built_in_type_impl(`make_class_name(`$1')', `make_var_name(`$1')')') define(`built_in_type_impl', ` @@ -23,7 +23,7 @@ define(`built_in_type_impl', ` TypeInfo ti (typeid ($1)); ti.add_base (Access::PUBLIC, true, - BuiltInTypeDef::static_type_info ()); + BuiltInTypeDecl::static_type_info ()); return ti; } @@ -55,24 +55,24 @@ namespace CCF namespace SyntaxTree { - // BuiltInTypeDef + // BuiltInTypeDecl // // namespace { TypeInfo - built_in_type_def_init_ () + built_in_type_decl_init_ () { - TypeInfo ti (typeid (BuiltInTypeDef)); - ti.add_base (Access::PUBLIC, true, TypeDef::static_type_info ()); + TypeInfo ti (typeid (BuiltInTypeDecl)); + ti.add_base (Access::PUBLIC, true, TypeDecl::static_type_info ()); return ti; } - TypeInfo built_in_type_def_ (built_in_type_def_init_ ()); + TypeInfo built_in_type_decl_ (built_in_type_decl_init_ ()); } - TypeInfo const& BuiltInTypeDef:: - static_type_info () { return built_in_type_def_; } + TypeInfo const& BuiltInTypeDecl:: + static_type_info () { return built_in_type_decl_; } dnl built_in_type(`object') built_in_type(`value base') diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp index 3ecb90aa746..b6cdd1270fa 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp @@ -19,23 +19,22 @@ namespace CCF // // // - class BuiltInTypeDef : public virtual TypeDef + class BuiltInTypeDecl : public virtual TypeDecl { protected: virtual - ~BuiltInTypeDef () throw () {} + ~BuiltInTypeDecl () throw () {} - BuiltInTypeDef () + BuiltInTypeDecl () { type_info (static_type_info ()); } - // Runtime declaration type information public: - virtual std::string - declaration_class () + virtual bool + complete () const { - return "built-in type"; + return true; } public: @@ -44,27 +43,27 @@ namespace CCF }; typedef - StrictPtr<BuiltInTypeDef> - BuiltInTypeDefPtr; + StrictPtr<BuiltInTypeDecl> + BuiltInTypeDeclPtr; // // // - class Object : public virtual BuiltInTypeDef + class ObjectDecl : public virtual BuiltInTypeDecl { public: virtual - ~Object () throw () {} + ~ObjectDecl () throw () {} - Object (ScopePtr const& scope) + ObjectDecl (ScopePtr const& scope) : Declaration (SimpleName ("Object"), scope) { type_info (static_type_info ()); } protected: - Object (SimpleName const& name, Order const& order, ScopePtr const& scope) + ObjectDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -76,7 +75,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Object (name, order, scope)); + return TypeDeclPtr (new ObjectDecl (name, order, scope)); } // Runtime declaration type information. @@ -94,27 +93,27 @@ namespace CCF }; typedef - StrictPtr<Object> - ObjectPtr; + StrictPtr<ObjectDecl> + ObjectDeclPtr; // // // - class ValueBase : public virtual BuiltInTypeDef + class ValueBaseDecl : public virtual BuiltInTypeDecl { public: virtual - ~ValueBase () throw () {} + ~ValueBaseDecl () throw () {} - ValueBase (ScopePtr const& scope) + ValueBaseDecl (ScopePtr const& scope) : Declaration (SimpleName ("ValueBase"), scope) { type_info (static_type_info ()); } protected: - ValueBase (SimpleName const& name, Order const& order, ScopePtr const& scope) + ValueBaseDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -126,7 +125,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new ValueBase (name, order, scope)); + return TypeDeclPtr (new ValueBaseDecl (name, order, scope)); } // Runtime declaration type information. @@ -144,27 +143,27 @@ namespace CCF }; typedef - StrictPtr<ValueBase> - ValueBasePtr; + StrictPtr<ValueBaseDecl> + ValueBaseDeclPtr; // // // - class Any : public virtual BuiltInTypeDef + class AnyDecl : public virtual BuiltInTypeDecl { public: virtual - ~Any () throw () {} + ~AnyDecl () throw () {} - Any (ScopePtr const& scope) + AnyDecl (ScopePtr const& scope) : Declaration (SimpleName ("any"), scope) { type_info (static_type_info ()); } protected: - Any (SimpleName const& name, Order const& order, ScopePtr const& scope) + AnyDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -176,7 +175,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Any (name, order, scope)); + return TypeDeclPtr (new AnyDecl (name, order, scope)); } // Runtime declaration type information. @@ -194,27 +193,27 @@ namespace CCF }; typedef - StrictPtr<Any> - AnyPtr; + StrictPtr<AnyDecl> + AnyDeclPtr; // // // - class Boolean : public virtual BuiltInTypeDef + class BooleanDecl : public virtual BuiltInTypeDecl { public: virtual - ~Boolean () throw () {} + ~BooleanDecl () throw () {} - Boolean (ScopePtr const& scope) + BooleanDecl (ScopePtr const& scope) : Declaration (SimpleName ("boolean"), scope) { type_info (static_type_info ()); } protected: - Boolean (SimpleName const& name, Order const& order, ScopePtr const& scope) + BooleanDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -226,7 +225,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Boolean (name, order, scope)); + return TypeDeclPtr (new BooleanDecl (name, order, scope)); } // Runtime declaration type information. @@ -244,27 +243,27 @@ namespace CCF }; typedef - StrictPtr<Boolean> - BooleanPtr; + StrictPtr<BooleanDecl> + BooleanDeclPtr; // // // - class Char : public virtual BuiltInTypeDef + class CharDecl : public virtual BuiltInTypeDecl { public: virtual - ~Char () throw () {} + ~CharDecl () throw () {} - Char (ScopePtr const& scope) + CharDecl (ScopePtr const& scope) : Declaration (SimpleName ("char"), scope) { type_info (static_type_info ()); } protected: - Char (SimpleName const& name, Order const& order, ScopePtr const& scope) + CharDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -276,7 +275,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Char (name, order, scope)); + return TypeDeclPtr (new CharDecl (name, order, scope)); } // Runtime declaration type information. @@ -294,27 +293,27 @@ namespace CCF }; typedef - StrictPtr<Char> - CharPtr; + StrictPtr<CharDecl> + CharDeclPtr; // // // - class Double : public virtual BuiltInTypeDef + class DoubleDecl : public virtual BuiltInTypeDecl { public: virtual - ~Double () throw () {} + ~DoubleDecl () throw () {} - Double (ScopePtr const& scope) + DoubleDecl (ScopePtr const& scope) : Declaration (SimpleName ("double"), scope) { type_info (static_type_info ()); } protected: - Double (SimpleName const& name, Order const& order, ScopePtr const& scope) + DoubleDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -326,7 +325,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Double (name, order, scope)); + return TypeDeclPtr (new DoubleDecl (name, order, scope)); } // Runtime declaration type information. @@ -344,27 +343,27 @@ namespace CCF }; typedef - StrictPtr<Double> - DoublePtr; + StrictPtr<DoubleDecl> + DoubleDeclPtr; // // // - class Float : public virtual BuiltInTypeDef + class FloatDecl : public virtual BuiltInTypeDecl { public: virtual - ~Float () throw () {} + ~FloatDecl () throw () {} - Float (ScopePtr const& scope) + FloatDecl (ScopePtr const& scope) : Declaration (SimpleName ("float"), scope) { type_info (static_type_info ()); } protected: - Float (SimpleName const& name, Order const& order, ScopePtr const& scope) + FloatDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -376,7 +375,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Float (name, order, scope)); + return TypeDeclPtr (new FloatDecl (name, order, scope)); } // Runtime declaration type information. @@ -394,27 +393,27 @@ namespace CCF }; typedef - StrictPtr<Float> - FloatPtr; + StrictPtr<FloatDecl> + FloatDeclPtr; // // // - class Long : public virtual BuiltInTypeDef + class LongDecl : public virtual BuiltInTypeDecl { public: virtual - ~Long () throw () {} + ~LongDecl () throw () {} - Long (ScopePtr const& scope) + LongDecl (ScopePtr const& scope) : Declaration (SimpleName ("long"), scope) { type_info (static_type_info ()); } protected: - Long (SimpleName const& name, Order const& order, ScopePtr const& scope) + LongDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -426,7 +425,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Long (name, order, scope)); + return TypeDeclPtr (new LongDecl (name, order, scope)); } // Runtime declaration type information. @@ -444,27 +443,27 @@ namespace CCF }; typedef - StrictPtr<Long> - LongPtr; + StrictPtr<LongDecl> + LongDeclPtr; // // // - class LongDouble : public virtual BuiltInTypeDef + class LongDoubleDecl : public virtual BuiltInTypeDecl { public: virtual - ~LongDouble () throw () {} + ~LongDoubleDecl () throw () {} - LongDouble (ScopePtr const& scope) + LongDoubleDecl (ScopePtr const& scope) : Declaration (SimpleName ("long double"), scope) { type_info (static_type_info ()); } protected: - LongDouble (SimpleName const& name, Order const& order, ScopePtr const& scope) + LongDoubleDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -476,7 +475,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new LongDouble (name, order, scope)); + return TypeDeclPtr (new LongDoubleDecl (name, order, scope)); } // Runtime declaration type information. @@ -494,27 +493,27 @@ namespace CCF }; typedef - StrictPtr<LongDouble> - LongDoublePtr; + StrictPtr<LongDoubleDecl> + LongDoubleDeclPtr; // // // - class LongLong : public virtual BuiltInTypeDef + class LongLongDecl : public virtual BuiltInTypeDecl { public: virtual - ~LongLong () throw () {} + ~LongLongDecl () throw () {} - LongLong (ScopePtr const& scope) + LongLongDecl (ScopePtr const& scope) : Declaration (SimpleName ("long long"), scope) { type_info (static_type_info ()); } protected: - LongLong (SimpleName const& name, Order const& order, ScopePtr const& scope) + LongLongDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -526,7 +525,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new LongLong (name, order, scope)); + return TypeDeclPtr (new LongLongDecl (name, order, scope)); } // Runtime declaration type information. @@ -544,27 +543,27 @@ namespace CCF }; typedef - StrictPtr<LongLong> - LongLongPtr; + StrictPtr<LongLongDecl> + LongLongDeclPtr; // // // - class Octet : public virtual BuiltInTypeDef + class OctetDecl : public virtual BuiltInTypeDecl { public: virtual - ~Octet () throw () {} + ~OctetDecl () throw () {} - Octet (ScopePtr const& scope) + OctetDecl (ScopePtr const& scope) : Declaration (SimpleName ("octet"), scope) { type_info (static_type_info ()); } protected: - Octet (SimpleName const& name, Order const& order, ScopePtr const& scope) + OctetDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -576,7 +575,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Octet (name, order, scope)); + return TypeDeclPtr (new OctetDecl (name, order, scope)); } // Runtime declaration type information. @@ -594,27 +593,27 @@ namespace CCF }; typedef - StrictPtr<Octet> - OctetPtr; + StrictPtr<OctetDecl> + OctetDeclPtr; // // // - class Short : public virtual BuiltInTypeDef + class ShortDecl : public virtual BuiltInTypeDecl { public: virtual - ~Short () throw () {} + ~ShortDecl () throw () {} - Short (ScopePtr const& scope) + ShortDecl (ScopePtr const& scope) : Declaration (SimpleName ("short"), scope) { type_info (static_type_info ()); } protected: - Short (SimpleName const& name, Order const& order, ScopePtr const& scope) + ShortDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -626,7 +625,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Short (name, order, scope)); + return TypeDeclPtr (new ShortDecl (name, order, scope)); } // Runtime declaration type information. @@ -644,27 +643,27 @@ namespace CCF }; typedef - StrictPtr<Short> - ShortPtr; + StrictPtr<ShortDecl> + ShortDeclPtr; // // // - class String : public virtual BuiltInTypeDef + class StringDecl : public virtual BuiltInTypeDecl { public: virtual - ~String () throw () {} + ~StringDecl () throw () {} - String (ScopePtr const& scope) + StringDecl (ScopePtr const& scope) : Declaration (SimpleName ("string"), scope) { type_info (static_type_info ()); } protected: - String (SimpleName const& name, Order const& order, ScopePtr const& scope) + StringDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -676,7 +675,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new String (name, order, scope)); + return TypeDeclPtr (new StringDecl (name, order, scope)); } // Runtime declaration type information. @@ -694,27 +693,27 @@ namespace CCF }; typedef - StrictPtr<String> - StringPtr; + StrictPtr<StringDecl> + StringDeclPtr; // // // - class UnsignedLong : public virtual BuiltInTypeDef + class UnsignedLongDecl : public virtual BuiltInTypeDecl { public: virtual - ~UnsignedLong () throw () {} + ~UnsignedLongDecl () throw () {} - UnsignedLong (ScopePtr const& scope) + UnsignedLongDecl (ScopePtr const& scope) : Declaration (SimpleName ("unsigned long"), scope) { type_info (static_type_info ()); } protected: - UnsignedLong (SimpleName const& name, Order const& order, ScopePtr const& scope) + UnsignedLongDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -726,7 +725,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new UnsignedLong (name, order, scope)); + return TypeDeclPtr (new UnsignedLongDecl (name, order, scope)); } // Runtime declaration type information. @@ -744,27 +743,27 @@ namespace CCF }; typedef - StrictPtr<UnsignedLong> - UnsignedLongPtr; + StrictPtr<UnsignedLongDecl> + UnsignedLongDeclPtr; // // // - class UnsignedLongLong : public virtual BuiltInTypeDef + class UnsignedLongLongDecl : public virtual BuiltInTypeDecl { public: virtual - ~UnsignedLongLong () throw () {} + ~UnsignedLongLongDecl () throw () {} - UnsignedLongLong (ScopePtr const& scope) + UnsignedLongLongDecl (ScopePtr const& scope) : Declaration (SimpleName ("unsigned long long"), scope) { type_info (static_type_info ()); } protected: - UnsignedLongLong (SimpleName const& name, Order const& order, ScopePtr const& scope) + UnsignedLongLongDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -776,7 +775,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new UnsignedLongLong (name, order, scope)); + return TypeDeclPtr (new UnsignedLongLongDecl (name, order, scope)); } // Runtime declaration type information. @@ -794,27 +793,27 @@ namespace CCF }; typedef - StrictPtr<UnsignedLongLong> - UnsignedLongLongPtr; + StrictPtr<UnsignedLongLongDecl> + UnsignedLongLongDeclPtr; // // // - class UnsignedShort : public virtual BuiltInTypeDef + class UnsignedShortDecl : public virtual BuiltInTypeDecl { public: virtual - ~UnsignedShort () throw () {} + ~UnsignedShortDecl () throw () {} - UnsignedShort (ScopePtr const& scope) + UnsignedShortDecl (ScopePtr const& scope) : Declaration (SimpleName ("unsigned short"), scope) { type_info (static_type_info ()); } protected: - UnsignedShort (SimpleName const& name, Order const& order, ScopePtr const& scope) + UnsignedShortDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -826,7 +825,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new UnsignedShort (name, order, scope)); + return TypeDeclPtr (new UnsignedShortDecl (name, order, scope)); } // Runtime declaration type information. @@ -844,27 +843,27 @@ namespace CCF }; typedef - StrictPtr<UnsignedShort> - UnsignedShortPtr; + StrictPtr<UnsignedShortDecl> + UnsignedShortDeclPtr; // // // - class Void : public virtual BuiltInTypeDef + class VoidDecl : public virtual BuiltInTypeDecl { public: virtual - ~Void () throw () {} + ~VoidDecl () throw () {} - Void (ScopePtr const& scope) + VoidDecl (ScopePtr const& scope) : Declaration (SimpleName ("void"), scope) { type_info (static_type_info ()); } protected: - Void (SimpleName const& name, Order const& order, ScopePtr const& scope) + VoidDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -876,7 +875,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Void (name, order, scope)); + return TypeDeclPtr (new VoidDecl (name, order, scope)); } // Runtime declaration type information. @@ -894,27 +893,27 @@ namespace CCF }; typedef - StrictPtr<Void> - VoidPtr; + StrictPtr<VoidDecl> + VoidDeclPtr; // // // - class Wchar : public virtual BuiltInTypeDef + class WcharDecl : public virtual BuiltInTypeDecl { public: virtual - ~Wchar () throw () {} + ~WcharDecl () throw () {} - Wchar (ScopePtr const& scope) + WcharDecl (ScopePtr const& scope) : Declaration (SimpleName ("wchar"), scope) { type_info (static_type_info ()); } protected: - Wchar (SimpleName const& name, Order const& order, ScopePtr const& scope) + WcharDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -926,7 +925,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Wchar (name, order, scope)); + return TypeDeclPtr (new WcharDecl (name, order, scope)); } // Runtime declaration type information. @@ -944,27 +943,27 @@ namespace CCF }; typedef - StrictPtr<Wchar> - WcharPtr; + StrictPtr<WcharDecl> + WcharDeclPtr; // // // - class Wstring : public virtual BuiltInTypeDef + class WstringDecl : public virtual BuiltInTypeDecl { public: virtual - ~Wstring () throw () {} + ~WstringDecl () throw () {} - Wstring (ScopePtr const& scope) + WstringDecl (ScopePtr const& scope) : Declaration (SimpleName ("wstring"), scope) { type_info (static_type_info ()); } protected: - Wstring (SimpleName const& name, Order const& order, ScopePtr const& scope) + WstringDecl (SimpleName const& name, Order const& order, ScopePtr const& scope) : Declaration (name, order, scope) { type_info (static_type_info ()); @@ -976,7 +975,7 @@ namespace CCF Order const& order, ScopePtr const& scope) { - return TypeDeclPtr (new Wstring (name, order, scope)); + return TypeDeclPtr (new WstringDecl (name, order, scope)); } // Runtime declaration type information. @@ -994,8 +993,8 @@ namespace CCF }; typedef - StrictPtr<Wstring> - WstringPtr; + StrictPtr<WstringDecl> + WstringDeclPtr; } } } diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp.m4 b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp.m4 index dd0e3b95f1c..11512e84f68 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp.m4 +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp.m4 @@ -13,7 +13,7 @@ define(`built_in_type_impl', ` // // // - class $1 : public virtual BuiltInTypeDef + class $1 : public virtual BuiltInTypeDecl { public: virtual @@ -83,23 +83,22 @@ namespace CCF // // // - class BuiltInTypeDef : public virtual TypeDef + class BuiltInTypeDecl : public virtual TypeDecl { protected: virtual - ~BuiltInTypeDef () throw () {} + ~BuiltInTypeDecl () throw () {} - BuiltInTypeDef () + BuiltInTypeDecl () { type_info (static_type_info ()); } - // Runtime declaration type information public: - virtual std::string - declaration_class () + virtual bool + complete () const { - return "built-in type"; + return true; } public: @@ -108,8 +107,8 @@ namespace CCF }; typedef - StrictPtr<BuiltInTypeDef> - BuiltInTypeDefPtr; + StrictPtr<BuiltInTypeDecl> + BuiltInTypeDeclPtr; dnl built_in_type(`Object') built_in_type(`ValueBase') diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.m4 b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.m4 index f51605dcc2d..858576a9000 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.m4 +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/BuiltIn.m4 @@ -12,6 +12,6 @@ define(`capitalize_word', define(`capitalize', `patsubst(`$1', `\w+', `capitalize_word(`\&')')') -define(`make_class_name', `patsubst(capitalize(`$1'), ` ')') +define(`make_class_name', `patsubst(capitalize(`$1'), ` ')Decl') -define(`make_var_name', `patsubst(`$1', ` ', `_')') +define(`make_var_name', `patsubst(`$1', ` ', `_')_decl') diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.cpp index df663a79876..7e4066e356e 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.cpp @@ -404,7 +404,9 @@ namespace CCF type_decl_init_ () { TypeInfo ti (typeid (TypeDecl)); - ti.add_base (Access::PUBLIC, true, Declaration::static_type_info ()); + ti.add_base ( + Access::PUBLIC, true, Declaration::static_type_info ()); + return ti; } @@ -414,6 +416,28 @@ namespace CCF TypeInfo const& TypeDecl:: static_type_info () { return type_decl_; } + // ForwardDeclarableTypeDecl + // + // + namespace + { + TypeInfo + forward_declarable_type_decl_init_ () + { + TypeInfo ti (typeid (TypeDecl)); + ti.add_base ( + Access::PUBLIC, true, TypeDecl::static_type_info ()); + + return ti; + } + + TypeInfo forward_declarable_type_decl_ ( + forward_declarable_type_decl_init_ ()); + } + + TypeInfo const& ForwardDeclarableTypeDecl:: + static_type_info () { return forward_declarable_type_decl_; } + // TypeForwardDecl // @@ -424,7 +448,11 @@ namespace CCF type_forward_decl_init_ () { TypeInfo ti (typeid (TypeForwardDecl)); - ti.add_base (Access::PUBLIC, true, TypeDecl::static_type_info ()); + + ti.add_base (Access::PUBLIC, + true, + ForwardDeclarableTypeDecl::static_type_info ()); + return ti; } @@ -444,7 +472,9 @@ namespace CCF type_def_init_ () { TypeInfo ti (typeid (TypeDef)); - ti.add_base (Access::PUBLIC, true, TypeDecl::static_type_info ()); + ti.add_base (Access::PUBLIC, + true, + ForwardDeclarableTypeDecl::static_type_info ()); return ti; } diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.hpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.hpp index 8499e7cdd80..221142d22b4 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Elements.hpp @@ -700,10 +700,7 @@ namespace CCF // for diagnistic. public: virtual std::string - declaration_class () - { - return "declaration"; - } + declaration_class () = 0; public: static Introspection::TypeInfo const& @@ -903,14 +900,6 @@ namespace CCF Order peek_order (); - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "scope"; - } - public: static Introspection::TypeInfo const& static_type_info (); @@ -956,37 +945,55 @@ namespace CCF Order const& order, ScopePtr const& scope) = 0; - // Type completeness. // public: virtual bool - defined () const = 0; + complete () const = 0; - - // Runtime declaration type information. - // public: - virtual std::string - declaration_class () + static Introspection::TypeInfo const& + static_type_info (); + }; + + typedef + DeclarationRef<TypeDecl> + TypeDeclRef; + + + + // + // + // + class ForwardDeclarableTypeDecl : public virtual TypeDecl + { + protected: + virtual + ~ForwardDeclarableTypeDecl () throw () {} + + ForwardDeclarableTypeDecl () { - return "type"; + type_info (static_type_info ()); } public: + virtual bool + defined () const = 0; + + public: static Introspection::TypeInfo const& static_type_info (); }; typedef - DeclarationRef<TypeDecl> - TypeDeclRef; + StrictPtr<ForwardDeclarableTypeDecl> + ForwardDeclarableTypeDeclPtr; // // // - class TypeForwardDecl : public virtual TypeDecl + class TypeForwardDecl : public virtual ForwardDeclarableTypeDecl { protected: virtual @@ -997,7 +1004,6 @@ namespace CCF type_info (static_type_info ()); } - // Type completeness public: virtual bool defined () const @@ -1005,24 +1011,20 @@ namespace CCF return false; } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "type"; - } - public: static Introspection::TypeInfo const& static_type_info (); }; + typedef + StrictPtr<TypeForwardDecl> + TypeForwardDeclPtr; + // // // - class TypeDef : public virtual TypeDecl + class TypeDef : public virtual ForwardDeclarableTypeDecl { protected: virtual @@ -1033,7 +1035,6 @@ namespace CCF type_info (static_type_info ()); } - // Type completeness public: virtual bool defined () const @@ -1041,14 +1042,6 @@ namespace CCF return true; } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "type"; - } - public: static Introspection::TypeInfo const& static_type_info (); diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Interface.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Interface.cpp index 0a72da83997..c57d9f39808 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Interface.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Interface.cpp @@ -21,7 +21,9 @@ namespace CCF interface_decl_init_ () { TypeInfo ti (typeid (InterfaceDecl)); - ti.add_base (Access::PUBLIC, true, TypeDecl::static_type_info ()); + ti.add_base (Access::PUBLIC, + true, + ForwardDeclarableTypeDecl::static_type_info ()); return ti; } diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Interface.hpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Interface.hpp index 1a47d2c6ebb..ecccc5fb595 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Interface.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Interface.hpp @@ -17,7 +17,7 @@ namespace CCF // // // - class InterfaceDecl : public virtual TypeDecl + class InterfaceDecl : public virtual ForwardDeclarableTypeDecl { protected: virtual @@ -28,12 +28,14 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information public: - virtual std::string - declaration_class () + virtual bool + complete () const { - return "interface"; + // Interface is considered complete even if it's + // not defined. + // + return true; } public: @@ -81,14 +83,6 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "interface"; - } - public: static Introspection::TypeInfo const& static_type_info (); @@ -171,15 +165,6 @@ namespace CCF return s; } - // Runtime declaration type information. - // - public: - virtual std::string - declaration_class () - { - return "interface"; - } - public: static Introspection::TypeInfo const& static_type_info (); @@ -219,14 +204,6 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "abstract interface"; - } - public: static Introspection::TypeInfo const& static_type_info (); @@ -272,8 +249,6 @@ namespace CCF new AbstractInterfaceForwardDecl (name, order, scope)); } - // Runtime declaration type information. - // public: virtual std::string declaration_class () @@ -327,8 +302,7 @@ namespace CCF new AbstractInterfaceDef (name, order, scope, inherits ())); } - // Runtime declaration type information. - // + public: virtual std::string declaration_class () @@ -359,14 +333,6 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "local interface"; - } - public: static Introspection::TypeInfo const& static_type_info (); @@ -413,8 +379,6 @@ namespace CCF new LocalInterfaceForwardDecl (name, order, scope)); } - // Runtime declaration type information. - // public: virtual std::string declaration_class () @@ -468,8 +432,7 @@ namespace CCF new LocalInterfaceDef (name, order, scope, inherits ())); } - // Runtime declaration type information. - // + public: virtual std::string declaration_class () @@ -501,14 +464,6 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "unconstrained interface"; - } - public: static Introspection::TypeInfo const& static_type_info (); @@ -565,7 +520,6 @@ namespace CCF new UnconstrainedInterfaceForwardDecl (name, order, scope)); } - // Runtime declaration type information public: virtual std::string declaration_class () @@ -620,7 +574,7 @@ namespace CCF new UnconstrainedInterfaceDef (name, order, scope, inherits ())); } - // Runtime declaration type information + public: virtual std::string declaration_class () diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Sequence.hpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Sequence.hpp index 391a7b2d178..a01d467bd8d 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Sequence.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Sequence.hpp @@ -32,32 +32,23 @@ namespace CCF // This c-tor is never called. // SequenceDecl (); - + public: TypeDeclPtr - type () + type () const { return type_.resolve (); } public: virtual bool - defined () const - { - //@@ TODO - return true; - } - - // Runtime declaration type information. - // - public: - virtual std::string - declaration_class () + complete () const { - return "sequence"; + // Sequence is complete if and only if its type is complete. + // + return type ()->complete (); } - public: static Utility::Introspection::TypeInfo const& static_type_info (); @@ -90,7 +81,7 @@ namespace CCF { type_info (static_type_info ()); } - + public: virtual TypeDeclPtr clone_typedef_temporary (SimpleName const& name, @@ -103,8 +94,8 @@ namespace CCF scope, type ()->name ())); } - - // Runtime declaration type information + + public: virtual std::string declaration_class () diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.cpp index 4d62cf00e65..3328e451cfb 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.cpp @@ -67,7 +67,7 @@ namespace CCF } TypeDeclPtr TypedefDecl:: - underlying_type () + underlying_type () const { // Try to return TypeDef if there is one, otherwise TypeDecl. // @@ -113,13 +113,6 @@ namespace CCF scope ()); } - - bool TypedefDecl:: - defined () const - { - return is_a (TypeDef::static_type_info ()); - } - namespace { TypeInfo diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp index 816c74a0117..cdd7b5a2024 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/Typedef.hpp @@ -43,14 +43,13 @@ namespace CCF virtual NodePtr virtual_type (); - // Type completeness. - // public: virtual bool - defined () const; + complete () const + { + return underlying_type ()->complete (); + } - // Runtime declaration type information. - // public: virtual std::string declaration_class () @@ -64,7 +63,7 @@ namespace CCF private: TypeDeclPtr - underlying_type (); + underlying_type () const; private: ScopedName type_; diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueType.cpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueType.cpp index 368422630c5..b2d392c4fd9 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueType.cpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueType.cpp @@ -22,7 +22,9 @@ namespace CCF value_decl_init_ () { TypeInfo ti (typeid (ValueTypeDecl)); - ti.add_base (Access::PUBLIC, true, TypeDecl::static_type_info ()); + ti.add_base (Access::PUBLIC, + true, + ForwardDeclarableTypeDecl::static_type_info ()); return ti; } @@ -45,7 +47,7 @@ namespace CCF ti.add_base (Access::PUBLIC, true, ValueTypeDecl::static_type_info ()); - + ti.add_base (Access::PUBLIC, true, TypeForwardDecl::static_type_info ()); diff --git a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueType.hpp b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueType.hpp index 7b475983317..7e931d7dd05 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueType.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/SyntaxTree/ValueType.hpp @@ -17,7 +17,7 @@ namespace CCF // // // - class ValueTypeDecl : public virtual TypeDecl + class ValueTypeDecl : public virtual ForwardDeclarableTypeDecl { protected: virtual @@ -28,15 +28,16 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information public: - virtual std::string - declaration_class () + virtual bool + complete () const { - return "value"; + // Valuetype is considered complete even if it's + // not defined. + // + return true; } - public: static Utility::Introspection::TypeInfo const& static_type_info (); @@ -82,14 +83,6 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "value"; - } - public: static Utility::Introspection::TypeInfo const& static_type_info (); @@ -171,15 +164,6 @@ namespace CCF return s; } - - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "value"; - } - public: static Utility::Introspection::TypeInfo const& static_type_info (); diff --git a/TAO/CIAO/CCF/CCF/IDL2/Traversal/BuiltIn.hpp b/TAO/CIAO/CCF/CCF/IDL2/Traversal/BuiltIn.hpp index e83bcb16447..cd47d8065ed 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/Traversal/BuiltIn.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/Traversal/BuiltIn.hpp @@ -18,24 +18,24 @@ namespace CCF namespace Traversal { - // BuiltInTypeDef + // BuiltInTypeDecl // // - struct BuiltInTypeDef : Traverser + struct BuiltInTypeDecl : Traverser { typedef - SyntaxTree::BuiltInTypeDefPtr + SyntaxTree::BuiltInTypeDeclPtr NodePtr; - BuiltInTypeDef () + BuiltInTypeDecl () { - map (typeid (SyntaxTree::BuiltInTypeDef), this); + map (typeid (SyntaxTree::BuiltInTypeDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::BuiltInTypeDef> ()); + traverse (n->dynamic_type<SyntaxTree::BuiltInTypeDecl> ()); return true; } @@ -47,24 +47,24 @@ namespace CCF }; - // Object + // ObjectDecl // // - struct Object : Traverser + struct ObjectDecl : Traverser { typedef - SyntaxTree::ObjectPtr + SyntaxTree::ObjectDeclPtr NodePtr; - Object () + ObjectDecl () { - map (typeid (SyntaxTree::Object), this); + map (typeid (SyntaxTree::ObjectDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Object> ()); + traverse (n->dynamic_type<SyntaxTree::ObjectDecl> ()); return true; } @@ -76,24 +76,24 @@ namespace CCF }; - // ValueBase + // ValueBaseDecl // // - struct ValueBase : Traverser + struct ValueBaseDecl : Traverser { typedef - SyntaxTree::ValueBasePtr + SyntaxTree::ValueBaseDeclPtr NodePtr; - ValueBase () + ValueBaseDecl () { - map (typeid (SyntaxTree::ValueBase), this); + map (typeid (SyntaxTree::ValueBaseDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::ValueBase> ()); + traverse (n->dynamic_type<SyntaxTree::ValueBaseDecl> ()); return true; } @@ -105,24 +105,24 @@ namespace CCF }; - // Any + // AnyDecl // // - struct Any : Traverser + struct AnyDecl : Traverser { typedef - SyntaxTree::AnyPtr + SyntaxTree::AnyDeclPtr NodePtr; - Any () + AnyDecl () { - map (typeid (SyntaxTree::Any), this); + map (typeid (SyntaxTree::AnyDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Any> ()); + traverse (n->dynamic_type<SyntaxTree::AnyDecl> ()); return true; } @@ -134,24 +134,24 @@ namespace CCF }; - // Boolean + // BooleanDecl // // - struct Boolean : Traverser + struct BooleanDecl : Traverser { typedef - SyntaxTree::BooleanPtr + SyntaxTree::BooleanDeclPtr NodePtr; - Boolean () + BooleanDecl () { - map (typeid (SyntaxTree::Boolean), this); + map (typeid (SyntaxTree::BooleanDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Boolean> ()); + traverse (n->dynamic_type<SyntaxTree::BooleanDecl> ()); return true; } @@ -163,24 +163,24 @@ namespace CCF }; - // Char + // CharDecl // // - struct Char : Traverser + struct CharDecl : Traverser { typedef - SyntaxTree::CharPtr + SyntaxTree::CharDeclPtr NodePtr; - Char () + CharDecl () { - map (typeid (SyntaxTree::Char), this); + map (typeid (SyntaxTree::CharDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Char> ()); + traverse (n->dynamic_type<SyntaxTree::CharDecl> ()); return true; } @@ -192,24 +192,24 @@ namespace CCF }; - // Double + // DoubleDecl // // - struct Double : Traverser + struct DoubleDecl : Traverser { typedef - SyntaxTree::DoublePtr + SyntaxTree::DoubleDeclPtr NodePtr; - Double () + DoubleDecl () { - map (typeid (SyntaxTree::Double), this); + map (typeid (SyntaxTree::DoubleDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Double> ()); + traverse (n->dynamic_type<SyntaxTree::DoubleDecl> ()); return true; } @@ -221,24 +221,24 @@ namespace CCF }; - // Float + // FloatDecl // // - struct Float : Traverser + struct FloatDecl : Traverser { typedef - SyntaxTree::FloatPtr + SyntaxTree::FloatDeclPtr NodePtr; - Float () + FloatDecl () { - map (typeid (SyntaxTree::Float), this); + map (typeid (SyntaxTree::FloatDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Float> ()); + traverse (n->dynamic_type<SyntaxTree::FloatDecl> ()); return true; } @@ -250,24 +250,24 @@ namespace CCF }; - // Long + // LongDecl // // - struct Long : Traverser + struct LongDecl : Traverser { typedef - SyntaxTree::LongPtr + SyntaxTree::LongDeclPtr NodePtr; - Long () + LongDecl () { - map (typeid (SyntaxTree::Long), this); + map (typeid (SyntaxTree::LongDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Long> ()); + traverse (n->dynamic_type<SyntaxTree::LongDecl> ()); return true; } @@ -279,24 +279,24 @@ namespace CCF }; - // LongDouble + // LongDoubleDecl // // - struct LongDouble : Traverser + struct LongDoubleDecl : Traverser { typedef - SyntaxTree::LongDoublePtr + SyntaxTree::LongDoubleDeclPtr NodePtr; - LongDouble () + LongDoubleDecl () { - map (typeid (SyntaxTree::LongDouble), this); + map (typeid (SyntaxTree::LongDoubleDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::LongDouble> ()); + traverse (n->dynamic_type<SyntaxTree::LongDoubleDecl> ()); return true; } @@ -308,24 +308,24 @@ namespace CCF }; - // LongLong + // LongLongDecl // // - struct LongLong : Traverser + struct LongLongDecl : Traverser { typedef - SyntaxTree::LongLongPtr + SyntaxTree::LongLongDeclPtr NodePtr; - LongLong () + LongLongDecl () { - map (typeid (SyntaxTree::LongLong), this); + map (typeid (SyntaxTree::LongLongDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::LongLong> ()); + traverse (n->dynamic_type<SyntaxTree::LongLongDecl> ()); return true; } @@ -337,24 +337,24 @@ namespace CCF }; - // Octet + // OctetDecl // // - struct Octet : Traverser + struct OctetDecl : Traverser { typedef - SyntaxTree::OctetPtr + SyntaxTree::OctetDeclPtr NodePtr; - Octet () + OctetDecl () { - map (typeid (SyntaxTree::Octet), this); + map (typeid (SyntaxTree::OctetDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Octet> ()); + traverse (n->dynamic_type<SyntaxTree::OctetDecl> ()); return true; } @@ -366,24 +366,24 @@ namespace CCF }; - // Short + // ShortDecl // // - struct Short : Traverser + struct ShortDecl : Traverser { typedef - SyntaxTree::ShortPtr + SyntaxTree::ShortDeclPtr NodePtr; - Short () + ShortDecl () { - map (typeid (SyntaxTree::Short), this); + map (typeid (SyntaxTree::ShortDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Short> ()); + traverse (n->dynamic_type<SyntaxTree::ShortDecl> ()); return true; } @@ -395,24 +395,24 @@ namespace CCF }; - // String + // StringDecl // // - struct String : Traverser + struct StringDecl : Traverser { typedef - SyntaxTree::StringPtr + SyntaxTree::StringDeclPtr NodePtr; - String () + StringDecl () { - map (typeid (SyntaxTree::String), this); + map (typeid (SyntaxTree::StringDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::String> ()); + traverse (n->dynamic_type<SyntaxTree::StringDecl> ()); return true; } @@ -424,24 +424,24 @@ namespace CCF }; - // UnsignedLong + // UnsignedLongDecl // // - struct UnsignedLong : Traverser + struct UnsignedLongDecl : Traverser { typedef - SyntaxTree::UnsignedLongPtr + SyntaxTree::UnsignedLongDeclPtr NodePtr; - UnsignedLong () + UnsignedLongDecl () { - map (typeid (SyntaxTree::UnsignedLong), this); + map (typeid (SyntaxTree::UnsignedLongDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::UnsignedLong> ()); + traverse (n->dynamic_type<SyntaxTree::UnsignedLongDecl> ()); return true; } @@ -453,24 +453,24 @@ namespace CCF }; - // UnsignedLongLong + // UnsignedLongLongDecl // // - struct UnsignedLongLong : Traverser + struct UnsignedLongLongDecl : Traverser { typedef - SyntaxTree::UnsignedLongLongPtr + SyntaxTree::UnsignedLongLongDeclPtr NodePtr; - UnsignedLongLong () + UnsignedLongLongDecl () { - map (typeid (SyntaxTree::UnsignedLongLong), this); + map (typeid (SyntaxTree::UnsignedLongLongDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::UnsignedLongLong> ()); + traverse (n->dynamic_type<SyntaxTree::UnsignedLongLongDecl> ()); return true; } @@ -482,24 +482,24 @@ namespace CCF }; - // UnsignedShort + // UnsignedShortDecl // // - struct UnsignedShort : Traverser + struct UnsignedShortDecl : Traverser { typedef - SyntaxTree::UnsignedShortPtr + SyntaxTree::UnsignedShortDeclPtr NodePtr; - UnsignedShort () + UnsignedShortDecl () { - map (typeid (SyntaxTree::UnsignedShort), this); + map (typeid (SyntaxTree::UnsignedShortDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::UnsignedShort> ()); + traverse (n->dynamic_type<SyntaxTree::UnsignedShortDecl> ()); return true; } @@ -511,24 +511,24 @@ namespace CCF }; - // Void + // VoidDecl // // - struct Void : Traverser + struct VoidDecl : Traverser { typedef - SyntaxTree::VoidPtr + SyntaxTree::VoidDeclPtr NodePtr; - Void () + VoidDecl () { - map (typeid (SyntaxTree::Void), this); + map (typeid (SyntaxTree::VoidDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Void> ()); + traverse (n->dynamic_type<SyntaxTree::VoidDecl> ()); return true; } @@ -540,24 +540,24 @@ namespace CCF }; - // Wchar + // WcharDecl // // - struct Wchar : Traverser + struct WcharDecl : Traverser { typedef - SyntaxTree::WcharPtr + SyntaxTree::WcharDeclPtr NodePtr; - Wchar () + WcharDecl () { - map (typeid (SyntaxTree::Wchar), this); + map (typeid (SyntaxTree::WcharDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Wchar> ()); + traverse (n->dynamic_type<SyntaxTree::WcharDecl> ()); return true; } @@ -569,24 +569,24 @@ namespace CCF }; - // Wstring + // WstringDecl // // - struct Wstring : Traverser + struct WstringDecl : Traverser { typedef - SyntaxTree::WstringPtr + SyntaxTree::WstringDeclPtr NodePtr; - Wstring () + WstringDecl () { - map (typeid (SyntaxTree::Wstring), this); + map (typeid (SyntaxTree::WstringDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::Wstring> ()); + traverse (n->dynamic_type<SyntaxTree::WstringDecl> ()); return true; } diff --git a/TAO/CIAO/CCF/CCF/IDL2/Traversal/BuiltIn.hpp.m4 b/TAO/CIAO/CCF/CCF/IDL2/Traversal/BuiltIn.hpp.m4 index 0d4b4d99564..8177461a208 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/Traversal/BuiltIn.hpp.m4 +++ b/TAO/CIAO/CCF/CCF/IDL2/Traversal/BuiltIn.hpp.m4 @@ -57,24 +57,24 @@ namespace CCF namespace Traversal { - // BuiltInTypeDef + // BuiltInTypeDecl // // - struct BuiltInTypeDef : Traverser + struct BuiltInTypeDecl : Traverser { typedef - SyntaxTree::BuiltInTypeDefPtr + SyntaxTree::BuiltInTypeDeclPtr NodePtr; - BuiltInTypeDef () + BuiltInTypeDecl () { - map (typeid (SyntaxTree::BuiltInTypeDef), this); + map (typeid (SyntaxTree::BuiltInTypeDecl), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { - traverse (n->dynamic_type<SyntaxTree::BuiltInTypeDef> ()); + traverse (n->dynamic_type<SyntaxTree::BuiltInTypeDecl> ()); return true; } @@ -85,25 +85,25 @@ namespace CCF } }; dnl -built_in_type(`Object') -built_in_type(`ValueBase') -built_in_type(`Any') -built_in_type(`Boolean') -built_in_type(`Char') -built_in_type(`Double') -built_in_type(`Float') -built_in_type(`Long') -built_in_type(`LongDouble') -built_in_type(`LongLong') -built_in_type(`Octet') -built_in_type(`Short') -built_in_type(`String') -built_in_type(`UnsignedLong') -built_in_type(`UnsignedLongLong') -built_in_type(`UnsignedShort') -built_in_type(`Void') -built_in_type(`Wchar') -built_in_type(`Wstring') +built_in_type(`ObjectDecl') +built_in_type(`ValueBaseDecl') +built_in_type(`AnyDecl') +built_in_type(`BooleanDecl') +built_in_type(`CharDecl') +built_in_type(`DoubleDecl') +built_in_type(`FloatDecl') +built_in_type(`LongDecl') +built_in_type(`LongDoubleDecl') +built_in_type(`LongLongDecl') +built_in_type(`OctetDecl') +built_in_type(`ShortDecl') +built_in_type(`StringDecl') +built_in_type(`UnsignedLongDecl') +built_in_type(`UnsignedLongLongDecl') +built_in_type(`UnsignedShortDecl') +built_in_type(`VoidDecl') +built_in_type(`WcharDecl') +built_in_type(`WstringDecl') dnl } } diff --git a/TAO/CIAO/CCF/CCF/IDL2/Traversal/Elements.hpp b/TAO/CIAO/CCF/CCF/IDL2/Traversal/Elements.hpp index a706576f99e..6314650d860 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/Traversal/Elements.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/Traversal/Elements.hpp @@ -330,6 +330,65 @@ namespace CCF // // // + struct ForwardDeclarableTypeDecl : Traverser + { + typedef + SyntaxTree::ForwardDeclarableTypeDeclPtr + NodePtr; + + ForwardDeclarableTypeDecl () + { + map (typeid (SyntaxTree::ForwardDeclarableTypeDecl), this); + } + + virtual bool + traverse (SyntaxTree::NodePtr const& n) + { + traverse ( + n->dynamic_type<SyntaxTree::ForwardDeclarableTypeDecl> ()); + return true; + } + + virtual void + traverse (NodePtr const& n) + { + delegate (n); + } + }; + + + // + // + // + struct TypeForwardDecl : Traverser + { + typedef + SyntaxTree::TypeForwardDeclPtr + NodePtr; + + TypeForwardDecl () + { + map (typeid (SyntaxTree::TypeForwardDecl), this); + } + + virtual bool + traverse (SyntaxTree::NodePtr const& n) + { + traverse (n->dynamic_type<SyntaxTree::TypeForwardDecl> ()); + return true; + } + + virtual void + traverse (NodePtr const& n) + { + delegate (n); + } + }; + + + // + // + // struct TypeDef : Traverser { typedef diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp index 90d03ead3d7..79245be6148 100644 --- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp +++ b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp @@ -70,9 +70,9 @@ namespace CCF if (!d->is_a<ComponentDecl> ()) { throw IncompatibleType (d->declaration_class ()); - } + } - return d->dynamic_type<TypeDecl> ()->defined (); + return d->dynamic_type<ComponentDecl> ()->defined (); } } p; @@ -138,13 +138,13 @@ namespace CCF { // Spec doesn't say anything about which interfaces // component can support. - + if (!d->is_a<UnconstrainedInterfaceDecl> ()) { throw IncompatibleType (d->declaration_class ()); } - return d->dynamic_type<TypeDecl> ()->defined (); + return d->dynamic_type<InterfaceDecl> ()->defined (); } } p; diff --git a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp index eb0396a354b..ed8cb617e6c 100644 --- a/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp +++ b/TAO/CIAO/CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp @@ -74,7 +74,7 @@ namespace CCF // This is not really necessary since home cannot be // forward-declared (yet ;-). - return d->dynamic_type<TypeDecl> ()->defined (); + return d->dynamic_type<HomeDef> ()->defined (); } } p; @@ -144,8 +144,8 @@ namespace CCF { throw IncompatibleType (d->declaration_class ()); } - - return d->dynamic_type<TypeDecl> ()->defined (); + + return d->dynamic_type<InterfaceDecl> ()->defined (); } } p; @@ -219,7 +219,7 @@ namespace CCF throw IncompatibleType (d->declaration_class ()); } - return d->dynamic_type<TypeDecl>()->defined (); + return d->dynamic_type<ComponentDecl>()->defined (); } } p; diff --git a/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Component.cpp b/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Component.cpp index 52abc26dcda..972df7017a4 100644 --- a/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Component.cpp +++ b/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Component.cpp @@ -12,7 +12,7 @@ namespace CCF { namespace SyntaxTree { - + // ComponentDecl // // @@ -22,7 +22,9 @@ namespace CCF component_decl_init_ () { TypeInfo ti (typeid (ComponentDecl)); - ti.add_base (Access::PUBLIC, true, TypeDecl::static_type_info ()); + ti.add_base (Access::PUBLIC, + true, + ForwardDeclarableTypeDecl::static_type_info ()); return ti; } @@ -32,7 +34,7 @@ namespace CCF TypeInfo const& ComponentDecl:: static_type_info () { return component_decl_; } - + // ComponentForwardDecl // // diff --git a/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Component.hpp b/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Component.hpp index a319c824e0a..8c812751126 100644 --- a/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Component.hpp +++ b/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Component.hpp @@ -21,7 +21,7 @@ namespace CCF // // // - class ComponentDecl : public virtual TypeDecl + class ComponentDecl : public virtual ForwardDeclarableTypeDecl { protected: virtual @@ -32,14 +32,16 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information public: - virtual std::string - declaration_class () + virtual bool + complete () const { - return "component"; + // Component is considered complete even if it's + // not defined. + // + return true; } - + public: static Introspection::TypeInfo const& static_type_info (); @@ -90,7 +92,7 @@ namespace CCF new ComponentForwardDecl (name, order, scope)); } - // Runtime declaration type information + public: virtual std::string declaration_class () @@ -210,7 +212,7 @@ namespace CCF return supports_.end (); } - // Runtime declaration type information + public: virtual std::string declaration_class () diff --git a/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/EventType.hpp b/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/EventType.hpp index 2f064728980..329e2177d07 100644 --- a/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/EventType.hpp +++ b/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/EventType.hpp @@ -31,14 +31,6 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "event type"; - } - public: static Introspection::TypeInfo const& static_type_info (); @@ -64,14 +56,6 @@ namespace CCF type_info (static_type_info ()); } - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "event type"; - } - public: static Introspection::TypeInfo const& static_type_info (); @@ -92,15 +76,7 @@ namespace CCF { type_info (static_type_info ()); } - - // Runtime declaration type information - public: - virtual std::string - declaration_class () - { - return "event type"; - } - + public: static Introspection::TypeInfo const& static_type_info (); @@ -120,8 +96,7 @@ namespace CCF { type_info (static_type_info ()); } - - // Runtime declaration type information + public: virtual std::string declaration_class () @@ -180,7 +155,7 @@ namespace CCF new ConcreteEventTypeDef (name, order, scope, inherits ())); } - // Runtime declaration type information + public: virtual std::string declaration_class () diff --git a/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Home.hpp b/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Home.hpp index 196a38b8a2a..d9b983cb463 100644 --- a/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Home.hpp +++ b/TAO/CIAO/CCF/CCF/IDL3/SyntaxTree/Home.hpp @@ -15,7 +15,8 @@ namespace CCF { namespace SyntaxTree { - // Import nodes from IDL2 + // Import nodes from IDL2. + // using namespace IDL2::SyntaxTree; // According to the spec Home cannot be forward-declared. Did they @@ -95,7 +96,7 @@ namespace CCF supports_, manages_)); } - + private: void copy_supports_list (ScopedNameSet const& supports) @@ -139,6 +140,13 @@ namespace CCF return manages_.resolve (); } + public: + virtual bool + complete () const + { + return true; + } + // Runtime declaration type information public: virtual std::string diff --git a/TAO/CIAO/CCF/Example/CIDL/LocalExecutorMapping/ExecutorMappingGenerator.cpp b/TAO/CIAO/CCF/Example/CIDL/LocalExecutorMapping/ExecutorMappingGenerator.cpp index 3053be45db7..bc8227271de 100644 --- a/TAO/CIAO/CCF/Example/CIDL/LocalExecutorMapping/ExecutorMappingGenerator.cpp +++ b/TAO/CIAO/CCF/Example/CIDL/LocalExecutorMapping/ExecutorMappingGenerator.cpp @@ -287,7 +287,7 @@ namespace // // // - class TypeNameEmitter : public Traversal::BuiltInTypeDef, + class TypeNameEmitter : public Traversal::BuiltInTypeDecl, public Traversal::TypeDecl { public: @@ -297,7 +297,7 @@ namespace } virtual void - traverse (BuiltInTypeDefPtr const& t) + traverse (BuiltInTypeDeclPtr const& t) { os << t->name ().simple (); } diff --git a/TAO/CIAO/CCF/Example/CIDL/LocalExecutorMapping/cidlc.cpp b/TAO/CIAO/CCF/Example/CIDL/LocalExecutorMapping/cidlc.cpp index 7e7036b712e..fd59203331f 100644 --- a/TAO/CIAO/CCF/Example/CIDL/LocalExecutorMapping/cidlc.cpp +++ b/TAO/CIAO/CCF/Example/CIDL/LocalExecutorMapping/cidlc.cpp @@ -174,25 +174,25 @@ int main (int argc, char* argv[]) ScopePtr s = builtin->scope (); - s->insert (BuiltInTypeDefPtr (new Object (s))); - s->insert (BuiltInTypeDefPtr (new ValueBase (s))); - s->insert (BuiltInTypeDefPtr (new Any (s))); - s->insert (BuiltInTypeDefPtr (new Boolean (s))); - s->insert (BuiltInTypeDefPtr (new Char (s))); - s->insert (BuiltInTypeDefPtr (new Double (s))); - s->insert (BuiltInTypeDefPtr (new Float (s))); - s->insert (BuiltInTypeDefPtr (new Long (s))); - s->insert (BuiltInTypeDefPtr (new LongDouble (s))); - s->insert (BuiltInTypeDefPtr (new LongLong (s))); - s->insert (BuiltInTypeDefPtr (new Octet (s))); - s->insert (BuiltInTypeDefPtr (new Short (s))); - s->insert (BuiltInTypeDefPtr (new String (s))); - s->insert (BuiltInTypeDefPtr (new UnsignedLong (s))); - s->insert (BuiltInTypeDefPtr (new UnsignedLongLong (s))); - s->insert (BuiltInTypeDefPtr (new UnsignedShort (s))); - s->insert (BuiltInTypeDefPtr (new Void (s))); - s->insert (BuiltInTypeDefPtr (new Wchar (s))); - s->insert (BuiltInTypeDefPtr (new Wstring (s))); + s->insert (BuiltInTypeDeclPtr (new ObjectDecl (s))); + s->insert (BuiltInTypeDeclPtr (new ValueBaseDecl (s))); + s->insert (BuiltInTypeDeclPtr (new AnyDecl (s))); + s->insert (BuiltInTypeDeclPtr (new BooleanDecl (s))); + s->insert (BuiltInTypeDeclPtr (new CharDecl (s))); + s->insert (BuiltInTypeDeclPtr (new DoubleDecl (s))); + s->insert (BuiltInTypeDeclPtr (new FloatDecl (s))); + s->insert (BuiltInTypeDeclPtr (new LongDecl (s))); + s->insert (BuiltInTypeDeclPtr (new LongDoubleDecl (s))); + s->insert (BuiltInTypeDeclPtr (new LongLongDecl (s))); + s->insert (BuiltInTypeDeclPtr (new OctetDecl (s))); + s->insert (BuiltInTypeDeclPtr (new ShortDecl (s))); + s->insert (BuiltInTypeDeclPtr (new StringDecl (s))); + s->insert (BuiltInTypeDeclPtr (new UnsignedLongDecl (s))); + s->insert (BuiltInTypeDeclPtr (new UnsignedLongLongDecl (s))); + s->insert (BuiltInTypeDeclPtr (new UnsignedShortDecl (s))); + s->insert (BuiltInTypeDeclPtr (new VoidDecl (s))); + s->insert (BuiltInTypeDeclPtr (new WcharDecl (s))); + s->insert (BuiltInTypeDeclPtr (new WstringDecl (s))); } diff --git a/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp b/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp index f355de658bb..6817bfeaf1f 100644 --- a/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp +++ b/TAO/CIAO/CIDLC/ExecutorMappingGenerator.cpp @@ -283,7 +283,7 @@ namespace // // // - class TypeNameEmitter : public Traversal::BuiltInTypeDef, + class TypeNameEmitter : public Traversal::BuiltInTypeDecl, public Traversal::TypeDecl { public: @@ -293,7 +293,7 @@ namespace } virtual void - traverse (BuiltInTypeDefPtr const& t) + traverse (BuiltInTypeDeclPtr const& t) { os << t->name ().simple (); } @@ -924,8 +924,8 @@ generate (CommandLine const& cl, } } - std::ostream& os = ofs.is_open () - ? static_cast<std::ostream&> (ofs) + std::ostream& os = ofs.is_open () + ? static_cast<std::ostream&> (ofs) : static_cast<std::ostream&> (std::cout); // Set auto-indentation for os diff --git a/TAO/CIAO/CIDLC/ServantSourceGenerator.cpp b/TAO/CIAO/CIDLC/ServantSourceGenerator.cpp index afcee782c3c..c2ee1df02bb 100644 --- a/TAO/CIAO/CIDLC/ServantSourceGenerator.cpp +++ b/TAO/CIAO/CIDLC/ServantSourceGenerator.cpp @@ -224,9 +224,8 @@ namespace virtual void post (OperationDeclPtr const& d) { - bool void_return_type = - (d->type ()->dynamic_type<IDL2::SyntaxTree::Void> () != 0); - + bool void_return_type = d->type ()->is_a<IDL2::SyntaxTree::VoidDecl> (); + // @@@ (JP) Must add support for user exceptions. os << endl << (d->begin () == d->end () ? STRS[ENV_SNGL_SRC] : STRS[ENV_SRC]) diff --git a/TAO/CIAO/CIDLC/TypeNameEmitter.cpp b/TAO/CIAO/CIDLC/TypeNameEmitter.cpp index ac742eb11b0..bf3ae1eac73 100644 --- a/TAO/CIAO/CIDLC/TypeNameEmitter.cpp +++ b/TAO/CIAO/CIDLC/TypeNameEmitter.cpp @@ -21,109 +21,109 @@ ReturnTypeNameEmitter::ReturnTypeNameEmitter (ostream& os_) } void -ReturnTypeNameEmitter::traverse (VoidPtr const&) +ReturnTypeNameEmitter::traverse (VoidDeclPtr const&) { os << "void"; } void -ReturnTypeNameEmitter::traverse (BooleanPtr const&) +ReturnTypeNameEmitter::traverse (BooleanDeclPtr const&) { os << "::CORBA::Boolean"; } void -ReturnTypeNameEmitter::traverse (OctetPtr const&) +ReturnTypeNameEmitter::traverse (OctetDeclPtr const&) { os << "::CORBA::Octet"; } void -ReturnTypeNameEmitter::traverse (CharPtr const&) +ReturnTypeNameEmitter::traverse (CharDeclPtr const&) { os << "::CORBA::Char"; } void -ReturnTypeNameEmitter::traverse (WcharPtr const&) +ReturnTypeNameEmitter::traverse (WcharDeclPtr const&) { os << "::CORBA::WChar"; } void -ReturnTypeNameEmitter::traverse (ShortPtr const&) +ReturnTypeNameEmitter::traverse (ShortDeclPtr const&) { os << "::CORBA::Short"; } void -ReturnTypeNameEmitter::traverse (UnsignedShortPtr const&) +ReturnTypeNameEmitter::traverse (UnsignedShortDeclPtr const&) { os << "::CORBA::UShort"; } void -ReturnTypeNameEmitter::traverse (LongPtr const&) +ReturnTypeNameEmitter::traverse (LongDeclPtr const&) { os << "::CORBA::Long"; } void -ReturnTypeNameEmitter::traverse (UnsignedLongPtr const&) +ReturnTypeNameEmitter::traverse (UnsignedLongDeclPtr const&) { os << "::CORBA::ULong"; } void -ReturnTypeNameEmitter::traverse (LongLongPtr const&) +ReturnTypeNameEmitter::traverse (LongLongDeclPtr const&) { os << "::CORBA::LongLong"; } void -ReturnTypeNameEmitter::traverse (UnsignedLongLongPtr const&) +ReturnTypeNameEmitter::traverse (UnsignedLongLongDeclPtr const&) { os << "::CORBA::ULongLong"; } void -ReturnTypeNameEmitter::traverse (FloatPtr const&) +ReturnTypeNameEmitter::traverse (FloatDeclPtr const&) { os << "::CORBA::Float"; } void -ReturnTypeNameEmitter::traverse (DoublePtr const&) +ReturnTypeNameEmitter::traverse (DoubleDeclPtr const&) { os << "::CORBA::Double"; } void -ReturnTypeNameEmitter::traverse (StringPtr const&) +ReturnTypeNameEmitter::traverse (StringDeclPtr const&) { os << "char *"; } void -ReturnTypeNameEmitter::traverse (WstringPtr const&) +ReturnTypeNameEmitter::traverse (WstringDeclPtr const&) { os << "::CORBA::WChar *"; } void -ReturnTypeNameEmitter::traverse (ObjectPtr const&) +ReturnTypeNameEmitter::traverse (ObjectDeclPtr const&) { os << "::CORBA::Object_ptr"; } void -ReturnTypeNameEmitter::traverse (ValueBasePtr const&) +ReturnTypeNameEmitter::traverse (ValueBaseDeclPtr const&) { os << "::CORBA::ValueBase *"; } void -ReturnTypeNameEmitter::traverse (AnyPtr const&) +ReturnTypeNameEmitter::traverse (AnyDeclPtr const&) { os << "::CORBA::Any *"; } @@ -142,103 +142,103 @@ INArgTypeNameEmitter::INArgTypeNameEmitter (ostream& os_) } void -INArgTypeNameEmitter::traverse (BooleanPtr const&) +INArgTypeNameEmitter::traverse (BooleanDeclPtr const&) { os << "::CORBA::Boolean"; } void -INArgTypeNameEmitter::traverse (OctetPtr const&) +INArgTypeNameEmitter::traverse (OctetDeclPtr const&) { os << "::CORBA::Octet"; } void -INArgTypeNameEmitter::traverse (CharPtr const&) +INArgTypeNameEmitter::traverse (CharDeclPtr const&) { os << "::CORBA::Char"; } void -INArgTypeNameEmitter::traverse (WcharPtr const&) +INArgTypeNameEmitter::traverse (WcharDeclPtr const&) { os << "::CORBA::WChar"; } void -INArgTypeNameEmitter::traverse (ShortPtr const&) +INArgTypeNameEmitter::traverse (ShortDeclPtr const&) { os << "::CORBA::Short"; } void -INArgTypeNameEmitter::traverse (UnsignedShortPtr const&) +INArgTypeNameEmitter::traverse (UnsignedShortDeclPtr const&) { os << "::CORBA::UShort"; } void -INArgTypeNameEmitter::traverse (LongPtr const&) +INArgTypeNameEmitter::traverse (LongDeclPtr const&) { os << "::CORBA::Long"; } void -INArgTypeNameEmitter::traverse (UnsignedLongPtr const&) +INArgTypeNameEmitter::traverse (UnsignedLongDeclPtr const&) { os << "::CORBA::ULong"; } void -INArgTypeNameEmitter::traverse (LongLongPtr const&) +INArgTypeNameEmitter::traverse (LongLongDeclPtr const&) { os << "::CORBA::LongLong"; } void -INArgTypeNameEmitter::traverse (UnsignedLongLongPtr const&) +INArgTypeNameEmitter::traverse (UnsignedLongLongDeclPtr const&) { os << "::CORBA::ULongLong"; } void -INArgTypeNameEmitter::traverse (FloatPtr const&) +INArgTypeNameEmitter::traverse (FloatDeclPtr const&) { os << "::CORBA::Float"; } void -INArgTypeNameEmitter::traverse (DoublePtr const&) +INArgTypeNameEmitter::traverse (DoubleDeclPtr const&) { os << "::CORBA::Double"; } void -INArgTypeNameEmitter::traverse (StringPtr const&) +INArgTypeNameEmitter::traverse (StringDeclPtr const&) { os << "const char *"; } void -INArgTypeNameEmitter::traverse (WstringPtr const&) +INArgTypeNameEmitter::traverse (WstringDeclPtr const&) { os << "const ::CORBA::WChar *"; } void -INArgTypeNameEmitter::traverse (ObjectPtr const&) +INArgTypeNameEmitter::traverse (ObjectDeclPtr const&) { os << "::CORBA::Object_ptr"; } void -INArgTypeNameEmitter::traverse (ValueBasePtr const&) +INArgTypeNameEmitter::traverse (ValueBaseDeclPtr const&) { os << "::CORBA::ValueBase *"; } void -INArgTypeNameEmitter::traverse (AnyPtr const&) +INArgTypeNameEmitter::traverse (AnyDeclPtr const&) { os << "const ::CORBA::Any &"; } @@ -251,103 +251,103 @@ INOUTArgTypeNameEmitter::INOUTArgTypeNameEmitter (ostream& os_) } void -INOUTArgTypeNameEmitter::traverse (BooleanPtr const&) +INOUTArgTypeNameEmitter::traverse (BooleanDeclPtr const&) { os << "::CORBA::Boolean &"; } void -INOUTArgTypeNameEmitter::traverse (OctetPtr const&) +INOUTArgTypeNameEmitter::traverse (OctetDeclPtr const&) { os << "::CORBA::Octet &"; } void -INOUTArgTypeNameEmitter::traverse (CharPtr const&) +INOUTArgTypeNameEmitter::traverse (CharDeclPtr const&) { os << "::CORBA::Char &"; } void -INOUTArgTypeNameEmitter::traverse (WcharPtr const&) +INOUTArgTypeNameEmitter::traverse (WcharDeclPtr const&) { os << "::CORBA::WChar &"; } void -INOUTArgTypeNameEmitter::traverse (ShortPtr const&) +INOUTArgTypeNameEmitter::traverse (ShortDeclPtr const&) { os << "::CORBA::Short &"; } void -INOUTArgTypeNameEmitter::traverse (UnsignedShortPtr const&) +INOUTArgTypeNameEmitter::traverse (UnsignedShortDeclPtr const&) { os << "::CORBA::UShort &"; } void -INOUTArgTypeNameEmitter::traverse (LongPtr const&) +INOUTArgTypeNameEmitter::traverse (LongDeclPtr const&) { os << "::CORBA::Long &"; } void -INOUTArgTypeNameEmitter::traverse (UnsignedLongPtr const&) +INOUTArgTypeNameEmitter::traverse (UnsignedLongDeclPtr const&) { os << "::CORBA::ULong &"; } void -INOUTArgTypeNameEmitter::traverse (LongLongPtr const&) +INOUTArgTypeNameEmitter::traverse (LongLongDeclPtr const&) { os << "::CORBA::LongLong &"; } void -INOUTArgTypeNameEmitter::traverse (UnsignedLongLongPtr const&) +INOUTArgTypeNameEmitter::traverse (UnsignedLongLongDeclPtr const&) { os << "::CORBA::ULongLong &"; } void -INOUTArgTypeNameEmitter::traverse (FloatPtr const&) +INOUTArgTypeNameEmitter::traverse (FloatDeclPtr const&) { os << "::CORBA::Float &"; } void -INOUTArgTypeNameEmitter::traverse (DoublePtr const&) +INOUTArgTypeNameEmitter::traverse (DoubleDeclPtr const&) { os << "::CORBA::Double &"; } void -INOUTArgTypeNameEmitter::traverse (StringPtr const&) +INOUTArgTypeNameEmitter::traverse (StringDeclPtr const&) { os << "char *&"; } void -INOUTArgTypeNameEmitter::traverse (WstringPtr const&) +INOUTArgTypeNameEmitter::traverse (WstringDeclPtr const&) { os << "::CORBA::WChar *&"; } void -INOUTArgTypeNameEmitter::traverse (ObjectPtr const&) +INOUTArgTypeNameEmitter::traverse (ObjectDeclPtr const&) { os << "::CORBA::Object_ptr &"; } void -INOUTArgTypeNameEmitter::traverse (ValueBasePtr const&) +INOUTArgTypeNameEmitter::traverse (ValueBaseDeclPtr const&) { os << "::CORBA::ValueBase *&"; } void -INOUTArgTypeNameEmitter::traverse (AnyPtr const&) +INOUTArgTypeNameEmitter::traverse (AnyDeclPtr const&) { os << "::CORBA::Any &"; } @@ -360,105 +360,103 @@ OUTArgTypeNameEmitter::OUTArgTypeNameEmitter (ostream& os_) } void -OUTArgTypeNameEmitter::traverse (BooleanPtr const&) +OUTArgTypeNameEmitter::traverse (BooleanDeclPtr const&) { os << "::CORBA::Boolean_out"; } void -OUTArgTypeNameEmitter::traverse (OctetPtr const&) +OUTArgTypeNameEmitter::traverse (OctetDeclPtr const&) { os << "::CORBA::Octet_out"; } void -OUTArgTypeNameEmitter::traverse (CharPtr const&) +OUTArgTypeNameEmitter::traverse (CharDeclPtr const&) { os << "::CORBA::Char_out"; } void -OUTArgTypeNameEmitter::traverse (WcharPtr const&) +OUTArgTypeNameEmitter::traverse (WcharDeclPtr const&) { os << "::CORBA::WChar_out"; } void -OUTArgTypeNameEmitter::traverse (ShortPtr const&) +OUTArgTypeNameEmitter::traverse (ShortDeclPtr const&) { os << "::CORBA::Short_out"; } void -OUTArgTypeNameEmitter::traverse (UnsignedShortPtr const&) +OUTArgTypeNameEmitter::traverse (UnsignedShortDeclPtr const&) { os << "::CORBA::UShort_out"; } void -OUTArgTypeNameEmitter::traverse (LongPtr const&) +OUTArgTypeNameEmitter::traverse (LongDeclPtr const&) { os << "::CORBA::Long_out"; } void -OUTArgTypeNameEmitter::traverse (UnsignedLongPtr const&) +OUTArgTypeNameEmitter::traverse (UnsignedLongDeclPtr const&) { os << "::CORBA::ULong_out"; } void -OUTArgTypeNameEmitter::traverse (LongLongPtr const&) +OUTArgTypeNameEmitter::traverse (LongLongDeclPtr const&) { os << "::CORBA::LongLong_out"; } void -OUTArgTypeNameEmitter::traverse (UnsignedLongLongPtr const&) +OUTArgTypeNameEmitter::traverse (UnsignedLongLongDeclPtr const&) { os << "::CORBA::ULongLong_out"; } void -OUTArgTypeNameEmitter::traverse (FloatPtr const&) +OUTArgTypeNameEmitter::traverse (FloatDeclPtr const&) { os << "::CORBA::Float_out"; } void -OUTArgTypeNameEmitter::traverse (DoublePtr const&) +OUTArgTypeNameEmitter::traverse (DoubleDeclPtr const&) { os << "::CORBA::Double_out"; } void -OUTArgTypeNameEmitter::traverse (StringPtr const&) +OUTArgTypeNameEmitter::traverse (StringDeclPtr const&) { os << "::CORBA::String_out"; } void -OUTArgTypeNameEmitter::traverse (WstringPtr const&) +OUTArgTypeNameEmitter::traverse (WstringDeclPtr const&) { os << "::CORBA::WString_out"; } void -OUTArgTypeNameEmitter::traverse (ObjectPtr const&) +OUTArgTypeNameEmitter::traverse (ObjectDeclPtr const&) { os << "::CORBA::Object_out"; } void -OUTArgTypeNameEmitter::traverse (ValueBasePtr const&) +OUTArgTypeNameEmitter::traverse (ValueBaseDeclPtr const&) { os << "::CORBA::ValueBase_out"; } void -OUTArgTypeNameEmitter::traverse (AnyPtr const&) +OUTArgTypeNameEmitter::traverse (AnyDeclPtr const&) { os << "::CORBA::Any_out"; } - - diff --git a/TAO/CIAO/CIDLC/TypeNameEmitter.hpp b/TAO/CIAO/CIDLC/TypeNameEmitter.hpp index 6e0eae77e2a..eba2dfcde58 100644 --- a/TAO/CIAO/CIDLC/TypeNameEmitter.hpp +++ b/TAO/CIAO/CIDLC/TypeNameEmitter.hpp @@ -15,24 +15,24 @@ using namespace SyntaxTree; // common to every other class in this file, // and collects the ancestors in one place. // -class TypeNameEmitter : public Traversal::Void, - public Traversal::Boolean, - public Traversal::Octet, - public Traversal::Char, - public Traversal::Wchar, - public Traversal::Short, - public Traversal::UnsignedShort, - public Traversal::Long, - public Traversal::UnsignedLong, - public Traversal::LongLong, - public Traversal::UnsignedLongLong, - public Traversal::Float, - public Traversal::Double, - public Traversal::String, - public Traversal::Wstring, - public Traversal::Object, - public Traversal::ValueBase, - public Traversal::Any, +class TypeNameEmitter : public Traversal::VoidDecl, + public Traversal::BooleanDecl, + public Traversal::OctetDecl, + public Traversal::CharDecl, + public Traversal::WcharDecl, + public Traversal::ShortDecl, + public Traversal::UnsignedShortDecl, + public Traversal::LongDecl, + public Traversal::UnsignedLongDecl, + public Traversal::LongLongDecl, + public Traversal::UnsignedLongLongDecl, + public Traversal::FloatDecl, + public Traversal::DoubleDecl, + public Traversal::StringDecl, + public Traversal::WstringDecl, + public Traversal::ObjectDecl, + public Traversal::ValueBaseDecl, + public Traversal::AnyDecl, public Traversal::LocalInterfaceDecl { protected: @@ -49,27 +49,27 @@ class ReturnTypeNameEmitter : public TypeNameEmitter public: ReturnTypeNameEmitter (std::ostream&); - virtual void traverse (VoidPtr const&); - virtual void traverse (BooleanPtr const&); - virtual void traverse (OctetPtr const&); - virtual void traverse (CharPtr const&); - virtual void traverse (WcharPtr const&); - virtual void traverse (ShortPtr const&); - virtual void traverse (UnsignedShortPtr const&); - virtual void traverse (LongPtr const&); - virtual void traverse (UnsignedLongPtr const&); - virtual void traverse (LongLongPtr const&); - virtual void traverse (UnsignedLongLongPtr const&); - virtual void traverse (FloatPtr const&); - virtual void traverse (DoublePtr const&); - virtual void traverse (StringPtr const&); - virtual void traverse (WstringPtr const&); - virtual void traverse (ObjectPtr const&); - virtual void traverse (ValueBasePtr const&); - virtual void traverse (AnyPtr const&); + virtual void traverse (VoidDeclPtr const&); + virtual void traverse (BooleanDeclPtr const&); + virtual void traverse (OctetDeclPtr const&); + virtual void traverse (CharDeclPtr const&); + virtual void traverse (WcharDeclPtr const&); + virtual void traverse (ShortDeclPtr const&); + virtual void traverse (UnsignedShortDeclPtr const&); + virtual void traverse (LongDeclPtr const&); + virtual void traverse (UnsignedLongDeclPtr const&); + virtual void traverse (LongLongDeclPtr const&); + virtual void traverse (UnsignedLongLongDeclPtr const&); + virtual void traverse (FloatDeclPtr const&); + virtual void traverse (DoubleDeclPtr const&); + virtual void traverse (StringDeclPtr const&); + virtual void traverse (WstringDeclPtr const&); + virtual void traverse (ObjectDeclPtr const&); + virtual void traverse (ValueBaseDeclPtr const&); + virtual void traverse (AnyDeclPtr const&); virtual void traverse (LocalInterfaceDeclPtr const&); }; - + // Generates the typename of an IN argument. // // @@ -78,25 +78,25 @@ class INArgTypeNameEmitter : public TypeNameEmitter public: INArgTypeNameEmitter (std::ostream&); - virtual void traverse (BooleanPtr const&); - virtual void traverse (OctetPtr const&); - virtual void traverse (CharPtr const&); - virtual void traverse (WcharPtr const&); - virtual void traverse (ShortPtr const&); - virtual void traverse (UnsignedShortPtr const&); - virtual void traverse (LongPtr const&); - virtual void traverse (UnsignedLongPtr const&); - virtual void traverse (LongLongPtr const&); - virtual void traverse (UnsignedLongLongPtr const&); - virtual void traverse (FloatPtr const&); - virtual void traverse (DoublePtr const&); - virtual void traverse (StringPtr const&); - virtual void traverse (WstringPtr const&); - virtual void traverse (ObjectPtr const&); - virtual void traverse (ValueBasePtr const&); - virtual void traverse (AnyPtr const&); + virtual void traverse (BooleanDeclPtr const&); + virtual void traverse (OctetDeclPtr const&); + virtual void traverse (CharDeclPtr const&); + virtual void traverse (WcharDeclPtr const&); + virtual void traverse (ShortDeclPtr const&); + virtual void traverse (UnsignedShortDeclPtr const&); + virtual void traverse (LongDeclPtr const&); + virtual void traverse (UnsignedLongDeclPtr const&); + virtual void traverse (LongLongDeclPtr const&); + virtual void traverse (UnsignedLongLongDeclPtr const&); + virtual void traverse (FloatDeclPtr const&); + virtual void traverse (DoubleDeclPtr const&); + virtual void traverse (StringDeclPtr const&); + virtual void traverse (WstringDeclPtr const&); + virtual void traverse (ObjectDeclPtr const&); + virtual void traverse (ValueBaseDeclPtr const&); + virtual void traverse (AnyDeclPtr const&); }; - + // Generates the typename of an INOUT argument. // // @@ -105,25 +105,25 @@ class INOUTArgTypeNameEmitter : public TypeNameEmitter public: INOUTArgTypeNameEmitter (std::ostream&); - virtual void traverse (BooleanPtr const&); - virtual void traverse (OctetPtr const&); - virtual void traverse (CharPtr const&); - virtual void traverse (WcharPtr const&); - virtual void traverse (ShortPtr const&); - virtual void traverse (UnsignedShortPtr const&); - virtual void traverse (LongPtr const&); - virtual void traverse (UnsignedLongPtr const&); - virtual void traverse (LongLongPtr const&); - virtual void traverse (UnsignedLongLongPtr const&); - virtual void traverse (FloatPtr const&); - virtual void traverse (DoublePtr const&); - virtual void traverse (StringPtr const&); - virtual void traverse (WstringPtr const&); - virtual void traverse (ObjectPtr const&); - virtual void traverse (ValueBasePtr const&); - virtual void traverse (AnyPtr const&); + virtual void traverse (BooleanDeclPtr const&); + virtual void traverse (OctetDeclPtr const&); + virtual void traverse (CharDeclPtr const&); + virtual void traverse (WcharDeclPtr const&); + virtual void traverse (ShortDeclPtr const&); + virtual void traverse (UnsignedShortDeclPtr const&); + virtual void traverse (LongDeclPtr const&); + virtual void traverse (UnsignedLongDeclPtr const&); + virtual void traverse (LongLongDeclPtr const&); + virtual void traverse (UnsignedLongLongDeclPtr const&); + virtual void traverse (FloatDeclPtr const&); + virtual void traverse (DoubleDeclPtr const&); + virtual void traverse (StringDeclPtr const&); + virtual void traverse (WstringDeclPtr const&); + virtual void traverse (ObjectDeclPtr const&); + virtual void traverse (ValueBaseDeclPtr const&); + virtual void traverse (AnyDeclPtr const&); }; - + // Generates the typename of an OUT argument. // // @@ -132,24 +132,23 @@ class OUTArgTypeNameEmitter : public TypeNameEmitter public: OUTArgTypeNameEmitter (std::ostream&); - virtual void traverse (BooleanPtr const&); - virtual void traverse (OctetPtr const&); - virtual void traverse (CharPtr const&); - virtual void traverse (WcharPtr const&); - virtual void traverse (ShortPtr const&); - virtual void traverse (UnsignedShortPtr const&); - virtual void traverse (LongPtr const&); - virtual void traverse (UnsignedLongPtr const&); - virtual void traverse (LongLongPtr const&); - virtual void traverse (UnsignedLongLongPtr const&); - virtual void traverse (FloatPtr const&); - virtual void traverse (DoublePtr const&); - virtual void traverse (StringPtr const&); - virtual void traverse (WstringPtr const&); - virtual void traverse (ObjectPtr const&); - virtual void traverse (ValueBasePtr const&); - virtual void traverse (AnyPtr const&); + virtual void traverse (BooleanDeclPtr const&); + virtual void traverse (OctetDeclPtr const&); + virtual void traverse (CharDeclPtr const&); + virtual void traverse (WcharDeclPtr const&); + virtual void traverse (ShortDeclPtr const&); + virtual void traverse (UnsignedShortDeclPtr const&); + virtual void traverse (LongDeclPtr const&); + virtual void traverse (UnsignedLongDeclPtr const&); + virtual void traverse (LongLongDeclPtr const&); + virtual void traverse (UnsignedLongLongDeclPtr const&); + virtual void traverse (FloatDeclPtr const&); + virtual void traverse (DoubleDeclPtr const&); + virtual void traverse (StringDeclPtr const&); + virtual void traverse (WstringDeclPtr const&); + virtual void traverse (ObjectDeclPtr const&); + virtual void traverse (ValueBaseDeclPtr const&); + virtual void traverse (AnyDeclPtr const&); }; - -#endif /* TYPENAME_EMITTER_HPP */ +#endif /* TYPENAME_EMITTER_HPP */ diff --git a/TAO/CIAO/CIDLC/cidlc.cpp b/TAO/CIAO/CIDLC/cidlc.cpp index d98ab29a988..6060dedb216 100644 --- a/TAO/CIAO/CIDLC/cidlc.cpp +++ b/TAO/CIAO/CIDLC/cidlc.cpp @@ -118,8 +118,8 @@ int main (int argc, char* argv[]) // get after eof. ifs.exceptions (ios_base::iostate (0)); - std::istream& is = - ifs.is_open () ? static_cast<std::istream&> (ifs) + std::istream& is = + ifs.is_open () ? static_cast<std::istream&> (ifs) : static_cast<std::istream&> (std::cin); InputStreamAdapter isa (is); @@ -137,7 +137,7 @@ int main (int argc, char* argv[]) std::cout << c ; } - + return 0; } @@ -179,25 +179,25 @@ int main (int argc, char* argv[]) ScopePtr s = builtin->scope (); - s->insert (BuiltInTypeDefPtr (new Object (s))); - s->insert (BuiltInTypeDefPtr (new ValueBase (s))); - s->insert (BuiltInTypeDefPtr (new Any (s))); - s->insert (BuiltInTypeDefPtr (new Boolean (s))); - s->insert (BuiltInTypeDefPtr (new Char (s))); - s->insert (BuiltInTypeDefPtr (new Double (s))); - s->insert (BuiltInTypeDefPtr (new Float (s))); - s->insert (BuiltInTypeDefPtr (new Long (s))); - s->insert (BuiltInTypeDefPtr (new LongDouble (s))); - s->insert (BuiltInTypeDefPtr (new LongLong (s))); - s->insert (BuiltInTypeDefPtr (new Octet (s))); - s->insert (BuiltInTypeDefPtr (new Short (s))); - s->insert (BuiltInTypeDefPtr (new String (s))); - s->insert (BuiltInTypeDefPtr (new UnsignedLong (s))); - s->insert (BuiltInTypeDefPtr (new UnsignedLongLong (s))); - s->insert (BuiltInTypeDefPtr (new UnsignedShort (s))); - s->insert (BuiltInTypeDefPtr (new Void (s))); - s->insert (BuiltInTypeDefPtr (new Wchar (s))); - s->insert (BuiltInTypeDefPtr (new Wstring (s))); + s->insert (BuiltInTypeDeclPtr (new ObjectDecl (s))); + s->insert (BuiltInTypeDeclPtr (new ValueBaseDecl (s))); + s->insert (BuiltInTypeDeclPtr (new AnyDecl (s))); + s->insert (BuiltInTypeDeclPtr (new BooleanDecl (s))); + s->insert (BuiltInTypeDeclPtr (new CharDecl (s))); + s->insert (BuiltInTypeDeclPtr (new DoubleDecl (s))); + s->insert (BuiltInTypeDeclPtr (new FloatDecl (s))); + s->insert (BuiltInTypeDeclPtr (new LongDecl (s))); + s->insert (BuiltInTypeDeclPtr (new LongDoubleDecl (s))); + s->insert (BuiltInTypeDeclPtr (new LongLongDecl (s))); + s->insert (BuiltInTypeDeclPtr (new OctetDecl (s))); + s->insert (BuiltInTypeDeclPtr (new ShortDecl (s))); + s->insert (BuiltInTypeDeclPtr (new StringDecl (s))); + s->insert (BuiltInTypeDeclPtr (new UnsignedLongDecl (s))); + s->insert (BuiltInTypeDeclPtr (new UnsignedLongLongDecl (s))); + s->insert (BuiltInTypeDeclPtr (new UnsignedShortDecl (s))); + s->insert (BuiltInTypeDeclPtr (new VoidDecl (s))); + s->insert (BuiltInTypeDeclPtr (new WcharDecl (s))); + s->insert (BuiltInTypeDeclPtr (new WstringDecl (s))); } //Create implied #include <Components.idl> @@ -258,7 +258,7 @@ int main (int argc, char* argv[]) { svnt_gen.generate (unit); } - + // Compute repository IDs in a separate pass. { repid_gen.generate (unit); diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog index 57d086bfa50..84df23ddd80 100644 --- a/TAO/CIAO/ChangeLog +++ b/TAO/CIAO/ChangeLog @@ -1,3 +1,45 @@ +Thu Oct 16 12:07:01 2003 Boris Kolpackov <boris@dre.vanderbilt.edu> + + * CCF/CCF/IDL2/SemanticAction/Impl/Interface.hpp: + * CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp: + * CCF/CCF/IDL2/SyntaxTree/BuiltIn.cpp.m4: + * CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp: + * CCF/CCF/IDL2/SyntaxTree/BuiltIn.hpp.m4: + * CCF/CCF/IDL2/SyntaxTree/BuiltIn.m4: + * CCF/CCF/IDL2/SyntaxTree/Elements.cpp: + * CCF/CCF/IDL2/SyntaxTree/Elements.hpp: + * CCF/CCF/IDL2/SyntaxTree/Interface.cpp: + * CCF/CCF/IDL2/SyntaxTree/Interface.hpp: + * CCF/CCF/IDL2/SyntaxTree/Sequence.hpp: + * CCF/CCF/IDL2/SyntaxTree/Typedef.cpp: + * CCF/CCF/IDL2/SyntaxTree/Typedef.hpp: + * CCF/CCF/IDL2/SyntaxTree/ValueType.cpp: + * CCF/CCF/IDL2/SyntaxTree/ValueType.hpp: + * CCF/CCF/IDL2/Traversal/BuiltIn.hpp: + * CCF/CCF/IDL2/Traversal/BuiltIn.hpp.m4: + * CCF/CCF/IDL2/Traversal/Elements.hpp: + * CCF/CCF/IDL3/SemanticAction/Impl/Component.hpp: + * CCF/CCF/IDL3/SemanticAction/Impl/Home.hpp: + * CCF/CCF/IDL3/SyntaxTree/Component.cpp: + * CCF/CCF/IDL3/SyntaxTree/Component.hpp: + * CCF/CCF/IDL3/SyntaxTree/EventType.hpp: + * CCF/CCF/IDL3/SyntaxTree/Home.hpp: + * CCF/CCF/CIDL/SemanticAction/Impl/HomeExecutor.hpp: Added the + SyntaxTree::ForwardDeclarableTypeDecl base class and moved + there {virtual bool defined () const;}. Added + {virtual bool complete () const;} to TypeDecl to reflect type + completeness. Also changed some type names for consistency. + + * CCF/Example/CIDL/LocalExecutorMapping/ExecutorMappingGenerator.cpp: + * CCF/Example/CIDL/LocalExecutorMapping/cidlc.cpp: Minor changes to + reflect above. + + * CIDLC/ExecutorMappingGenerator.cpp: + * CIDLC/ServantSourceGenerator.cpp: + * CIDLC/TypeNameEmitter.cpp: + * CIDLC/TypeNameEmitter.hpp: + * CIDLC/cidlc.cpp: Minor changes to reflect above. + Wed Oct 15 15:43:13 2003 Boris Kolpackov <boris@dre.vanderbilt.edu> * CCF/CCF/IDL2/LexicalAnalyzer.cpp: |