summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-03-07 09:54:52 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-03-07 09:54:52 +0000
commitfad49cd1342877dcc4a59b4850d37131ff04d690 (patch)
treee23cf998ab6e762174d41f8f34dd0ccf5a60eb82
parent039e5fe4e31a2e4652d2451757f926434dd5d2b9 (diff)
downloadATCD-fad49cd1342877dcc4a59b4850d37131ff04d690.tar.gz
*** empty log message ***
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp3
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode.cpp1
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp51
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp10
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_typecode/objref_typecode.h22
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_typecode/struct_typecode.h8
-rw-r--r--TAO/tao/TypeCode/Abstract_Interface_TypeCode.cpp43
-rw-r--r--TAO/tao/TypeCode/Abstract_Interface_TypeCode.h86
-rw-r--r--TAO/tao/TypeCode/Abstract_Interface_TypeCode.inl14
-rw-r--r--TAO/tao/TypeCode/Component_TypeCode.cpp42
-rw-r--r--TAO/tao/TypeCode/Component_TypeCode.h86
-rw-r--r--TAO/tao/TypeCode/Component_TypeCode.inl13
-rw-r--r--TAO/tao/TypeCode/Except_TypeCode.cpp21
-rw-r--r--TAO/tao/TypeCode/Except_TypeCode.h91
-rw-r--r--TAO/tao/TypeCode/Except_TypeCode.inl14
-rw-r--r--TAO/tao/TypeCode/Home_TypeCode.cpp42
-rw-r--r--TAO/tao/TypeCode/Home_TypeCode.h85
-rw-r--r--TAO/tao/TypeCode/Home_TypeCode.inl12
-rw-r--r--TAO/tao/TypeCode/Local_Interface_TypeCode.cpp43
-rw-r--r--TAO/tao/TypeCode/Local_Interface_TypeCode.h85
-rw-r--r--TAO/tao/TypeCode/Local_Interface_TypeCode.inl13
-rw-r--r--TAO/tao/TypeCode/Native_TypeCode.cpp42
-rw-r--r--TAO/tao/TypeCode/Native_TypeCode.h85
-rw-r--r--TAO/tao/TypeCode/Native_TypeCode.inl12
-rw-r--r--TAO/tao/TypeCode/Objref_TypeCode.cpp23
-rw-r--r--TAO/tao/TypeCode/Objref_TypeCode.h115
-rw-r--r--TAO/tao/TypeCode/Objref_TypeCode.inl2
-rw-r--r--TAO/tao/TypeCode/String_TypeCode.h5
-rw-r--r--TAO/tao/TypeCode/Struct_TypeCode.h14
-rw-r--r--TAO/tao/TypeCode/Struct_TypeCode.inl10
-rw-r--r--TAO/tao/TypeCode/WString_TypeCode.h101
-rw-r--r--TAO/tao/TypeCode/WString_TypeCode.inl10
34 files changed, 236 insertions, 980 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
index 6c9825e2320..6238fb1b0b0 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp
@@ -336,10 +336,12 @@ int be_visitor_exception_cs::visit_exception (be_exception *node)
if (be_global->tc_support ())
{
ctx = *this->ctx_;
- ctx.sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE);
- be_visitor_typecode_defn visitor (&ctx);
+ // ctx.sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE);
+ TAO::be_visitor_struct_typecode visitor (
+ &ctx,
+ true /* An exception TypeCode */);
- if (node->accept (&visitor) == -1)
+ if (visitor.visit_structure (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
"(%N:%l) be_visitor_exception_cs::"
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
index 8a15a18139a..0809846369b 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
@@ -453,9 +453,10 @@ be_visitor_interface_cs::visit_interface (be_interface *node)
if (be_global->tc_support ())
{
+
be_visitor_context ctx = *this->ctx_;
// ctx.sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE);
- TAO::be_visitor_objref_typecode tc_visitor (&ctx);
+ TAO::be_visitor_objref_typecode tc_visitor (&ctx, node);
if (node->accept (&tc_visitor) == -1)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp
index fe7103074a5..678603637f4 100644
--- a/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp
@@ -47,7 +47,9 @@ be_visitor_structure_cs::visit_structure (be_structure *node)
{
be_visitor_context ctx (*this->ctx_);
// ctx.sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE);
- TAO::be_visitor_struct_typecode visitor (&ctx);
+ TAO::be_visitor_struct_typecode visitor (
+ &ctx,
+ false /* Not an exception TypeCode */);
if (visitor.visit_structure (node) == -1)
{
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode.cpp
index ceac4cd8d90..aae8862c8cc 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode.cpp
@@ -25,6 +25,7 @@
#include "be_field.h"
#include "be_interface.h"
#include "be_component.h"
+#include "be_home.h"
#include "be_module.h"
#include "be_predefined_type.h"
#include "be_sequence.h"
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp
index 66bb1bd3952..09cb4bb31ae 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp
@@ -22,6 +22,50 @@ TAO::be_visitor_objref_typecode::be_visitor_objref_typecode (
int
TAO::be_visitor_objref_typecode::visit_interface (be_interface * node)
{
+ static char const abstract_interface[] = "abstract_interface";
+ static char const component[] = "component";
+ static char const home[] = "home";
+ static char const local_interface[] = "local_interface";
+ static char const objref[] = "objref";
+
+ char const * kind = 0;
+
+ if (dynamic_cast<be_component *> (node))
+ kind = component;
+ else if (dynamic_cast<be_home *> (node))
+ kind = home;
+ else if (node->is_abstract ())
+ kind = abstract_interface;
+ else if (node->is_local ())
+ kind = local_interface;
+ else
+ kind = objref;
+
+ return this->visit_i (kind,
+ node->flat_name (),
+ node->repoID (),
+ node->original_local_name ()->get_string (),
+ node);
+}
+
+int
+TAO::be_visitor_objref_typecode::visit_native (be_native * /* node */)
+{
+ return 0;
+// return this->visit_i ("native",
+// ,
+// ,
+// ,
+// node);
+}
+
+int
+TAO::be_visitor_objref_typecode::visit_i (char const * kind,
+ char const * flat_name,
+ char const * repository_id,
+ char const * original_local_name,
+ be_type * node)
+{
TAO_OutStream & os = *this->ctx_->stream ();
os << be_nl << be_nl
@@ -31,11 +75,12 @@ TAO::be_visitor_objref_typecode::visit_interface (be_interface * node)
// Generate the TypeCode instantiation.
os
<< "static TAO::TypeCode::Objref<char const *," << be_nl
+ << " CORBA::tk_" << kind << "," << be_nl
<< " TAO::Null_RefCount_Policy> const"
<< be_idt_nl
- << "_tao_tc_" << node->flat_name () << " (" << be_idt_nl
- << "\"" << node->repoID () << "\"," << be_nl
- << "\"" << node->original_local_name () << "\");" << be_uidt_nl
+ << "_tao_tc_" << flat_name << " (" << be_idt_nl
+ << "\"" << repository_id << "\"," << be_nl
+ << "\"" << original_local_name << "\");" << be_uidt_nl
<< be_uidt_nl;
return this->gen_typecode_ptr (node);
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
index de9d810b5aa..41c6483a5d0 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
@@ -17,8 +17,10 @@
TAO::be_visitor_struct_typecode::be_visitor_struct_typecode (
- be_visitor_context * ctx)
- : be_visitor_typecode_defn (ctx)
+ be_visitor_context * ctx,
+ bool is_exception)
+ : be_visitor_typecode_defn (ctx),
+ is_exception_ (is_exception)
{
}
@@ -47,10 +49,12 @@ TAO::be_visitor_struct_typecode::visit_structure (be_structure * node)
os << be_uidt_nl
<< "};" << be_uidt_nl << be_nl;
-
// Generate the TypeCode instantiation.
os
<< "static TAO::TypeCode::Struct<char const *," << be_nl
+ << " TAO::TypeCode::Field<char const *> const *," << be_nl
+ << " CORBA::tk_"
+ << (this->is_exception_ ? "except" : "struct") << ">," << be_nl
<< " TAO::Null_RefCount_Policy> const"
<< be_idt_nl
<< "_tao_tc_" << node->flat_name () << " (" << be_idt_nl
diff --git a/TAO/TAO_IDL/be_include/be_visitor_typecode/objref_typecode.h b/TAO/TAO_IDL/be_include/be_visitor_typecode/objref_typecode.h
index 332bdc73738..b783395080a 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_typecode/objref_typecode.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_typecode/objref_typecode.h
@@ -23,9 +23,12 @@ namespace TAO
/**
* @class be_visitor_objref_typecode
*
- * @brief Object reference TypeCode generation visitor.
+ * @brief TypeCode generation visitor for types with a TypeCode
+ * format similar to an object reference / interface
+ * TypeCode.
*
- * Object reference TypeCode generation visitor.
+ * TypeCode generation visitor for types with a TypeCode format
+ * similar to an object reference / interface TypeCode.
*/
class be_visitor_objref_typecode
: public be_visitor_typecode_defn
@@ -45,6 +48,21 @@ namespace TAO
*/
virtual int visit_interface (be_interface * node);
+ /// Visit a native.
+ /**
+ * @see visit_interface
+ */
+ virtual int visit_native (be_native * node);
+
+ private:
+
+ /// Generate TypeCode instance.
+ int visit_i (char const * kind,
+ char const * flat_name,
+ char const * repository_id,
+ char const * original_local_name,
+ be_type * node);
+
};
}
diff --git a/TAO/TAO_IDL/be_include/be_visitor_typecode/struct_typecode.h b/TAO/TAO_IDL/be_include/be_visitor_typecode/struct_typecode.h
index 0a350a14034..87f4378843c 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_typecode/struct_typecode.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_typecode/struct_typecode.h
@@ -33,7 +33,8 @@ namespace TAO
public:
/// Constructor.
- be_visitor_struct_typecode (be_visitor_context * ctx);
+ be_visitor_struct_typecode (be_visitor_context * ctx,
+ bool is_exception);
/// Visit a structure.
/**
@@ -50,6 +51,11 @@ namespace TAO
/// Generate structure field related TypeCode code.
int visit_members (be_structure * node);
+ private:
+
+ /// Does the TypeCode refer to a CORBA exception?
+ bool const is_exception_;
+
};
}
diff --git a/TAO/tao/TypeCode/Abstract_Interface_TypeCode.cpp b/TAO/tao/TypeCode/Abstract_Interface_TypeCode.cpp
deleted file mode 100644
index 72bda965783..00000000000
--- a/TAO/tao/TypeCode/Abstract_Interface_TypeCode.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id$
-
-#ifndef TAO_ABSTRACT_INTERFACE_TYPECODE_CPP
-#define TAO_ABSTRACT_INTERFACE_TYPECODE_CPP
-
-#include "tao/Abstract_Interface_TypeCode.h"
-
-#ifndef __ACE_INLINE__
-# include "tao/Abstract_Interface_TypeCode.inl"
-#endif /* !__ACE_INLINE__ */
-
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TCKind
-TAO::TypeCode::Abstract_Interface<StringType, RefCountPolicy>::kind_i (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
-{
- return CORBA::tk_abstract_interface;
-}
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TypeCode_ptr
-TAO::TypeCode::Abstract_Interface<StringType,
- RefCountPolicy>::get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const
-{
- TAO_TypeCodeFactory_Adapter * adapter =
- ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
- TAO_ORB_Core::typecodefactory_adapter_name ()
- );
-
- if (adapter == 0)
- {
- ACE_THROW_RETURN (CORBA::INTERNAL (),
- CORBA::TypeCode::_nil ());
- }
-
- return adapter->create_abstract_interface_tc (this->attributes_.id (),
- "" /* empty name */
- ACE_ENV_ARG_PARAMETER);
-}
-
-#endif /* TAO_ABSTRACT_INTERFACE_TYPECODE_CPP */
diff --git a/TAO/tao/TypeCode/Abstract_Interface_TypeCode.h b/TAO/tao/TypeCode/Abstract_Interface_TypeCode.h
deleted file mode 100644
index a3231412a60..00000000000
--- a/TAO/tao/TypeCode/Abstract_Interface_TypeCode.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Abstract_Interface_TypeCode.h
- *
- * $Id$
- *
- * Header file for a @c tk_abstract_interface CORBA::TypeCode.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TAO_ABSTRACT_INTERFACE_TYPECODE_H
-#define TAO_ABSTRACT_INTERFACE_TYPECODE_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/Objref_TypeCode.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-namespace TAO
-{
- namespace TypeCode
- {
-
- /**
- * @class Abstract_Interface
- *
- * @brief @c CORBA::TypeCode implementation for an OMG IDL
- * @c abstract_interface type.
- *
- * This class implements a @c CORBA::TypeCode for an OMG IDL
- * @c abstract_interface type.
- */
- template <typename StringType, class RefCountPolicy>
- class Abstract_Interface
- : public Objref<StringType, RefCountPolicy>
- {
- public:
-
- /// Constructor.
- Abstract_Interface (char const * id,
- char const * name);
-
- protected:
-
- /**
- * @name @c TAO CORBA::TypeCode Template Methods
- *
- * @c tk_abstract_interface @c CORBA::TypeCode -specific
- * template methods.
- *
- * @see @c CORBA::TypeCode
- */
- //@{
- virtual CORBA::TCKind kind_i (ACE_ENV_SINGLE_ARG_DECL) const;
- virtual CORBA::TypeCode_ptr get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const;
-
- };
-
- } // End namespace TypeCode
-} // End namespace TAO
-
-
-#ifdef __ACE_INLINE__
-# include "tao/Abstract_Interface_TypeCode.inl"
-#endif /* __ACE_INLINE__ */
-
-#ifdef ACE_TEMPLATES_REQUIRE_SOURCE
-# include "tao/Abstract_Interface_TypeCode.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
-# pragma implementation ("Abstract_Interface_TypeCode.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_ABSTRACT_INTERFACE_TYPECODE_H */
diff --git a/TAO/tao/TypeCode/Abstract_Interface_TypeCode.inl b/TAO/tao/TypeCode/Abstract_Interface_TypeCode.inl
deleted file mode 100644
index fec5aa77b4a..00000000000
--- a/TAO/tao/TypeCode/Abstract_Interface_TypeCode.inl
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-
-template <typename StringType, class RefCountPolicy>
-ACE_INLINE
-TAO::TypeCode::Abstract_Interface<StringType,
- RefCountPolicy>::Abstract_Interface (
- char const * id,
- char const * name)
- : Objref<StringType, RefCountPolicy> (id, name)
-{
-}
diff --git a/TAO/tao/TypeCode/Component_TypeCode.cpp b/TAO/tao/TypeCode/Component_TypeCode.cpp
deleted file mode 100644
index b023397c98c..00000000000
--- a/TAO/tao/TypeCode/Component_TypeCode.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-#ifndef TAO_COMPONENT_TYPECODE_CPP
-#define TAO_COMPONENT_TYPECODE_CPP
-
-#include "tao/Component_TypeCode.h"
-
-#ifndef __ACE_INLINE__
-# include "tao/Component_TypeCode.inl"
-#endif /* !__ACE_INLINE__ */
-
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TCKind
-TAO::TypeCode::Component<StringType, RefCountPolicy>::kind_i (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
-{
- return CORBA::tk_component;
-}
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TypeCode_ptr
-TAO::TypeCode::Component<StringType, RefCountPolicy>::get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const
-{
- TAO_TypeCodeFactory_Adapter * adapter =
- ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
- TAO_ORB_Core::typecodefactory_adapter_name ()
- );
-
- if (adapter == 0)
- {
- ACE_THROW_RETURN (CORBA::INTERNAL (),
- CORBA::TypeCode::_nil ());
- }
-
- return adapter->create_component_tc (this->attributes_.id (),
- "" /* empty name */
- ACE_ENV_ARG_PARAMETER);
-}
-
-#endif /* TAO_COMPONENT_TYPECODE_CPP */
diff --git a/TAO/tao/TypeCode/Component_TypeCode.h b/TAO/tao/TypeCode/Component_TypeCode.h
deleted file mode 100644
index 88edcb785e8..00000000000
--- a/TAO/tao/TypeCode/Component_TypeCode.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Component_TypeCode.h
- *
- * $Id$
- *
- * Header file for a @c tk_component CORBA::TypeCode.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TAO_COMPONENT_TYPECODE_H
-#define TAO_COMPONENT_TYPECODE_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/Objref_TypeCode.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-namespace TAO
-{
- namespace TypeCode
- {
-
- /**
- * @class Component
- *
- * @brief @c CORBA::TypeCode implementation for an OMG IDL
- * @c component type.
- *
- * This class implements a @c CORBA::TypeCode for an OMG IDL
- * @c component type.
- */
- template <typename StringType, class RefCountPolicy>
- class Component
- : public Objref<StringType, RefCountPolicy>
- {
- public:
-
- /// Constructor.
- Component (char const * id,
- char const * name);
-
- protected:
-
- /**
- * @name @c TAO CORBA::TypeCode Template Methods
- *
- * @c tk_component @c CORBA::TypeCode -specific template
- * methods.
- *
- * @see @c CORBA::TypeCode
- */
- //@{
- virtual CORBA::TCKind kind_i (ACE_ENV_SINGLE_ARG_DECL) const;
- virtual CORBA::TypeCode_ptr get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const;
-
- };
-
- } // End namespace TypeCode
-} // End namespace TAO
-
-
-#ifdef __ACE_INLINE__
-# include "tao/Component_TypeCode.inl"
-#endif /* __ACE_INLINE__ */
-
-#ifdef ACE_TEMPLATES_REQUIRE_SOURCE
-# include "tao/Component_TypeCode.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
-# pragma implementation ("Component_TypeCode.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_COMPONENT_TYPECODE_H */
diff --git a/TAO/tao/TypeCode/Component_TypeCode.inl b/TAO/tao/TypeCode/Component_TypeCode.inl
deleted file mode 100644
index 8cd8a517934..00000000000
--- a/TAO/tao/TypeCode/Component_TypeCode.inl
+++ /dev/null
@@ -1,13 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-
-template <typename StringType, class RefCountPolicy>
-ACE_INLINE
-TAO::TypeCode::Component<StringType, RefCountPolicy>::Component (
- char const * id,
- char const * name)
- : Objref<StringType, RefCountPolicy> (id, name)
-{
-}
diff --git a/TAO/tao/TypeCode/Except_TypeCode.cpp b/TAO/tao/TypeCode/Except_TypeCode.cpp
deleted file mode 100644
index 2d580c8f74a..00000000000
--- a/TAO/tao/TypeCode/Except_TypeCode.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// $Id$
-
-#ifndef TAO_EXCEPT_TYPECODE_CPP
-#define TAO_EXCEPT_TYPECODE_CPP
-
-#include "tao/Except_TypeCode.h"
-
-#ifndef __ACE_INLINE__
-# include "tao/Except_TypeCode.inl"
-#endif /* !__ACE_INLINE__ */
-
-
-template <class AttrType, class RefCountPolicy>
-CORBA::TCKind
-TAO::TypeCode::Except<AttrType, RefCountPolicy>::kind_i (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
-{
- return CORBA::tk_except;
-}
-
-#endif /* TAO_EXCEPT_TYPECODE_CPP */
diff --git a/TAO/tao/TypeCode/Except_TypeCode.h b/TAO/tao/TypeCode/Except_TypeCode.h
deleted file mode 100644
index 021fa98276c..00000000000
--- a/TAO/tao/TypeCode/Except_TypeCode.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Except_TypeCode.h
- *
- * $Id$
- *
- * Header file for a @c tk_except CORBA::TypeCode.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TAO_EXCEPT_TYPECODE_H
-#define TAO_EXCEPT_TYPECODE_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/Struct_TypeCode.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-namespace TAO
-{
- namespace TypeCode
- {
-
- /**
- * @class Except
- *
- * @brief @c CORBA::TypeCode implementation for an OMG IDL
- * @c except.
- *
- * This class implements a @c CORBA::TypeCode for an OMG IDL @c
- * except.
- */
- template <typename StringType, class FieldArrayType, class RefCountPolicy>
- class Except
- : public Struct<AttrType, RefCountPolicy>
- {
- public:
-
- /// Constructor.
- Except (char const * id,
- char const * name,
- Field<StringType> const * fields,
- CORBA::ULong nfields);
-
- protected:
-
- /**
- * @name @c TAO CORBA::TypeCode Template Methods
- *
- * @c tk_except @c CORBA::TypeCode -specific template methods.
- *
- * @c tk_except @c TypeCodes have the same internal structure as
- * @c tk_struct @c TypeCodes. All that need be done is to
- * subclass @c TAO::TypeCode::Struct and override the
- * @c kind_i() method so that it returns @c tk_except.
- *
- * @see @c TAO::TypeCode::Struct
- */
- //@{
- virtual CORBA::TCKind kind_i (ACE_ENV_SINGLE_ARG_DECL) const;
- //@}
-
- };
-
- } // End namespace TypeCode
-} // End namespace TAO
-
-
-#ifdef __ACE_INLINE__
-# include "tao/Except_TypeCode.inl"
-#endif /* __ACE_INLINE__ */
-
-#ifdef ACE_TEMPLATES_REQUIRE_SOURCE
-# include "tao/Except_TypeCode.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
-# pragma implementation ("Except_TypeCode.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_EXCEPT_TYPECODE_H */
diff --git a/TAO/tao/TypeCode/Except_TypeCode.inl b/TAO/tao/TypeCode/Except_TypeCode.inl
deleted file mode 100644
index b61edd3bd38..00000000000
--- a/TAO/tao/TypeCode/Except_TypeCode.inl
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-template <class AttrType, class RefCountPolicy>
-ACE_INLINE
-TAO::TypeCode::Except<AttrType, RefCountPolicy>::Except (
- char const * id,
- char const * name,
- TAO::TypeCode::Field const * fields,
- CORBA::ULong nfields)
- : Struct<AttrType, RefCountPolicy> (id, name, fields, nfields)
-{
-}
diff --git a/TAO/tao/TypeCode/Home_TypeCode.cpp b/TAO/tao/TypeCode/Home_TypeCode.cpp
deleted file mode 100644
index 826744547a8..00000000000
--- a/TAO/tao/TypeCode/Home_TypeCode.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-#ifndef TAO_HOME_TYPECODE_CPP
-#define TAO_HOME_TYPECODE_CPP
-
-#include "tao/Home_TypeCode.h"
-
-#ifndef __ACE_INLINE__
-# include "tao/Home_TypeCode.inl"
-#endif /* !__ACE_INLINE__ */
-
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TCKind
-TAO::TypeCode::Home<StringType, RefCountPolicy>::kind_i (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
-{
- return CORBA::tk_home;
-}
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TypeCode_ptr
-TAO::TypeCode::Home<StringType, RefCountPolicy>::get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const
-{
- TAO_TypeCodeFactory_Adapter * adapter =
- ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
- TAO_ORB_Core::typecodefactory_adapter_name ()
- );
-
- if (adapter == 0)
- {
- ACE_THROW_RETURN (CORBA::INTERNAL (),
- CORBA::TypeCode::_nil ());
- }
-
- return adapter->create_home_tc (this->attributes_.id (),
- "" /* empty name */
- ACE_ENV_ARG_PARAMETER);
-}
-
-#endif /* TAO_HOME_TYPECODE_CPP */
diff --git a/TAO/tao/TypeCode/Home_TypeCode.h b/TAO/tao/TypeCode/Home_TypeCode.h
deleted file mode 100644
index 3313335c085..00000000000
--- a/TAO/tao/TypeCode/Home_TypeCode.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Home_TypeCode.h
- *
- * $Id$
- *
- * Header file for a @c tk_home CORBA::TypeCode.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TAO_HOME_TYPECODE_H
-#define TAO_HOME_TYPECODE_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/Objref_TypeCode.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-namespace TAO
-{
- namespace TypeCode
- {
-
- /**
- * @class Home
- *
- * @brief @c CORBA::TypeCode implementation for an OMG IDL
- * @c home type.
- *
- * This class implements a @c CORBA::TypeCode for an OMG IDL
- * @c home type.
- */
- template <typename StringType, class RefCountPolicy>
- class Home
- : public Objref<StringType, RefCountPolicy>
- {
- public:
-
- /// Constructor.
- Home (char const * id,
- char const * name);
-
- protected:
-
- /**
- * @name @c TAO CORBA::TypeCode Template Methods
- *
- * @c tk_home @c CORBA::TypeCode -specific template methods.
- *
- * @see @c CORBA::TypeCode
- */
- //@{
- virtual CORBA::TCKind kind_i (ACE_ENV_SINGLE_ARG_DECL) const;
- virtual CORBA::TypeCode_ptr get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const;
-
- };
-
- } // End namespace TypeCode
-} // End namespace TAO
-
-
-#ifdef __ACE_INLINE__
-# include "tao/Home_TypeCode.inl"
-#endif /* __ACE_INLINE__ */
-
-#ifdef ACE_TEMPLATES_REQUIRE_SOURCE
-# include "tao/Home_TypeCode.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
-# pragma implementation ("Home_TypeCode.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_HOME_TYPECODE_H */
diff --git a/TAO/tao/TypeCode/Home_TypeCode.inl b/TAO/tao/TypeCode/Home_TypeCode.inl
deleted file mode 100644
index 37c70d941f7..00000000000
--- a/TAO/tao/TypeCode/Home_TypeCode.inl
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-
-template <typename StringType, class RefCountPolicy>
-ACE_INLINE
-TAO::TypeCode::Home<StringType, RefCountPolicy>::Home (char const * id,
- char const * name)
- : Objref<StringType, RefCountPolicy> (id, name)
-{
-}
diff --git a/TAO/tao/TypeCode/Local_Interface_TypeCode.cpp b/TAO/tao/TypeCode/Local_Interface_TypeCode.cpp
deleted file mode 100644
index 4355877bb4d..00000000000
--- a/TAO/tao/TypeCode/Local_Interface_TypeCode.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// $Id$
-
-#ifndef TAO_LOCAL_INTERFACE_TYPECODE_CPP
-#define TAO_LOCAL_INTERFACE_TYPECODE_CPP
-
-#include "tao/Local_Interface_TypeCode.h"
-
-#ifndef __ACE_INLINE__
-# include "tao/Local_Interface_TypeCode.inl"
-#endif /* !__ACE_INLINE__ */
-
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TCKind
-TAO::TypeCode::Local_Interface<StringType, RefCountPolicy>::kind_i (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
-{
- return CORBA::tk_local_interface;
-}
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TypeCode_ptr
-TAO::TypeCode::Local_Interface<StringType,
- RefCountPolicy>::get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const
-{
- TAO_TypeCodeFactory_Adapter * adapter =
- ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
- TAO_ORB_Core::typecodefactory_adapter_name ()
- );
-
- if (adapter == 0)
- {
- ACE_THROW_RETURN (CORBA::INTERNAL (),
- CORBA::TypeCode::_nil ());
- }
-
- return adapter->create_local_interface_tc (this->attributes_.id (),
- "" /* empty name */
- ACE_ENV_ARG_PARAMETER);
-}
-
-#endif /* TAO_LOCAL_INTERFACE_TYPECODE_CPP */
diff --git a/TAO/tao/TypeCode/Local_Interface_TypeCode.h b/TAO/tao/TypeCode/Local_Interface_TypeCode.h
deleted file mode 100644
index 6af449f89ed..00000000000
--- a/TAO/tao/TypeCode/Local_Interface_TypeCode.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Local_Interface_TypeCode.h
- *
- * $Id$
- *
- * Header file for a @c tk_local_interface CORBA::TypeCode.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TAO_LOCAL_INTERFACE_TYPECODE_H
-#define TAO_LOCAL_INTERFACE_TYPECODE_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/Objref_TypeCode.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-namespace TAO
-{
- namespace TypeCode
- {
-
- /**
- * @class Local_Interface
- *
- * @brief @c CORBA::TypeCode implementation for an OMG IDL
- * @c local_interface type.
- *
- * This class implements a @c CORBA::TypeCode for an OMG IDL
- * @c local_interface type.
- */
- template <typename StringType, class RefCountPolicy>
- class Local_Interface
- : public Objref<StringType, RefCountPolicy>
- {
- public:
-
- /// Constructor.
- Local_Interface (char const * id,
- char const * name);
-
- protected:
-
- /**
- * @name @c TAO CORBA::TypeCode Template Methods
- *
- * @c tk_local_interface @c CORBA::TypeCode -specific template methods.
- *
- * @see @c CORBA::TypeCode
- */
- //@{
- virtual CORBA::TCKind kind_i (ACE_ENV_SINGLE_ARG_DECL) const;
- virtual CORBA::TypeCode_ptr get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const;
-
- };
-
- } // End namespace TypeCode
-} // End namespace TAO
-
-
-#ifdef __ACE_INLINE__
-# include "tao/Local_Interface_TypeCode.inl"
-#endif /* __ACE_INLINE__ */
-
-#ifdef ACE_TEMPLATES_REQUIRE_SOURCE
-# include "tao/Local_Interface_TypeCode.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
-# pragma implementation ("Local_Interface_TypeCode.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_LOCAL_INTERFACE_TYPECODE_H */
diff --git a/TAO/tao/TypeCode/Local_Interface_TypeCode.inl b/TAO/tao/TypeCode/Local_Interface_TypeCode.inl
deleted file mode 100644
index 4358a191455..00000000000
--- a/TAO/tao/TypeCode/Local_Interface_TypeCode.inl
+++ /dev/null
@@ -1,13 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-
-template <typename StringType, class RefCountPolicy>
-ACE_INLINE
-TAO::TypeCode::Local_Interface<StringType, RefCountPolicy>::Local_Interface (
- char const * id,
- char const * name)
- : Objref<StringType, RefCountPolicy> (id, name)
-{
-}
diff --git a/TAO/tao/TypeCode/Native_TypeCode.cpp b/TAO/tao/TypeCode/Native_TypeCode.cpp
deleted file mode 100644
index c70fe934476..00000000000
--- a/TAO/tao/TypeCode/Native_TypeCode.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-
-#ifndef TAO_NATIVE_TYPECODE_CPP
-#define TAO_NATIVE_TYPECODE_CPP
-
-#include "tao/Native_TypeCode.h"
-
-#ifndef __ACE_INLINE__
-# include "tao/Native_TypeCode.inl"
-#endif /* !__ACE_INLINE__ */
-
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TCKind
-TAO::TypeCode::Native<StringType, RefCountPolicy>::kind_i (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
-{
- return CORBA::tk_native;
-}
-
-template <typename StringType, class RefCountPolicy>
-CORBA::TypeCode_ptr
-TAO::TypeCode::Native<StringType, RefCountPolicy>::get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const
-{
- TAO_TypeCodeFactory_Adapter * adapter =
- ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
- TAO_ORB_Core::typecodefactory_adapter_name ()
- );
-
- if (adapter == 0)
- {
- ACE_THROW_RETURN (CORBA::INTERNAL (),
- CORBA::TypeCode::_nil ());
- }
-
- return adapter->create_native_tc (this->attributes_.id (),
- "" /* empty name */
- ACE_ENV_ARG_PARAMETER);
-}
-
-#endif /* TAO_NATIVE_TYPECODE_CPP */
diff --git a/TAO/tao/TypeCode/Native_TypeCode.h b/TAO/tao/TypeCode/Native_TypeCode.h
deleted file mode 100644
index 990a52587e6..00000000000
--- a/TAO/tao/TypeCode/Native_TypeCode.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Native_TypeCode.h
- *
- * $Id$
- *
- * Header file for a @c tk_native CORBA::TypeCode.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TAO_NATIVE_TYPECODE_H
-#define TAO_NATIVE_TYPECODE_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/Objref_TypeCode.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-
-namespace TAO
-{
- namespace TypeCode
- {
-
- /**
- * @class Native
- *
- * @brief @c CORBA::TypeCode implementation for an OMG IDL
- * @c native type.
- *
- * This class implements a @c CORBA::TypeCode for an OMG IDL
- * @c native type.
- */
- template <typename StringType, class RefCountPolicy>
- class Native
- : public Objref<StringType, RefCountPolicy>
- {
- public:
-
- /// Constructor.
- Native (char const * id,
- char const * name);
-
- protected:
-
- /**
- * @name @c TAO CORBA::TypeCode Template Methods
- *
- * @c tk_native @c CORBA::TypeCode -specific template methods.
- *
- * @see @c CORBA::TypeCode
- */
- //@{
- virtual CORBA::TCKind kind_i (ACE_ENV_SINGLE_ARG_DECL) const;
- virtual CORBA::TypeCode_ptr get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const;
-
- };
-
- } // End namespace TypeCode
-} // End namespace TAO
-
-
-#ifdef __ACE_INLINE__
-# include "tao/Native_TypeCode.inl"
-#endif /* __ACE_INLINE__ */
-
-#ifdef ACE_TEMPLATES_REQUIRE_SOURCE
-# include "tao/Native_TypeCode.cpp"
-#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
-
-#ifdef ACE_TEMPLATES_REQUIRE_PRAGMA
-# pragma implementation ("Native_TypeCode.cpp")
-#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_NATIVE_TYPECODE_H */
diff --git a/TAO/tao/TypeCode/Native_TypeCode.inl b/TAO/tao/TypeCode/Native_TypeCode.inl
deleted file mode 100644
index bbafa5b2c14..00000000000
--- a/TAO/tao/TypeCode/Native_TypeCode.inl
+++ /dev/null
@@ -1,12 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-
-template <typename StringType, class RefCountPolicy>
-ACE_INLINE
-TAO::TypeCode::Native<StringType, RefCountPolicy>::Native (char const * id,
- char const * name)
- : Objref<StringType, RefCountPolicy> (id, name)
-{
-}
diff --git a/TAO/tao/TypeCode/Objref_TypeCode.cpp b/TAO/tao/TypeCode/Objref_TypeCode.cpp
index 3ba25dcc28d..1f30ca609de 100644
--- a/TAO/tao/TypeCode/Objref_TypeCode.cpp
+++ b/TAO/tao/TypeCode/Objref_TypeCode.cpp
@@ -10,7 +10,7 @@
#endif /* !__ACE_INLINE__ */
-template <typename StringType, class RefCountPolicy>
+template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy>
bool
TAO::TypeCode::Objref<StringType, RefCountPolicy>::tao_marshal (
TAO_OutputCDR &) const
@@ -27,21 +27,21 @@ TAO::TypeCode::Objref<StringType, RefCountPolicy>::tao_marshal (
&& (cdr << this->attributes_.name ());
}
-template <typename StringType, class RefCountPolicy>
+template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy>
void
TAO::TypeCode::Objref<StringType, RefCountPolicy>::tao_duplicate (void)
{
this->RefCountPolicy::add_ref (void);
}
-template <typename StringType, class RefCountPolicy>
+template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy>
void
TAO::TypeCode::Objref<StringType, RefCountPolicy>::tao_release (void)
{
this->RefCountPolicy::remove_ref (void);
}
-template <typename StringType, class RefCountPolicy>
+template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy>
CORBA::Boolean
TAO::TypeCode::Objref<StringType, RefCountPolicy>::equal_i (
CORBA::TypeCode_ptr /* tc */
@@ -53,7 +53,7 @@ TAO::TypeCode::Objref<StringType, RefCountPolicy>::equal_i (
return 1;
}
-template <typename StringType, class RefCountPolicy>
+template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy>
CORBA::Boolean
TAO::TypeCode::Objref<StringType, RefCountPolicy>::equivalent_i (
CORBA::TypeCode_ptr tc
@@ -90,15 +90,15 @@ TAO::TypeCode::Objref<StringType, RefCountPolicy>::equivalent_i (
return 1;
}
-template <typename StringType, class RefCountPolicy>
+template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy>
CORBA::TCKind
TAO::TypeCode::Objref<StringType, RefCountPolicy>::kind_i (
ACE_ENV_SINGLE_ARG_DECL_NOT_USED) const
{
- return CORBA::tk_objref;
+ return Objref_Traits<Kind>::kind;
}
-template <typename StringType, class RefCountPolicy>
+template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy>
CORBA::TypeCode_ptr
TAO::TypeCode::Objref<StringType, RefCountPolicy>::get_compact_typecode_i (
ACE_ENV_SINGLE_ARG_DECL) const
@@ -114,9 +114,10 @@ TAO::TypeCode::Objref<StringType, RefCountPolicy>::get_compact_typecode_i (
CORBA::TypeCode::_nil ());
}
- return adapter->create_interface_tc (this->attributes_.id (),
- "" /* empty name */
- ACE_ENV_ARG_PARAMETER);
+ return
+ Objref_Traits<Kind>::create_compact_typecode (this->attributes_.id (),
+ "" /* empty name */
+ ACE_ENV_ARG_PARAMETER);
}
#endif /* TAO_OBJREF_TYPECODE_CPP */
diff --git a/TAO/tao/TypeCode/Objref_TypeCode.h b/TAO/tao/TypeCode/Objref_TypeCode.h
index 9bdd293a79c..8e22ee09cad 100644
--- a/TAO/tao/TypeCode/Objref_TypeCode.h
+++ b/TAO/tao/TypeCode/Objref_TypeCode.h
@@ -6,7 +6,13 @@
*
* $Id$
*
- * Header file for a @c tk_objref CORBA::TypeCode.
+ * Header file for
+ * @c tk_abstract_interface,
+ * @c tk_component,
+ * @c tk_local_interface,
+ * @c tk_native and
+ * @c tk_objref
+ * @c CORBA::TypeCodes.
*
* @author Ossama Othman <ossama@dre.vanderbilt.edu>
*/
@@ -27,15 +33,114 @@ namespace TAO
{
namespace TypeCode
{
+ template <CORBA::TCKind KIND> Objref_Traits;
+
+ template <>
+ struct Objref_Traits<CORBA::tk_abstract_interface>
+ {
+ enum { kind = CORBA::tk_abstract_interface };
+
+ CORBA::TypeCode_ptr
+ create_compact_typcode (TAO_TypeCodeFactory_Adapter * factory
+ char const * id
+ ACE_ENV_ARG_DECL) const
+ {
+ return factory->create_abstract_interface_tc (id,
+ "" /* empty name */
+ ACE_ENV_ARG_PARAMETER);
+ }
+ };
+
+ template <>
+ struct Objref_Traits<CORBA::tk_component>
+ {
+ enum { kind = CORBA::tk_component };
+
+ CORBA::TypeCode_ptr
+ create_compact_typcode (TAO_TypeCodeFactory_Adapter * factory
+ char const * id
+ ACE_ENV_ARG_DECL) const
+ {
+ return factory->create_component_tc (id,
+ "" /* empty name */
+ ACE_ENV_ARG_PARAMETER);
+ }
+ };
+
+
+ template <>
+ struct Objref_Traits<CORBA::tk_home>
+ {
+ enum { kind = CORBA::tk_home };
+
+ CORBA::TypeCode_ptr
+ create_compact_typcode (TAO_TypeCodeFactory_Adapter * factory
+ char const * id
+ ACE_ENV_ARG_DECL) const
+ {
+ return factory->create_home_tc (id,
+ "" /* empty name */
+ ACE_ENV_ARG_PARAMETER);
+ }
+ };
+
+ template <>
+ struct Objref_Traits<CORBA::tk_local_interface>
+ {
+ enum { kind = CORBA::tk_local_interface };
+
+ CORBA::TypeCode_ptr
+ create_compact_typcode (TAO_TypeCodeFactory_Adapter * factory
+ char const * id
+ ACE_ENV_ARG_DECL) const
+ {
+ return factory->create_local_interface_tc (id,
+ "" /* empty name */
+ ACE_ENV_ARG_PARAMETER);
+ }
+ };
+
+ template <>
+ struct Objref_Traits<CORBA::tk_native>
+ {
+ enum { kind = CORBA::tk_native };
+
+ CORBA::TypeCode_ptr
+ create_compact_typcode (TAO_TypeCodeFactory_Adapter * factory
+ char const * id
+ ACE_ENV_ARG_DECL) const
+ {
+ return factory->create_native_tc (id,
+ "" /* empty name */
+ ACE_ENV_ARG_PARAMETER);
+ }
+ };
+
+ template <>
+ struct Objref_Traits<CORBA::tk_objref>
+ {
+ enum { kind = CORBA::tk_objref };
+
+ CORBA::TypeCode_ptr
+ create_compact_typcode (TAO_TypeCodeFactory_Adapter * factory
+ char const * id
+ ACE_ENV_ARG_DECL) const
+ {
+ return factory->create_interface_tc (id,
+ "" /* empty name */
+ ACE_ENV_ARG_PARAMETER);
+ }
+ };
/**
* @class Objref
*
* @brief @c CORBA::TypeCode implementation for an OMG IDL
- * @c object.
+ * @c object and object-like types
*
* This class implements a @c CORBA::TypeCode for an OMG IDL
- * @c object.
+ * @c object (interface) and object-like types (abstract
+ * interface, component, local interface and native).
*/
template <typename StringType, class RefCountPolicy>
class Objref
@@ -67,7 +172,9 @@ namespace TAO
/**
* @name @c TAO CORBA::TypeCode Template Methods
*
- * @c tk_objref @c CORBA::TypeCode -specific template methods.
+ * @c tk_abstract_interface, @c tk_component, @c
+ * tk_local_interface, @c tk_native and @c tk_objref
+ * @c CORBA::TypeCode -specific template methods.
*
* @see @c CORBA::TypeCode
*/
diff --git a/TAO/tao/TypeCode/Objref_TypeCode.inl b/TAO/tao/TypeCode/Objref_TypeCode.inl
index 07a60f8fdfb..09cc7f950e7 100644
--- a/TAO/tao/TypeCode/Objref_TypeCode.inl
+++ b/TAO/tao/TypeCode/Objref_TypeCode.inl
@@ -3,7 +3,7 @@
// $Id$
-template <typename StringType, class RefCountPolicy>
+template <typename StringType, CORBA::TCKind Kind, class RefCountPolicy>
ACE_INLINE
TAO::TypeCode::Objref<StringType, RefCountPolicy>::Objref (char const * id,
char const * name)
diff --git a/TAO/tao/TypeCode/String_TypeCode.h b/TAO/tao/TypeCode/String_TypeCode.h
index 093b8deff92..0a95958921a 100644
--- a/TAO/tao/TypeCode/String_TypeCode.h
+++ b/TAO/tao/TypeCode/String_TypeCode.h
@@ -39,8 +39,9 @@ namespace TAO
* types, including @c wstring.
*/
template <class RefCountPolicy>
- class String : public CORBA::TypeCode
- : private RefCountPolicy
+ class String
+ : public CORBA::TypeCode,
+ private RefCountPolicy
{
public:
diff --git a/TAO/tao/TypeCode/Struct_TypeCode.h b/TAO/tao/TypeCode/Struct_TypeCode.h
index 545bdc7d46d..e3dd780caa0 100644
--- a/TAO/tao/TypeCode/Struct_TypeCode.h
+++ b/TAO/tao/TypeCode/Struct_TypeCode.h
@@ -6,7 +6,8 @@
*
* $Id$
*
- * Header file for a @c tk_struct CORBA::TypeCode.
+ * Header file for a @c tk_struct and @c tk_except
+ * @c CORBA::TypeCodes.
*
* @author Ossama Othman <ossama@dre.vanderbilt.edu>
* @author Carlos O'Ryan
@@ -50,14 +51,14 @@ namespace TAO
* @class Struct
*
* @brief @c CORBA::TypeCode implementation for an OMG IDL
- * @c struct.
+ * @c struct or @c exception.
*
* This class implements a @c CORBA::TypeCode for an OMG IDL
- * @c struct.
+ * @c struct or @c exception.
*/
template <typename StringType,
class FieldArrayType,
- class StructTraits,
+ CORBA::TCKind Kind,
class RefCountPolicy>
class Struct
: public CORBA::TypeCode,
@@ -90,7 +91,8 @@ namespace TAO
/**
* @name @c TAO CORBA::TypeCode Template Methods
*
- * @c tk_struct @c CORBA::TypeCode -specific template methods.
+ * @c tk_struct or @c tk_except @c CORBA::TypeCode -specific
+ * template methods.
*
* @see @c CORBA::TypeCode
*/
@@ -122,7 +124,7 @@ namespace TAO
* @c Struct Attributes
*
* Attributes representing the structure of an OMG IDL
- * @c struct.
+ * @c struct or @c exception.
*
* @note These attributes are declared in the order in which
* they are marshaled into a CDR stream in order to
diff --git a/TAO/tao/TypeCode/Struct_TypeCode.inl b/TAO/tao/TypeCode/Struct_TypeCode.inl
index 114d5e49b83..9f9135325f6 100644
--- a/TAO/tao/TypeCode/Struct_TypeCode.inl
+++ b/TAO/tao/TypeCode/Struct_TypeCode.inl
@@ -2,7 +2,10 @@
//
// $Id$
-template <typename StringType, class FieldArrayType, class RefCountPolicy>
+template <typename StringType,
+ class FieldArrayType,
+ CORBA::TCKind Kind,
+ class RefCountPolicy>
ACE_INLINE
TAO::TypeCode::Struct<StringType, FieldArrayType, RefCountPolicy>::Struct (
char const * id,
@@ -15,7 +18,10 @@ TAO::TypeCode::Struct<StringType, FieldArrayType, RefCountPolicy>::Struct (
{
}
-template <typename StringType, typename FieldArrayType, class RefCountPolicy>
+template <typename StringType,
+ class FieldArrayType,
+ CORBA::TCKind Kind,
+ class RefCountPolicy>
ACE_INLINE TAO::TypeCode::Field<StringType> const *
TAO::TypeCode::Struct<StringType,
FieldArrayType>::fields (void) const
diff --git a/TAO/tao/TypeCode/WString_TypeCode.h b/TAO/tao/TypeCode/WString_TypeCode.h
deleted file mode 100644
index a08505fcdb2..00000000000
--- a/TAO/tao/TypeCode/WString_TypeCode.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file String_TypeCode.h
- *
- * $Id$
- *
- * Header file for @c CORBA::TypeCodes with empty parameter lists.
- *
- * @author Ossama Othman <ossama@dre.vanderbilt.edu>
- */
-//=============================================================================
-
-#ifndef TAO_STRING_TYPECODE_H
-#define TAO_STRING_TYPECODE_H
-
-#include /**/ "ace/pre.h"
-
-#include "tao/TypeCode.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-namespace TAO
-{
- namespace TypeCode
- {
-
- /**
- * @class String
- *
- * @brief @c CORBA::TypeCode implementation for OMG IDL string
- * types.
- *
- * This class implements a @c CORBA::TypeCode for OMG IDL string
- * types, including @c wstring.
- */
- template <class RefCountPolicy>
- class String : public CORBA::TypeCode
- : private RefCountPolicy
- {
- public:
-
- /// Constructor.
- String (CORBA::ULong len);
-
- /**
- * @name TAO-specific @c CORBA::TypeCode Methods
- *
- * Methods required by TAO's implementation of the
- * @c CORBA::TypeCode class.
- *
- * @see @c CORBA::TypeCode
- */
- //@{
- virtual bool tao_marshal (TAO_OutputCDR & cdr) const;
- virtual void tao_duplicate (void);
- virtual void tao_release (void);
- //@}
-
- protected:
-
- /**
- * @name @c TAO CORBA::TypeCode Template Methods
- *
- * @c CORBA::TypeCode template methods specific to @c tk_string
- * @c TypeCodes.
- *
- * @see @c CORBA::TypeCode
- */
- //@{
- virtual CORBA::Boolean equal_i (CORBA::TypeCode_ptr tc
- ACE_ENV_ARG_DECL) const;
- virtual CORBA::Boolean equivalent_i (CORBA::TypeCode_ptr tc
- ACE_ENV_ARG_DECL) const;
- virtual CORBA::TCKind kind_i (ACE_ENV_SINGLE_ARG_DECL) const;
- virtual CORBA::TypeCode_ptr get_compact_typecode_i (
- ACE_ENV_SINGLE_ARG_DECL) const;
- virtual CORBA::ULong length_i (ACE_ENV_SINGLE_ARG_DECL) const;
-
- private:
-
- /// Length of the @c string. A length of zero indicates an
- /// unbounded @c string.
- CORBA::ULong const length_;
-
- };
-
- } // End namespace TypeCode
-} // End namespace TAO
-
-
-#ifdef __ACE_INLINE__
-# include "tao/String_TypeCode.inl"
-#endif /* __ACE_INLINE__ */
-
-#include /**/ "ace/post.h"
-
-#endif /* TAO_STRING_TYPECODE_H */
diff --git a/TAO/tao/TypeCode/WString_TypeCode.inl b/TAO/tao/TypeCode/WString_TypeCode.inl
deleted file mode 100644
index 2c35b885482..00000000000
--- a/TAO/tao/TypeCode/WString_TypeCode.inl
+++ /dev/null
@@ -1,10 +0,0 @@
-// -*- C++ -*-
-//
-// $Id$
-
-template <class RefCountPolicy>
-ACE_INLINE
-TAO::TypeCode::String<RefCountPolicy::String (CORBA::ULong len)
- : length_ (len)
-{
-}