summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-20 21:18:48 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-20 21:18:48 +0000
commit01fbdfc39f96a43ab1d44e9b208b6eefcc13d9a3 (patch)
treea8f4c36cce6b38a335d8a3d30bf2f210030b2ad4
parent66a49b20b6e182082016096732470415adc81a3d (diff)
downloadATCD-01fbdfc39f96a43ab1d44e9b208b6eefcc13d9a3.tar.gz
ChangeLogTag: Fri Jun 20 16:09:52 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog_ref30
-rw-r--r--TAO/tao/Argument.cpp33
-rw-r--r--TAO/tao/Argument.h31
-rw-r--r--TAO/tao/Object.cpp8
-rw-r--r--TAO/tao/Object.h11
-rw-r--r--TAO/tao/Object_Argument_T.cpp9
-rw-r--r--TAO/tao/Object_Argument_T.h5
-rw-r--r--TAO/tao/Policy_ForwardC.cpp4
-rw-r--r--TAO/tao/Special_Basic_Arguments.h1
-rw-r--r--TAO/tao/TAO.dsp13
-rw-r--r--TAO/tao/Typecode.cpp66
-rw-r--r--TAO/tao/Typecode.h8
12 files changed, 182 insertions, 37 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref
index 55b5d1e12e9..73ebec076bf 100644
--- a/TAO/ChangeLog_ref
+++ b/TAO/ChangeLog_ref
@@ -1,3 +1,33 @@
+Fri Jun 20 16:09:52 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tao/Argument.cpp:
+
+ New file. Placing TAO::Argument's method implementations in
+ the header file was causing circular dependencies.
+
+ * tao/TAO.dsp:
+
+ Added new file to project.
+
+ * tao/Argument.h:
+ * tao/Object_Argument_T.cpp:
+ * tao/Object_Argument_T.h:
+ * tao/Special_Basic_Arguments.h:
+
+ Changes to file includes.
+
+ * tao/Object.cpp:
+ * tao/Object.h:
+ * tao/Typecode.cpp:
+ * tao/Typecode.h:
+
+ Added typedefs for TypeCode_Arg_Traits and Object_Arg_Traits,
+ to be used in generated code.
+
+ * tao/Policy_ForwardC.cpp:
+
+ Corrected typo in #pragma instantiation.
+
Fri Jun 20 13:12:35 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/Arg_Traits_T.h:
diff --git a/TAO/tao/Argument.cpp b/TAO/tao/Argument.cpp
new file mode 100644
index 00000000000..a106ad6bb76
--- /dev/null
+++ b/TAO/tao/Argument.cpp
@@ -0,0 +1,33 @@
+
+// $Id$
+
+#include "tao/Argument.h"
+#include "tao/DynamicC.h"
+
+CORBA::Boolean
+TAO::Argument::marshal (TAO_OutputCDR &)
+{
+ return 1;
+}
+
+CORBA::Boolean
+TAO::Argument::demarshal (TAO_InputCDR &)
+{
+ return 1;
+}
+
+void
+TAO::Argument::interceptor_param (Dynamic::Parameter &)
+{
+}
+
+void
+TAO::Argument::interceptor_result (CORBA::Any *)
+{
+}
+
+CORBA::Boolean
+TAO::Argument::interceptor_replace (CORBA::Any &)
+{
+ return 1;
+}
diff --git a/TAO/tao/Argument.h b/TAO/tao/Argument.h
index bccb9202985..0f4ef97cf8f 100644
--- a/TAO/tao/Argument.h
+++ b/TAO/tao/Argument.h
@@ -11,17 +11,28 @@
//=============================================================================
-#ifndef TAO_ARGUMENT_T_H
-#define TAO_ARGUMENT_T_H
+#ifndef TAO_ARGUMENT_H
+#define TAO_ARGUMENT_H
#include "ace/pre.h"
+#include "tao/corbafwd.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/corbafwd.h"
-#include "tao/DynamicC.h"
+namespace Dynamic
+{
+ struct Parameter;
+};
+
+namespace CORBA
+{
+ class Any;
+}
+
+class TAO_OutputCDR;
+class TAO_InputCDR;
namespace TAO
{
@@ -34,14 +45,14 @@ namespace TAO
class TAO_Export Argument
{
public:
- virtual CORBA::Boolean marshal (TAO_OutputCDR &) {return 1;}
- virtual CORBA::Boolean demarshal (TAO_InputCDR &) {return 1;}
- virtual void interceptor_param (Dynamic::Parameter &) {}
- virtual void interceptor_result (CORBA::Any *) {}
- virtual CORBA::Boolean interceptor_replace (CORBA::Any &) {return 1;}
+ virtual CORBA::Boolean marshal (TAO_OutputCDR &);
+ virtual CORBA::Boolean demarshal (TAO_InputCDR &);
+ virtual void interceptor_param (Dynamic::Parameter &);
+ virtual void interceptor_result (CORBA::Any *);
+ virtual CORBA::Boolean interceptor_replace (CORBA::Any &);
};
};
#include "ace/post.h"
-#endif /* TAO_ARGUMENT_T_H */
+#endif /* TAO_ARGUMENT_H */
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 30c2b1351b5..212679fea41 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -993,14 +993,18 @@ TAO_Object_Proxy_Broker * (*_TAO_collocation_Object_Proxy_Broker_Factory_functio
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-// template class TAO_Object_Manager<CORBA::Object, CORBA::Object_var>;
template class TAO_Pseudo_Var_T<CORBA::Object>;
template class TAO_Pseudo_Out_T<CORBA::Object, CORBA::Object_var>;
+template class TAO::Object_Arg_Traits_T<CORBA::Object_ptr,
+ CORBA::Object_var,
+ CORBA::Object_out>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-// #pragma instantiate TAO_Object_Manager<CORBA::Object, CORBA::Object_var>
#pragma instantiate TAO_Pseudo_Var_T<CORBA::Object>
#pragma instantiate TAO_Pseudo_Out_T<CORBA::Object, CORBA::Object_var>
+#pragma instantiate TAO::Object_Arg_Traits_T<CORBA::Object_ptr, \
+ CORBA::Object_var, \
+ CORBA::Object_out>;
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index b135af36084..91019586b17 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -31,6 +31,7 @@
#include "tao/Pseudo_VarOut_T.h"
#include "ace/Synch.h"
#include "tao/IOP_IORC.h"
+#include "tao/Object_Argument_T.h"
class TAO_Stub;
@@ -381,6 +382,16 @@ namespace CORBA
};
} // End CORBA namespace.
+/// Used in generated code if CORBA::Object is an argument or return type.
+namespace TAO
+{
+ typedef
+ Object_Arg_Traits_T<CORBA::Object_ptr,
+ CORBA::Object_var,
+ CORBA::Object_out>
+ Object_Arg_Traits;
+};
+
/// This function pointer is set only when the Portable server
/// library is present.
extern TAO_Export TAO_Object_Proxy_Broker * (*_TAO_collocation_Object_Proxy_Broker_Factory_function_pointer) (
diff --git a/TAO/tao/Object_Argument_T.cpp b/TAO/tao/Object_Argument_T.cpp
index 4748153f0ce..9ae3972bf8d 100644
--- a/TAO/tao/Object_Argument_T.cpp
+++ b/TAO/tao/Object_Argument_T.cpp
@@ -6,9 +6,9 @@
#include "tao/Object_Argument_T.h"
ACE_RCSID (tao,
- String_Argument_T,
+ Object_Argument_T,
"$Id$")
-
+#if 0
template<typename S_ptr>
TAO::In_Object_Argument_T<S_ptr>::In_Object_Argument_T (S_ptr x)
: x_ (x)
@@ -54,6 +54,7 @@ template<typename S_ptr>
CORBA::Boolean
TAO::Inout_Object_Argument_T<S_ptr>::demarshal (TAO_InputCDR & cdr)
{
+ CORBA::release (this->x_);
return cdr >> this->x_;
}
@@ -272,10 +273,10 @@ TAO::Ret_Object_SArgument_T<S_ptr,S_var>::interceptor_replace (
}
template<typename S_ptr, typename S_var>
-S_ptr&
+S_ptr &
TAO::Ret_Object_SArgument_T<S_ptr,S_var>::arg (void)
{
return this->x_.out ();
}
-
+#endif
#endif /* TAO_OBJECT_ARGUMENT_T_C */
diff --git a/TAO/tao/Object_Argument_T.h b/TAO/tao/Object_Argument_T.h
index 5635855f420..c67d77ef1b4 100644
--- a/TAO/tao/Object_Argument_T.h
+++ b/TAO/tao/Object_Argument_T.h
@@ -15,15 +15,15 @@
#define TAO_OBJECT_ARGUMENT_T_H
#include "ace/pre.h"
+#include "tao/Argument.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "tao/Argument.h"
-
namespace TAO
{
+
/**
* @class In_Object_Argument_T
*
@@ -213,6 +213,7 @@ namespace TAO
* @brief Template class for argument traits of objects.
*
*/
+
template<typename T_ptr, typename T_var, typename T_out>
struct Object_Arg_Traits_T
{
diff --git a/TAO/tao/Policy_ForwardC.cpp b/TAO/tao/Policy_ForwardC.cpp
index c864253d151..6c4487095d7 100644
--- a/TAO/tao/Policy_ForwardC.cpp
+++ b/TAO/tao/Policy_ForwardC.cpp
@@ -173,12 +173,12 @@ template class TAO_Unbounded_Object_Sequence<CORBA::Policy,
> \
>
-#pragma instantiate TAO_Unbounded_Object_Sequence<CORBA::Policy,
+# pragma instantiate TAO_Unbounded_Object_Sequence<CORBA::Policy,
TAO_Objref_Var_T<CORBA::Policy, CORBA::tao_Policy_life>,
CORBA::tao_Policy_life,
CORBA::tao_Policy_cast>
-#pragms instantiate TAO_Seq_Var_Base_T<CORBA::PolicyList,
+# pragma instantiate TAO_Seq_Var_Base_T<CORBA::PolicyList,
TAO_Object_Manager<CORBA::Policy,
TAO_Objref_Var_T<CORBA::Policy,
CORBA::tao_Policy_life>,
diff --git a/TAO/tao/Special_Basic_Arguments.h b/TAO/tao/Special_Basic_Arguments.h
index cf8a1faf488..910d0da8c3e 100644
--- a/TAO/tao/Special_Basic_Arguments.h
+++ b/TAO/tao/Special_Basic_Arguments.h
@@ -15,6 +15,7 @@
#define TAO_SPECIAL_BASIC_ARGUMENTS_H
#include "ace/pre.h"
+#include "ace/CDR_Stream.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp
index ce91f41db2e..387e143cbb6 100644
--- a/TAO/tao/TAO.dsp
+++ b/TAO/tao/TAO.dsp
@@ -184,6 +184,10 @@ SOURCE=.\append.cpp
# End Source File
# Begin Source File
+SOURCE=.\Argument.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Asynch_Invocation.cpp
# End Source File
# Begin Source File
@@ -1572,6 +1576,10 @@ SOURCE=.\object.h
# End Source File
# Begin Source File
+SOURCE=.\Object_Argument_T.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Object_KeyC.h
# End Source File
# Begin Source File
@@ -2658,6 +2666,11 @@ SOURCE=.\Codeset_Translator_Factory_T.cpp
# End Source File
# Begin Source File
+SOURCE=.\Object_Argument_T.cpp
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
SOURCE=.\Objref_VarOut_T.cpp
# PROP Exclude_From_Build 1
# End Source File
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index 0e6f7fee172..cbb1504fc29 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -3719,16 +3719,18 @@ template class ACE_Hash_Map_Manager_Ex<const char *,
ACE_Hash<const char *>,
ACE_Equal_To<const char *>,
ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<const char *,
- ACE_Unbounded_Queue<CORBA::Long> *,
- ACE_Hash<const char *>,
- ACE_Equal_To<const char *>,
- ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<const char *,
- ACE_Unbounded_Queue<CORBA::Long> *,
- ACE_Hash<const char *>,
- ACE_Equal_To<const char *>,
- ACE_Null_Mutex>;
+template class
+ ACE_Hash_Map_Iterator_Base_Ex<const char *,
+ ACE_Unbounded_Queue<CORBA::Long> *,
+ ACE_Hash<const char *>,
+ ACE_Equal_To<const char *>,
+ ACE_Null_Mutex>;
+template class
+ ACE_Hash_Map_Reverse_Iterator_Ex<const char *,
+ ACE_Unbounded_Queue<CORBA::Long> *,
+ ACE_Hash<const char *>,
+ ACE_Equal_To<const char *>,
+ ACE_Null_Mutex>;
template class ACE_Hash_Map_Iterator_Ex<const char *,
ACE_Unbounded_Queue<CORBA::Long> *,
ACE_Hash<const char *>,
@@ -3738,17 +3740,47 @@ template class ACE_Hash_Map_Iterator_Ex<const char *,
template class TAO_Pseudo_Var_T<CORBA::TypeCode>;
template class TAO_Pseudo_Out_T<CORBA::TypeCode, CORBA::TypeCode_var>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+template class TAO::Object_Arg_Traits_T<CORBA::TypeCode_ptr,
+ CORBA::TypeCode_var,
+ CORBA::TypeCode_out>;
-#pragma instantiate TAO_Pseudo_Object_Manager<CORBA::TypeCode, CORBA::TypeCode_var>
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Hash_Map_Entry<const char *, ACE_Unbounded_Queue<CORBA::Long> *>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<const char *, ACE_Unbounded_Queue<CORBA::Long> *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<const char *, ACE_Unbounded_Queue<CORBA::Long> *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Nullv_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<const char *, ACE_Unbounded_Queue<CORBA::Long> *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<const char *, ACE_Unbounded_Queue<CORBA::Long> *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>
+#pragma instantiate TAO_Pseudo_Object_Manager<CORBA::TypeCode, \
+ CORBA::TypeCode_var>
+
+#pragma instantiate ACE_Hash_Map_Entry<const char *, \
+ ACE_Unbounded_Queue<CORBA::Long> *>
+#pragma instantiate \
+ ACE_Hash_Map_Manager_Ex<const char *, \
+ ACE_Unbounded_Queue<CORBA::Long> *, \
+ ACE_Hash<const char *>, \
+ ACE_Equal_To<const char *>, \
+ ACE_Null_Mutex>
+#pragma instantiate \
+ ACE_Hash_Map_Iterator_Base_Ex<const char *, \
+ ACE_Unbounded_Queue<CORBA::Long> *, \
+ ACE_Hash<const char *>, \
+ ACE_Equal_To<const char *>, \
+ ACE_Nullv_Mutex>
+#pragma instantiate \
+ ACE_Hash_Map_Reverse_Iterator_Ex<const char *, \
+ ACE_Unbounded_Queue<CORBA::Long> *, \
+ ACE_Hash<const char *>, \
+ ACE_Equal_To<const char *>, \
+ ACE_Null_Mutex>
+#pragma instantiate \
+ ACE_Hash_Map_Iterator_Ex<const char *, \
+ ACE_Unbounded_Queue<CORBA::Long> *, \
+ ACE_Hash<const char *>, \
+ ACE_Equal_To<const char *>, \
+ ACE_Null_Mutex>
#pragma instantiate TAO_Pseudo_Var_T<CORBA::TypeCode>
#pragma instantiate TAO_Pseudo_Out_T<CORBA::TypeCode, CORBA::TypeCode_var>
+#pragma instantiate TAO::Object_Arg_Traits_T<CORBA::TypeCode_ptr, \
+ CORBA::TypeCode_var, \
+ CORBA::TypeCode_out>
+
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/tao/Typecode.h b/TAO/tao/Typecode.h
index 0d138d06f89..f9b7538d7e1 100644
--- a/TAO/tao/Typecode.h
+++ b/TAO/tao/Typecode.h
@@ -27,6 +27,7 @@
#include "tao/Exception.h"
#include "tao/Pseudo_VarOut_T.h"
+#include "tao/Object_Argument_T.h"
// Forward declarations
class TAO_InputCDR;
@@ -542,6 +543,13 @@ namespace CORBA
namespace TAO
{
+ /// Used in generated code if CORBA::Object is an argument or return type.
+ typedef
+ Object_Arg_Traits_T<CORBA::TypeCode_ptr,
+ CORBA::TypeCode_var,
+ CORBA::TypeCode_out>
+ TypeCode_Arg_Traits;
+
/**
* @class TC_Private_State
*