summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-19 22:38:30 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-19 22:38:30 +0000
commitd3b98e5c569eaf8d800e94d8c39ab4983a357b8a (patch)
tree478126d2da73ed0d02427e65fa4146e6c35a584d
parent4463a9694dce031aa2bcabe2e30eb1258159f726 (diff)
downloadATCD-d3b98e5c569eaf8d800e94d8c39ab4983a357b8a.tar.gz
ChangeLogTag: Thu Jun 19 17:31:11 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog_ref40
-rw-r--r--TAO/tao/Argument.h38
-rw-r--r--TAO/tao/BD_String_Argument_T.h123
-rw-r--r--TAO/tao/Basic_Argument_T.cpp57
-rw-r--r--TAO/tao/Basic_Argument_T.h24
-rw-r--r--TAO/tao/Basic_Arguments.cpp14
-rw-r--r--TAO/tao/Basic_Arguments.h6
-rw-r--r--TAO/tao/CORBA_String.h6
-rw-r--r--TAO/tao/CORBA_String.inl14
-rw-r--r--TAO/tao/Special_Basic_Argument_T.cpp39
-rw-r--r--TAO/tao/Special_Basic_Argument_T.h12
-rw-r--r--TAO/tao/UB_String_Argument_T.cpp217
-rw-r--r--TAO/tao/UB_String_Argument_T.h108
-rw-r--r--TAO/tao/UB_String_Arguments.h8
-rw-r--r--TAO/tests/Bench/Bench.dsw41
-rw-r--r--TAO/tests/Bench/wire/client.cpp97
-rw-r--r--TAO/tests/Bench/wire/client.dsp134
-rw-r--r--TAO/tests/Bench/wire/server.cpp129
-rw-r--r--TAO/tests/Bench/wire/server.dsp148
-rw-r--r--TAO/tests/Bench/wire/test.idl10
-rw-r--r--TAO/tests/Bench/wire/testC.cpp931
-rw-r--r--TAO/tests/Bench/wire/testC.h403
-rw-r--r--TAO/tests/Bench/wire/testC.i85
-rw-r--r--TAO/tests/Bench/wire/testS.cpp925
-rw-r--r--TAO/tests/Bench/wire/testS.h238
-rw-r--r--TAO/tests/Bench/wire/test_i.cpp33
-rw-r--r--TAO/tests/Bench/wire/test_i.h24
27 files changed, 3643 insertions, 261 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref
index 6a5b402fbc7..916a27b7569 100644
--- a/TAO/ChangeLog_ref
+++ b/TAO/ChangeLog_ref
@@ -1,3 +1,43 @@
+Thu Jun 19 17:31:11 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * tests/Bench/wire/client.cpp:
+ * tests/Bench/wire/client.dsp:
+ * tests/Bench/wire/server.cpp:
+ * tests/Bench/wire/server.dsp:
+ * tests/Bench/wire/test.idl:
+ * tests/Bench/wire/testC.cpp:
+ * tests/Bench/wire/testC.h:
+ * tests/Bench/wire/testC.i:
+ * tests/Bench/wire/testS.cpp:
+ * tests/Bench/wire/testS.h:
+ * tests/Bench/wire/test_i.cpp:
+ * tests/Bench/wire/test_i.h:
+
+ New files, handcrafted example for testing
+ changes in this branch.
+
+ * tao/Argument.h:
+ * tao/BD_String_Argument_T.h:
+ * tao/Basic_Argument_T.cpp:
+ * tao/Basic_Argument_T.h:
+ * tao/Basic_Arguments.cpp:
+ * tao/Basic_Arguments.h:
+ * tao/Special_Basic_Argument_T.cpp:
+ * tao/Special_Basic_Argument_T.h:
+ * tao/UB_String_Argument_T.cpp:
+ * tao/UB_String_Argument_T.h:
+ * tao/UB_String_Arguments.h:
+
+ Changes to the new TAO template args/traits
+ interface.
+
+ * tao/CORBA_String.h:
+ * tao/CORBA_String.inl:
+
+ Added ptr() method to (w)string _var classes,
+ to get a return value of T * without giving
+ up ownership of the underlying pointer.
+
Wed Jun 18 22:57:37 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/BD_String_Argument_T.cpp:
diff --git a/TAO/tao/Argument.h b/TAO/tao/Argument.h
index 758bbb1338a..bccb9202985 100644
--- a/TAO/tao/Argument.h
+++ b/TAO/tao/Argument.h
@@ -20,8 +20,8 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-#include "corbafwd.h"
-#include "DynamicC.h"
+#include "tao/corbafwd.h"
+#include "tao/DynamicC.h"
namespace TAO
{
@@ -34,35 +34,11 @@ namespace TAO
class TAO_Export Argument
{
public:
- virtual CORBA::Boolean marshal (TAO_OutputCDR &) = 0;
- virtual CORBA::Boolean demarshal (TAO_InputCDR &) = 0;
- virtual void add_to_interceptor (Dynamic::Parameter &) = 0;
- };
-
- /**
- * @class Stub_Retval
- *
- * @brief Base class for stub return value classes.
- *
- */
- class TAO_Export Stub_Retval
- {
- public:
- virtual CORBA::Boolean demarshal (TAO_InputCDR &) = 0;
- virtual void add_to_interceptor (CORBA::Any *) = 0;
- };
-
- /**
- * @class Skel_Retval
- *
- * @brief Base class for skelton return value classes.
- *
- */
- class TAO_Export Skel_Retval
- {
- public:
- virtual CORBA::Boolean marshal (TAO_OutputCDR &) = 0;
- virtual void add_to_interceptor (CORBA::Any *) = 0;
+ 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;}
};
};
diff --git a/TAO/tao/BD_String_Argument_T.h b/TAO/tao/BD_String_Argument_T.h
index bbaf00a737e..e39ceebba22 100644
--- a/TAO/tao/BD_String_Argument_T.h
+++ b/TAO/tao/BD_String_Argument_T.h
@@ -34,14 +34,14 @@ namespace TAO
class In_BD_String_Argument_T : public Argument
{
public:
- In_BD_String_Argument_T (S * const & x);
+ In_BD_String_Argument_T (const S * x);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (Dynamic::Parameter &);
private:
- S * const & x_;
+ const S * x_;
};
/**
@@ -70,11 +70,15 @@ namespace TAO
* @brief Template class for INOUT unbounded (w)string argument.
*
*/
- template<typename S, typename to_S, typename from_S, size_t BOUND>
+ template<typename S,
+ typename S_out,
+ typename to_S,
+ typename from_S,
+ size_t BOUND>
class Out_BD_String_Argument_T : public Argument
{
public:
- Out_BD_String_Argument_T (S *& x);
+ Out_BD_String_Argument_T (S_out x);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
@@ -90,19 +94,25 @@ namespace TAO
* @brief Template class for return stub value of ub (w)string argument.
*
*/
- template<typename S, typename to_S, typename from_S, size_t BOUND>
- class Ret_BD_String_Argument_T : public Stub_Retval
+ template<typename S,
+ typename S_var,
+ typename to_S,
+ typename from_S,
+ size_t BOUND>
+ class Ret_BD_String_Argument_T : public Argument
{
public:
Ret_BD_String_Argument_T (void);
+ virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (CORBA::Any *);
- operator S * () const;
+ operator S * ();
+ S * retn (void);
private:
- S * x_;
+ S_var x_;
};
/**
@@ -111,7 +121,11 @@ namespace TAO
* @brief Template class for IN skeleton UB (w)string argument.
*
*/
- template<typename S, typename to_S, typename from_S, size_t BOUND>
+ template<typename S,
+ typename S_var,
+ typename to_S,
+ typename from_S,
+ size_t BOUND>
class In_BD_String_SArgument_T : public Argument
{
public:
@@ -121,7 +135,7 @@ namespace TAO
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (Dynamic::Parameter &);
- operator S * () const;
+ operator const S * () const;
private:
S * x_;
@@ -133,7 +147,11 @@ namespace TAO
* @brief Template class for INOUT skeleton UB (w)string argument.
*
*/
- template<typename S, typename to_S, typename from_S, size_t BOUND>
+ template<typename S,
+ typename S_var,
+ typename to_S,
+ typename from_S,
+ size_t BOUND>
class Inout_BD_String_SArgument_T : public Argument
{
public:
@@ -146,7 +164,7 @@ namespace TAO
operator S *& ();
private:
- S * x_;
+ S_var x_;
};
/**
@@ -155,7 +173,12 @@ namespace TAO
* @brief Template class for INOUT skeleton UB (w)string argument.
*
*/
- template<typename S, typename to_S, typename from_S, size_t BOUND>
+ template<typename S,
+ typename S_var,
+ typename S_out,
+ typename to_S,
+ typename from_S,
+ size_t BOUND>
class Out_BD_String_SArgument_T : public Argument
{
public:
@@ -165,10 +188,10 @@ namespace TAO
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (Dynamic::Parameter &);
- operator S *& ();
+ operator S_out ();
private:
- S * x_;
+ S_var x_;
};
/**
@@ -177,20 +200,24 @@ namespace TAO
* @brief Template class for return skeleton value of UB (w)string.
*
*/
- template<typename S, typename to_S, typename from_S, size_t BOUND>
+ template<typename S,
+ typename S_var,
+ typename to_S,
+ typename from_S,
+ size_t BOUND>
class Ret_BD_String_SArgument_T : public Skel_Retval
{
public:
Ret_BD_String_SArgument_T (void);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
+ virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (CORBA::Any *);
- operator S * () const;
- operator S *& ();
+ operator S * ();
private:
- S * x_;
+ S_var x_;
};
/**
@@ -207,7 +234,12 @@ namespace TAO
* @brief Template class for argument traits of bounded (w)strings.
*
*/
- template<typename T, typename T_out, typename to_T, typename from_T, size_t BOUND>
+ template<typename T,
+ typename T_var,
+ typename T_out,
+ typename to_T,
+ typename from_T,
+ size_t BOUND>
struct BD_String_Arg_Traits_T
{
typedef T * ret_type;
@@ -215,15 +247,46 @@ namespace TAO
typedef T *& inout_type;
typedef T_out out_type;
- typedef In_BD_String_Argument_T<T,to_T,from_T,BOUND> in_arg_val;
- typedef Inout_BD_String_Argument_T<T,to_T,from_T,BOUND> inout_arg_val;
- typedef Out_BD_String_Argument_T<T,to_T,from_T,BOUND> out_arg_val;
- typedef Ret_BD_String_Argument_T<T,to_T,from_T,BOUND> stub_ret_val;
-
- typedef In_BD_String_SArgument_T<T,to_T,from_T,BOUND> in_sarg_val;
- typedef Inout_BD_String_SArgument_T<T,to_T,from_T,BOUND> inout_sarg_val;
- typedef Out_BD_String_SArgument_T<T,to_T,from_T,BOUND> out_sarg_val;
- typedef Ret_BD_String_SArgument_T<T,to_T,from_T,BOUND> skel_ret_val;
+ typedef In_BD_String_Argument_T<T,
+ to_T,
+ from_T,
+ BOUND> in_arg_val;
+ typedef Inout_BD_String_Argument_T<T,
+ to_T,
+ from_T,
+ BOUND> inout_arg_val;
+ typedef Out_BD_String_Argument_T<T,
+ T_out,
+ to_T,
+ from_T,
+ BOUND> out_arg_val;
+ typedef Ret_BD_String_Argument_T<T,
+ T_var,
+ to_T,
+ from_T,
+ BOUND> stub_ret_val;
+
+ typedef In_BD_String_SArgument_T<T,
+ T_var,
+ to_T,
+ from_T,
+ BOUND> in_sarg_val;
+ typedef Inout_BD_String_SArgument_T<T,
+ T_var,
+ to_T,
+ from_T,
+ BOUND> inout_sarg_val;
+ typedef Out_BD_String_SArgument_T<T,
+ T_var,
+ T_out,
+ to_T,
+ from_T,
+ BOUND> out_sarg_val;
+ typedef Ret_BD_String_SArgument_T<T,
+ T_var,
+ to_T,
+ from_T,
+ BOUND> skel_ret_val;
typedef BD_String_Tag idl_tag;
};
@@ -237,6 +300,7 @@ namespace TAO
template<size_t BOUND>
class BD_String_Traits
: public BD_String_Arg_Traits_T<CORBA::Char,
+ CORBA::String_var,
CORBA::String_out,
ACE_InputCDR::to_string,
ACE_OutputCDR::from_string,
@@ -247,6 +311,7 @@ namespace TAO
template<size_t BOUND>
class BD_WString_Traits
: public BD_String_Arg_Traits_T<CORBA::WChar,
+ CORBA::WString_var,
CORBA::WString_out,
ACE_InputCDR::to_wstring,
ACE_OutputCDR::from_wstring,
diff --git a/TAO/tao/Basic_Argument_T.cpp b/TAO/tao/Basic_Argument_T.cpp
index 4df89f8546c..e102408930d 100644
--- a/TAO/tao/Basic_Argument_T.cpp
+++ b/TAO/tao/Basic_Argument_T.cpp
@@ -30,7 +30,7 @@ TAO::In_Basic_Argument_T<S>::demarshal (TAO_InputCDR &)
template<typename S>
void
-TAO::In_Basic_Argument_T<S>::add_to_interceptor (Dynamic::Parameter & p)
+TAO::In_Basic_Argument_T<S>::interceptor_param (Dynamic::Parameter & p)
{
p.argument <<= this->x_;
p.mode = CORBA::PARAM_IN;
@@ -59,7 +59,7 @@ TAO::Inout_Basic_Argument_T<S>::demarshal (TAO_InputCDR & cdr)
template<typename S>
void
-TAO::Inout_Basic_Argument_T<S>::add_to_interceptor (Dynamic::Parameter & p)
+TAO::Inout_Basic_Argument_T<S>::interceptor_param (Dynamic::Parameter & p)
{
p.argument <<= this->x_;
p.mode = CORBA::PARAM_INOUT;
@@ -86,17 +86,18 @@ TAO::Out_Basic_Argument_T<S>::demarshal (TAO_InputCDR & cdr)
return cdr >> this->x_;
}
+// ============================================================
+
template<typename S>
-void
-TAO::Out_Basic_Argument_T<S>::add_to_interceptor (Dynamic::Parameter &)
+TAO::Ret_Basic_Argument_T<S>::Ret_Basic_Argument_T (void)
{
}
-// ============================================================
-
template<typename S>
-TAO::Ret_Basic_Argument_T<S>::Ret_Basic_Argument_T (void)
+CORBA::Boolean
+TAO::Ret_Basic_Argument_T<S>::marshal (TAO_OutputCDR &)
{
+ return 1;
}
template<typename S>
@@ -108,7 +109,7 @@ TAO::Ret_Basic_Argument_T<S>::demarshal (TAO_InputCDR & cdr)
template<typename S>
void
-TAO::Ret_Basic_Argument_T<S>::add_to_interceptor (CORBA::Any * any)
+TAO::Ret_Basic_Argument_T<S>::interceptor_result (CORBA::Any * any)
{
(*any) <<= this->x_;
}
@@ -119,6 +120,13 @@ TAO::Ret_Basic_Argument_T<S>::operator S () const
return this->x_;
}
+template<typename S>
+S
+TAO::Ret_Basic_Argument_T<S>::retn (void)
+{
+ return this->x_;
+}
+
// ============================================================
template<typename S>
@@ -141,7 +149,7 @@ TAO::In_Basic_SArgument_T<S>::demarshal (TAO_InputCDR &cdr)
template<typename S>
void
-TAO::In_Basic_SArgument_T<S>::add_to_interceptor (Dynamic::Parameter & p)
+TAO::In_Basic_SArgument_T<S>::interceptor_param (Dynamic::Parameter & p)
{
p.argument <<= this->x_;
p.mode = CORBA::PARAM_IN;
@@ -175,7 +183,7 @@ TAO::Inout_Basic_SArgument_T<S>::demarshal (TAO_InputCDR & cdr)
template<typename S>
void
-TAO::Inout_Basic_SArgument_T<S>::add_to_interceptor (Dynamic::Parameter & p)
+TAO::Inout_Basic_SArgument_T<S>::interceptor_param (Dynamic::Parameter & p)
{
p.argument <<= this->x_;
p.mode = CORBA::PARAM_INOUT;
@@ -207,18 +215,6 @@ TAO::Out_Basic_SArgument_T<S>::demarshal (TAO_InputCDR &)
return 1;
}
-template<typename S>
-void
-TAO::Out_Basic_SArgument_T<S>::add_to_interceptor (Dynamic::Parameter &)
-{
-}
-
-template<typename S>
-TAO::Out_Basic_SArgument_T<S>::operator S & ()
-{
- return this->x_;
-}
-
// ============================================================
template<typename S>
@@ -234,20 +230,29 @@ TAO::Ret_Basic_SArgument_T<S>::marshal (TAO_OutputCDR & cdr)
}
template<typename S>
+CORBA::Boolean
+TAO::Ret_Basic_SArgument_T<S>::demarshal (TAO_InputCDR &)
+{
+ return 1;
+}
+
+template<typename S>
void
-TAO::Ret_Basic_SArgument_T<S>::add_to_interceptor (CORBA::Any * any)
+TAO::Ret_Basic_SArgument_T<S>::interceptor_result (CORBA::Any * any)
{
(*any) <<= this->x_;
}
template<typename S>
-TAO::Ret_Basic_SArgument_T<S>::operator S () const
+TAO::Ret_Basic_SArgument_T<S> &
+TAO::Ret_Basic_SArgument_T<S>::operator= (const S & rhs)
{
- return this->x_;
+ this->x_ = rhs;
+ return *this;
}
template<typename S>
-TAO::Ret_Basic_SArgument_T<S>::operator S & ()
+TAO::Ret_Basic_SArgument_T<S>::operator S () const
{
return this->x_;
}
diff --git a/TAO/tao/Basic_Argument_T.h b/TAO/tao/Basic_Argument_T.h
index b0b1499cd85..af3fe4f7894 100644
--- a/TAO/tao/Basic_Argument_T.h
+++ b/TAO/tao/Basic_Argument_T.h
@@ -38,7 +38,7 @@ namespace TAO
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
+ virtual void interceptor_param (Dynamic::Parameter &s);
private:
S const & x_;
@@ -58,7 +58,7 @@ namespace TAO
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
+ virtual void interceptor_param (Dynamic::Parameter &s);
private:
mutable S & x_;
@@ -78,7 +78,6 @@ namespace TAO
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
private:
mutable S & x_;
@@ -91,15 +90,17 @@ namespace TAO
*
*/
template<typename S>
- class Ret_Basic_Argument_T : public Stub_Retval
+ class Ret_Basic_Argument_T : public Argument
{
public:
Ret_Basic_Argument_T (void);
+ virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (CORBA::Any *);
+ virtual void interceptor_result (CORBA::Any *);
operator S () const;
+ S retn (void);
private:
S x_;
@@ -119,7 +120,7 @@ namespace TAO
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
+ virtual void interceptor_param (Dynamic::Parameter &s);
operator S () const;
@@ -141,7 +142,7 @@ namespace TAO
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
+ virtual void interceptor_param (Dynamic::Parameter &s);
operator S & ();
@@ -163,7 +164,7 @@ namespace TAO
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
+ virtual void add_to_interceptor (CORBA::Any &);
operator S & ();
@@ -178,16 +179,17 @@ namespace TAO
*
*/
template<typename S>
- class Ret_Basic_SArgument_T : public Skel_Retval
+ class Ret_Basic_SArgument_T : public Argument
{
public:
Ret_Basic_SArgument_T (void);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
- virtual void add_to_interceptor (CORBA::Any *);
+ virtual CORBA::Boolean demarshal (TAO_InputCDR &);
+ virtual void interceptor_result (CORBA::Any *);
+ Ret_Basic_SArgument_T<S> & operator= (const S & rhs);
operator S () const;
- operator S & ();
private:
S x_;
diff --git a/TAO/tao/Basic_Arguments.cpp b/TAO/tao/Basic_Arguments.cpp
index 7caa381e161..45d2bfa32bf 100644
--- a/TAO/tao/Basic_Arguments.cpp
+++ b/TAO/tao/Basic_Arguments.cpp
@@ -8,6 +8,13 @@ ACE_RCSID (tao,
template<>
CORBA::Boolean
+TAO::Ret_Basic_Argument_T<void>::marshal (TAO_OutputCDR &)
+{
+ return 1;
+}
+
+template<>
+CORBA::Boolean
TAO::Ret_Basic_Argument_T<void>::demarshal (TAO_InputCDR &)
{
return 1;
@@ -32,6 +39,13 @@ TAO::Ret_Basic_SArgument_T<void>::marshal (TAO_OutputCDR &)
}
template<>
+CORBA::Boolean
+TAO::Ret_Basic_SArgument_T<void>::demarshal (TAO_InputCDR &)
+{
+ return 1;
+}
+
+template<>
void
TAO::Ret_Basic_SArgument_T<void>::add_to_interceptor (CORBA::Any *)
{
diff --git a/TAO/tao/Basic_Arguments.h b/TAO/tao/Basic_Arguments.h
index a8e3ceb91fc..b2ddd2454c5 100644
--- a/TAO/tao/Basic_Arguments.h
+++ b/TAO/tao/Basic_Arguments.h
@@ -32,9 +32,10 @@ namespace TAO
*/
template<>
- class TAO_Export Ret_Basic_Argument_T<void> : public Stub_Retval
+ class TAO_Export Ret_Basic_Argument_T<void> : public Argument
{
public:
+ virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (CORBA::Any *);
@@ -42,10 +43,11 @@ namespace TAO
};
template<>
- class TAO_Export Ret_Basic_SArgument_T<void> : public Skel_Retval
+ class TAO_Export Ret_Basic_SArgument_T<void> : public Argument
{
public:
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
+ virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (CORBA::Any *);
operator void () const;
diff --git a/TAO/tao/CORBA_String.h b/TAO/tao/CORBA_String.h
index 33acf238b12..e518c313c16 100644
--- a/TAO/tao/CORBA_String.h
+++ b/TAO/tao/CORBA_String.h
@@ -93,6 +93,9 @@ namespace CORBA
/// for string of return type.
char *_retn (void);
+ /// TAO extension.
+ char *ptr (void);
+
private:
/// instance.
char *ptr_;
@@ -209,6 +212,9 @@ namespace CORBA
/// for string of return type.
CORBA::WChar *_retn (void);
+ /// TAO extension.
+ CORBA::WChar *ptr (void);
+
private:
/// instance.
CORBA::WChar *ptr_;
diff --git a/TAO/tao/CORBA_String.inl b/TAO/tao/CORBA_String.inl
index 79c40246dcd..a6c4093675d 100644
--- a/TAO/tao/CORBA_String.inl
+++ b/TAO/tao/CORBA_String.inl
@@ -72,6 +72,13 @@ CORBA::String_var::_retn (void)
return temp;
}
+/// TAO extension.
+ACE_INLINE char *
+CORBA::String_var::ptr (void)
+{
+ return this->ptr_;
+}
+
// ----------------------------------------------------
// String_out type
// ----------------------------------------------------
@@ -206,6 +213,13 @@ CORBA::WString_var::_retn (void)
return temp;
}
+/// TAO extension.
+ACE_INLINE CORBA::WChar *
+CORBA::WString_var::ptr (void)
+{
+ return this->ptr_;
+}
+
// ----------------------------------------------------
// String_out type
// ----------------------------------------------------
diff --git a/TAO/tao/Special_Basic_Argument_T.cpp b/TAO/tao/Special_Basic_Argument_T.cpp
index 67d67271729..0f4b7c81c29 100644
--- a/TAO/tao/Special_Basic_Argument_T.cpp
+++ b/TAO/tao/Special_Basic_Argument_T.cpp
@@ -118,6 +118,15 @@ Ret_Special_Basic_Argument_T (void)
template<typename S, typename to_S, typename from_S>
CORBA::Boolean
+TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S>::marshal (
+ TAO_OutputCDR &
+ )
+{
+ return 1;
+}
+
+template<typename S, typename to_S, typename from_S>
+CORBA::Boolean
TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S>::demarshal (
TAO_InputCDR & cdr
)
@@ -134,6 +143,19 @@ TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S>::add_to_interceptor (
(*any) <<= this->x_;
}
+template<typename S, typename to_S, typename from_S>
+TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S>::operator S ()
+{
+ return this->x_;
+}
+
+template<typename S, typename to_S, typename from_S>
+S
+TAO::Ret_Special_Basic_Argument_T<S,to_S,from_S>::retn (void)
+{
+ return this->x_;
+}
+
// ============================================================
template<typename S, typename to_S, typename from_S>
@@ -269,6 +291,15 @@ TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S>::marshal (
}
template<typename S, typename to_S, typename from_S>
+CORBA::Boolean
+TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S>::demarshal (
+ TAO_InputCDR &
+ )
+{
+ return 1;
+}
+
+template<typename S, typename to_S, typename from_S>
void
TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S>::add_to_interceptor (
CORBA::Any * any
@@ -278,13 +309,15 @@ TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S>::add_to_interceptor (
}
template<typename S, typename to_S, typename from_S>
-TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S>::operator S () const
+TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S> &
+TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S>::operator= (S & rhs)
{
- return this->x_;
+ this->x_ = rhs;
+ return *this;
}
template<typename S, typename to_S, typename from_S>
-TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S>::operator S & ()
+TAO::Ret_Special_Basic_SArgument_T<S,to_S,from_S>::operator S () const
{
return this->x_;
}
diff --git a/TAO/tao/Special_Basic_Argument_T.h b/TAO/tao/Special_Basic_Argument_T.h
index 8e2626e8ac9..1f320a2c754 100644
--- a/TAO/tao/Special_Basic_Argument_T.h
+++ b/TAO/tao/Special_Basic_Argument_T.h
@@ -21,6 +21,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/Argument.h"
+#include "tao/DynamicC.h"
namespace TAO
{
@@ -91,15 +92,17 @@ namespace TAO
*
*/
template<typename S, typename to_S, typename from_S>
- class TAO_Export Ret_Special_Basic_Argument_T : public Stub_Retval
+ class TAO_Export Ret_Special_Basic_Argument_T : public Argument
{
public:
Ret_Special_Basic_Argument_T (void);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
+ virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (CORBA::Any *);
- operator S () const;
+ operator S ();
+ S retn (void);
private:
S x_;
@@ -178,16 +181,17 @@ namespace TAO
*
*/
template<typename S, typename to_S, typename from_S>
- class TAO_Export Ret_Special_Basic_SArgument_T : public Skel_Retval
+ class TAO_Export Ret_Special_Basic_SArgument_T : public Argument
{
public:
Ret_Special_Basic_SArgument_T (void);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
+ virtual CORBA::Boolean demarshal (TAO_InputCDR &);
virtual void add_to_interceptor (CORBA::Any *);
+ Ret_Special_Basic_SArgument_T<S,to_S,from_S> & operator= (S & rhs);
operator S () const;
- operator S & ();
private:
S x_;
diff --git a/TAO/tao/UB_String_Argument_T.cpp b/TAO/tao/UB_String_Argument_T.cpp
index f9f459b552b..6cb066d2b50 100644
--- a/TAO/tao/UB_String_Argument_T.cpp
+++ b/TAO/tao/UB_String_Argument_T.cpp
@@ -10,7 +10,7 @@ ACE_RCSID (tao,
"$Id$")
template<typename S>
-TAO::In_UB_String_Argument_T<S>::In_UB_String_Argument_T (S * const & x)
+TAO::In_UB_String_Argument_T<S>::In_UB_String_Argument_T (const S * x)
: x_ (x)
{}
@@ -22,18 +22,18 @@ TAO::In_UB_String_Argument_T<S>::marshal (TAO_OutputCDR & cdr)
}
template<typename S>
-CORBA::Boolean
-TAO::In_UB_String_Argument_T<S>::demarshal (TAO_InputCDR &)
+void
+TAO::In_UB_String_Argument_T<S>::interceptor_param (Dynamic::Parameter & p)
{
- return 1;
+ p.argument <<= this->x_;
+ p.mode = CORBA::PARAM_IN;
}
template<typename S>
-void
-TAO::In_UB_String_Argument_T<S>::add_to_interceptor (Dynamic::Parameter & p)
+CORBA::Boolean
+TAO::In_UB_String_Argument_T<S>::interceptor_replace (CORBA::Any & any)
{
- p.argument <<= this->x_;
- p.mode = CORBA::PARAM_IN;
+ return any >>= this->x_;
}
// ===========================================================
@@ -54,204 +54,217 @@ template<typename S>
CORBA::Boolean
TAO::Inout_UB_String_Argument_T<S>::demarshal (TAO_InputCDR & cdr)
{
+ CORBA::string_free (this->x_);
return cdr >> this->x_;
}
template<typename S>
void
-TAO::Inout_UB_String_Argument_T<S>::add_to_interceptor (Dynamic::Parameter & p)
+TAO::Inout_UB_String_Argument_T<S>::interceptor_param (Dynamic::Parameter & p)
{
p.argument <<= this->x_;
p.mode = CORBA::PARAM_INOUT;
}
-// ==============================================================
-
-template<typename S>
-TAO::Out_UB_String_Argument_T<S>::Out_UB_String_Argument_T (S *& x)
- : x_ (x)
-{}
-
template<typename S>
CORBA::Boolean
-TAO::Out_UB_String_Argument_T<S>::marshal (TAO_OutputCDR &)
+TAO::Inout_UB_String_Argument_T<S>::interceptor_replace (CORBA::Any & any)
{
- return 1;
+ return any >>= this->x_;
}
-template<typename S>
+// ==============================================================
+
+template<typename S, typename S_out>
+TAO::Out_UB_String_Argument_T<S,S_out>::Out_UB_String_Argument_T (S_out & x)
+ : x_ (x.ptr ())
+{}
+
+template<typename S, typename S_out>
CORBA::Boolean
-TAO::Out_UB_String_Argument_T<S>::demarshal (TAO_InputCDR & cdr)
+TAO::Out_UB_String_Argument_T<S,S_out>::demarshal (TAO_InputCDR & cdr)
{
return cdr >> this->x_;
}
-template<typename S>
-void
-TAO::Out_UB_String_Argument_T<S>::add_to_interceptor (Dynamic::Parameter &)
+// ============================================================
+
+template<typename S, typename S_var>
+TAO::Ret_UB_String_Argument_T<S,S_var>::Ret_UB_String_Argument_T (void)
{
}
-// ============================================================
+template<typename S, typename S_var>
+CORBA::Boolean
+TAO::Ret_UB_String_Argument_T<S,S_var>::demarshal (TAO_InputCDR & cdr)
+{
+ return cdr >> this->x_.out ();
+}
-template<typename S>
-TAO::Ret_UB_String_Argument_T<S>::Ret_UB_String_Argument_T (void)
+template<typename S, typename S_var>
+void
+TAO::Ret_UB_String_Argument_T<S,S_var>::interceptor_result (CORBA::Any * any)
{
+ (*any) <<= this->x_.in ();
}
-template<typename S>
+template<typename S, typename S_var>
CORBA::Boolean
-TAO::Ret_UB_String_Argument_T<S>::demarshal (TAO_InputCDR & cdr)
+TAO::Ret_UB_String_Argument_T<S,S_var>::interceptor_replace (CORBA::Any & any)
{
- return cdr >> this->x_;
+ return any >>= this->x_;
}
-template<typename S>
-void
-TAO::Ret_UB_String_Argument_T<S>::add_to_interceptor (CORBA::Any * any)
+template<typename S, typename S_var>
+S *
+TAO::Ret_UB_String_Argument_T<S,S_var>::excp (void)
{
- (*any) <<= this->x_;
+ return this->x_.ptr ();
}
-template<typename S>
-TAO::Ret_UB_String_Argument_T<S>::operator S * () const
+template<typename S, typename S_var>
+S *
+TAO::Ret_UB_String_Argument_T<S,S_var>::retn (void)
{
- return this->x_;
+ return this->x_._retn ();
}
// ============================================================
-template<typename S>
-TAO::In_UB_String_SArgument_T<S>::In_UB_String_SArgument_T (void)
+template<typename S, typename S_var>
+TAO::In_UB_String_SArgument_T<S,S_var>::In_UB_String_SArgument_T (void)
{}
-template<typename S>
+template<typename S, typename S_var>
CORBA::Boolean
-TAO::In_UB_String_SArgument_T<S>::marshal (TAO_OutputCDR &)
+TAO::In_UB_String_SArgument_T<S,S_var>::demarshal (TAO_InputCDR &cdr)
{
- return 1;
+ return cdr >> this->x_.out ();
}
-template<typename S>
-CORBA::Boolean
-TAO::In_UB_String_SArgument_T<S>::demarshal (TAO_InputCDR &cdr)
+template<typename S, typename S_var>
+void
+TAO::In_UB_String_SArgument_T<S,S_var>::interceptor_param (
+ Dynamic::Parameter & p
+ )
{
- return cdr >> this->x_;
+ p.argument <<= this->x_.in ();
+ p.mode = CORBA::PARAM_IN;
}
-template<typename S>
-void
-TAO::In_UB_String_SArgument_T<S>::add_to_interceptor (Dynamic::Parameter & p)
+template<typename S, typename S_var>
+CORBA::Boolean
+TAO::In_UB_String_SArgument_T<S,S_var>::interceptor_replace (CORBA::Any & any)
{
- p.argument <<= this->x_;
- p.mode = CORBA::PARAM_IN;
+ return any >>= this->x_.out ();
}
-template<typename S>
-TAO::In_UB_String_SArgument_T<S>::operator S * () const
+template<typename S, typename S_var>
+const S *
+TAO::In_UB_String_SArgument_T<S,S_var>::arg (void) const
{
- return this->x_;
+ return this->x_.in ();
}
// ===========================================================
-template<typename S>
-TAO::Inout_UB_String_SArgument_T<S>::Inout_UB_String_SArgument_T (void)
+template<typename S, typename S_var>
+TAO::Inout_UB_String_SArgument_T<S,S_var>::Inout_UB_String_SArgument_T (void)
{}
-template<typename S>
+template<typename S, typename S_var>
CORBA::Boolean
-TAO::Inout_UB_String_SArgument_T<S>::marshal (TAO_OutputCDR & cdr)
+TAO::Inout_UB_String_SArgument_T<S,S_var>::marshal (TAO_OutputCDR & cdr)
{
- return cdr << this->x_;
+ return cdr << this->x_.in ();
}
-template<typename S>
+template<typename S, typename S_var>
CORBA::Boolean
-TAO::Inout_UB_String_SArgument_T<S>::demarshal (TAO_InputCDR & cdr)
+TAO::Inout_UB_String_SArgument_T<S,S_var>::demarshal (TAO_InputCDR & cdr)
{
- return cdr >> this->x_;
+ return cdr >> this->x_.out ();
}
-template<typename S>
+template<typename S, typename S_var>
void
-TAO::Inout_UB_String_SArgument_T<S>::add_to_interceptor (
+TAO::Inout_UB_String_SArgument_T<S,S_var>::interceptor_param (
Dynamic::Parameter & p
)
{
- p.argument <<= this->x_;
+ p.argument <<= this->x_.in ();
p.mode = CORBA::PARAM_INOUT;
}
-template<typename S>
-TAO::Inout_UB_String_SArgument_T<S>::operator S *& ()
+template<typename S, typename S_var>
+CORBA::Boolean
+TAO::Inout_UB_String_SArgument_T<S,S_var>::interceptor_replace (CORBA::Any & any)
{
- return this->x_;
+ return any >>= this->x_.out ();
+}
+
+template<typename S, typename S_var>
+S *&
+TAO::Inout_UB_String_SArgument_T<S,S_var>::arg (void)
+{
+ return this->x_.inout ();
}
// ==============================================================
-template<typename S>
-TAO::Out_UB_String_SArgument_T<S>::Out_UB_String_SArgument_T (void)
+template<typename S, typename S_var, typename S_out>
+TAO::Out_UB_String_SArgument_T<S,S_var,S_out>::Out_UB_String_SArgument_T (
+ void
+ )
{}
-template<typename S>
-CORBA::Boolean
-TAO::Out_UB_String_SArgument_T<S>::marshal (TAO_OutputCDR &cdr)
-{
- return cdr << this->x_;
-}
-
-template<typename S>
+template<typename S, typename S_var, typename S_out>
CORBA::Boolean
-TAO::Out_UB_String_SArgument_T<S>::demarshal (TAO_InputCDR &)
-{
- return 1;
-}
-
-template<typename S>
-void
-TAO::Out_UB_String_SArgument_T<S>::add_to_interceptor (Dynamic::Parameter &)
+TAO::Out_UB_String_SArgument_T<S,S_var,S_out>::marshal (TAO_OutputCDR &cdr)
{
+ return cdr << this->x_.in ();
}
-template<typename S>
-TAO::Out_UB_String_SArgument_T<S>::operator S *& ()
+template<typename S, typename S_var, typename S_out>
+S_out
+TAO::Out_UB_String_SArgument_T<S,S_var,S_out>::arg (void)
{
- return this->x_;
+ return this->x_.out ();
}
// ============================================================
-template<typename S>
-TAO::Ret_UB_String_SArgument_T<S>::Ret_UB_String_SArgument_T (void)
+template<typename S, typename S_var>
+TAO::Ret_UB_String_SArgument_T<S,S_var>::Ret_UB_String_SArgument_T (void)
{
}
-template<typename S>
+template<typename S, typename S_var>
CORBA::Boolean
-TAO::Ret_UB_String_SArgument_T<S>::marshal (TAO_OutputCDR & cdr)
+TAO::Ret_UB_String_SArgument_T<S,S_var>::marshal (TAO_OutputCDR & cdr)
{
- return cdr << this->x_;
+ return cdr << this->x_.in ();
}
-template<typename S>
+template<typename S, typename S_var>
void
-TAO::Ret_UB_String_SArgument_T<S>::add_to_interceptor (CORBA::Any * any)
+TAO::Ret_UB_String_SArgument_T<S,S_var>::interceptor_result (CORBA::Any * any)
{
- (*any) <<= this->x_;
+ (*any) <<= this->x_.in ();
}
-template<typename S>
-TAO::Ret_UB_String_SArgument_T<S>::operator S * () const
+template<typename S, typename S_var>
+CORBA::Boolean
+TAO::Ret_UB_String_SArgument_T<S,S_var>::interceptor_replace (CORBA::Any & any)
{
- return this->x_;
+ return any >>= this->x_.out ();
}
-template<typename S>
-TAO::Ret_UB_String_SArgument_T<S>::operator S *& ()
+template<typename S, typename S_var>
+S *&
+TAO::Ret_UB_String_SArgument_T<S,S_var>::arg (void)
{
- return this->x_;
+ return this->x_.out ();
}
#endif /* TAO_UB_STRING_ARGUMENT_T_C */
diff --git a/TAO/tao/UB_String_Argument_T.h b/TAO/tao/UB_String_Argument_T.h
index 46865d8f7db..0c01187f8cc 100644
--- a/TAO/tao/UB_String_Argument_T.h
+++ b/TAO/tao/UB_String_Argument_T.h
@@ -34,14 +34,15 @@ namespace TAO
class In_UB_String_Argument_T : public Argument
{
public:
- In_UB_String_Argument_T (S * const & x);
+ In_UB_String_Argument_T (const S * x);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
- virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
+
+ virtual void interceptor_param (Dynamic::Parameter &);
+ virtual CORBA::Boolean interceptor_replace (CORBA::Any &);
private:
- S * const & x_;
+ const S * x_;
};
/**
@@ -58,7 +59,9 @@ namespace TAO
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
+
+ virtual void interceptor_param (Dynamic::Parameter &);
+ virtual CORBA::Boolean interceptor_replace (CORBA::Any &);
private:
mutable S *& x_;
@@ -70,15 +73,13 @@ namespace TAO
* @brief Template class for INOUT unbounded (w)string argument.
*
*/
- template<typename S>
+ template<typename S, typename S_out>
class Out_UB_String_Argument_T : public Argument
{
public:
- Out_UB_String_Argument_T (S *& x);
+ Out_UB_String_Argument_T (S_out & x);
- virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
private:
mutable S *& x_;
@@ -90,19 +91,22 @@ namespace TAO
* @brief Template class for return stub value of ub (w)string argument.
*
*/
- template<typename S>
- class Ret_UB_String_Argument_T : public Stub_Retval
+ template<typename S, typename S_var>
+ class Ret_UB_String_Argument_T : public Argument
{
public:
Ret_UB_String_Argument_T (void);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (CORBA::Any *);
- operator S * () const;
+ virtual void interceptor_result (CORBA::Any *);
+ virtual CORBA::Boolean interceptor_replace (CORBA::Any &);
+
+ S * excp (void);
+ S * retn (void);
private:
- S * x_;
+ S_var x_;
};
/**
@@ -111,20 +115,21 @@ namespace TAO
* @brief Template class for IN skeleton UB (w)string argument.
*
*/
- template<typename S>
+ template<typename S, typename S_var>
class In_UB_String_SArgument_T : public Argument
{
public:
In_UB_String_SArgument_T (void);
- virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
- operator S * () const;
+ virtual void interceptor_param (Dynamic::Parameter &);
+ virtual CORBA::Boolean interceptor_replace (CORBA::Any &);
+
+ const S * arg (void) const;
private:
- S * x_;
+ S_var x_;
};
/**
@@ -133,7 +138,7 @@ namespace TAO
* @brief Template class for INOUT skeleton UB (w)string argument.
*
*/
- template<typename S>
+ template<typename S, typename S_var>
class Inout_UB_String_SArgument_T : public Argument
{
public:
@@ -141,12 +146,14 @@ namespace TAO
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
- operator S *& ();
+ virtual void interceptor_param (Dynamic::Parameter &);
+ virtual CORBA::Boolean interceptor_replace (CORBA::Any &);
+
+ S *& arg (void);
private:
- S * x_;
+ S_var x_;
};
/**
@@ -155,20 +162,18 @@ namespace TAO
* @brief Template class for INOUT skeleton UB (w)string argument.
*
*/
- template<typename S>
+ template<typename S, typename S_var, typename S_out>
class Out_UB_String_SArgument_T : public Argument
{
public:
Out_UB_String_SArgument_T (void);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
- virtual CORBA::Boolean demarshal (TAO_InputCDR &);
- virtual void add_to_interceptor (Dynamic::Parameter &);
- operator S *& ();
+ S_out arg (void);
private:
- S * x_;
+ S_var x_;
};
/**
@@ -177,20 +182,21 @@ namespace TAO
* @brief Template class for return skeleton value of UB (w)string.
*
*/
- template<typename S>
- class Ret_UB_String_SArgument_T : public Skel_Retval
+ template<typename S, typename S_var>
+ class Ret_UB_String_SArgument_T : public Argument
{
public:
Ret_UB_String_SArgument_T (void);
virtual CORBA::Boolean marshal (TAO_OutputCDR &);
- virtual void add_to_interceptor (CORBA::Any *);
- operator S * () const;
- operator S *& ();
+ virtual void interceptor_result (CORBA::Any *);
+ virtual CORBA::Boolean interceptor_replace (CORBA::Any &);
+
+ S *& arg (void);
private:
- S * x_;
+ S_var x_;
};
/**
@@ -207,25 +213,25 @@ namespace TAO
* @brief Template class for argument traits of unbounded (w)strings.
*
*/
- template<typename T, typename T_out>
+ template<typename T, typename T_var, typename T_out>
struct UB_String_Arg_Traits_T
{
- typedef T * ret_type;
- typedef const T * in_type;
- typedef T *& inout_type;
- typedef T_out out_type;
-
- typedef In_UB_String_Argument_T<T> in_arg_val;
- typedef Inout_UB_String_Argument_T<T> inout_arg_val;
- typedef Out_UB_String_Argument_T<T> out_arg_val;
- typedef Ret_UB_String_Argument_T<T> stub_ret_val;
-
- typedef In_UB_String_SArgument_T<T> in_sarg_val;
- typedef Inout_UB_String_SArgument_T<T> inout_sarg_val;
- typedef Out_UB_String_SArgument_T<T> out_sarg_val;
- typedef Ret_UB_String_SArgument_T<T> skel_ret_val;
-
- typedef UB_String_Tag idl_tag;
+ typedef T * ret_type;
+ typedef const T * in_type;
+ typedef T *& inout_type;
+ typedef T_out out_type;
+
+ typedef In_UB_String_Argument_T<T> in_arg_val;
+ typedef Inout_UB_String_Argument_T<T> inout_arg_val;
+ typedef Out_UB_String_Argument_T<T,T_out> out_arg_val;
+ typedef Ret_UB_String_Argument_T<T,T_var> stub_ret_val;
+
+ typedef In_UB_String_SArgument_T<T,T_var> in_sarg_val;
+ typedef Inout_UB_String_SArgument_T<T,T_var> inout_sarg_val;
+ typedef Out_UB_String_SArgument_T<T,T_var,T_out> out_sarg_val;
+ typedef Ret_UB_String_SArgument_T<T,T_var> skel_ret_val;
+
+ typedef UB_String_Tag idl_tag;
};
};
diff --git a/TAO/tao/UB_String_Arguments.h b/TAO/tao/UB_String_Arguments.h
index d3c779e2e1b..76e8ec30129 100644
--- a/TAO/tao/UB_String_Arguments.h
+++ b/TAO/tao/UB_String_Arguments.h
@@ -33,13 +33,17 @@ namespace TAO
template<>
class Arg_Traits<ACE_InputCDR::to_string>
- : public UB_String_Arg_Traits_T<CORBA::Char, CORBA::String_out>
+ : public UB_String_Arg_Traits_T<CORBA::Char,
+ CORBA::String_var,
+ CORBA::String_out>
{
};
template<>
class Arg_Traits<ACE_InputCDR::to_wstring>
- : public UB_String_Arg_Traits_T<CORBA::WChar, CORBA::WString_out>
+ : public UB_String_Arg_Traits_T<CORBA::WChar,
+ CORBA::WString_var,
+ CORBA::WString_out>
{
};
};
diff --git a/TAO/tests/Bench/Bench.dsw b/TAO/tests/Bench/Bench.dsw
new file mode 100644
index 00000000000..61fc8d93761
--- /dev/null
+++ b/TAO/tests/Bench/Bench.dsw
@@ -0,0 +1,41 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "client"=.\wire\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "server"=.\wire\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/tests/Bench/wire/client.cpp b/TAO/tests/Bench/wire/client.cpp
new file mode 100644
index 00000000000..b4b3adf69c3
--- /dev/null
+++ b/TAO/tests/Bench/wire/client.cpp
@@ -0,0 +1,97 @@
+// $Id$
+
+#include "testC.h"
+#include "ace/Get_Opt.h"
+
+const char *ior_input_file = "file://test.ior";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior_input_file = get_opts.optarg;
+ break;
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-k <iorfile>",
+ argv [0]),
+ -1);
+ }
+
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::ORB_var orb = CORBA::ORB_init (argc,
+ argv,
+ ""
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (parse_args (argc, argv) != 0)
+ {
+ return 1;
+ }
+
+ CORBA::Object_var obj =
+ orb->string_to_object (ior_input_file
+ TAO_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (obj.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "string_to_object failed.\n"),
+ 1);
+ }
+
+ foo_var objref = foo::_narrow (obj.in ()
+ ACE_ENV_ARG_PARAMETER);
+
+ if (CORBA::is_nil (objref.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "_narrow failed.\n"),
+ 1);
+ }
+
+ const char * inarg = "in";
+ CORBA::String_var inoutarg = CORBA::string_dup ("old_inout");
+ CORBA::String_var outarg;
+
+ CORBA::String_var retval = objref->all_str (inarg,
+ inoutarg,
+ outarg.out ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ cout << "retval: " << retval.in () << endl;
+ cout << "inoutarg: " << inoutarg.in () << endl;
+ cout << "outarg: " << outarg.in () << endl;
+
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Client: exception caught - ");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/tests/Bench/wire/client.dsp b/TAO/tests/Bench/wire/client.dsp
new file mode 100644
index 00000000000..3dbda27d114
--- /dev/null
+++ b/TAO/tests/Bench/wire/client.dsp
@@ -0,0 +1,134 @@
+# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=client - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "client.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "client.mak" CFG="client - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "client - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\\" /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\ace" /libpath:"..\..\..\..\TAO\tao"
+
+!ELSEIF "$(CFG)" == "client - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\\" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\ace" /libpath:"..\..\..\..\TAO\tao" /libpath:"..\..\..\..\TAO\tao\DynamicInterface"
+
+!ENDIF
+
+# Begin Target
+
+# Name "client - Win32 Release"
+# Name "client - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp"
+# Begin Source File
+
+SOURCE=.\client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\testC.cpp
+# ADD CPP /GR
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h"
+# Begin Source File
+
+SOURCE=.\testC.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i inl"
+# Begin Source File
+
+SOURCE=.\testC.i
+# End Source File
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+# Begin Source File
+
+SOURCE=.\test.idl
+
+!IF "$(CFG)" == "client - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "client - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/tests/Bench/wire/server.cpp b/TAO/tests/Bench/wire/server.cpp
new file mode 100644
index 00000000000..934d9a3390d
--- /dev/null
+++ b/TAO/tests/Bench/wire/server.cpp
@@ -0,0 +1,129 @@
+// $Id$
+
+#include "test_i.h"
+#include "ace/Get_Opt.h"
+
+const char *ior_output_file = "test.ior";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "o:n:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'o':
+ ior_output_file = get_opts.optarg;
+ break;
+ case 'n':
+ break;
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-o <iorfile>"
+ "\n",
+ argv [0]),
+ -1);
+ }
+
+ // Indicates sucessful parsing of the command line
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::ORB_var orb = CORBA::ORB_init (argc,
+ argv,
+ ""
+ TAO_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::Object_var poa_object =
+ orb->resolve_initial_references ("RootPOA"
+ TAO_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (poa_object.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"),
+ 1);
+ }
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in ()
+ TAO_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (parse_args (argc, argv) != 0)
+ {
+ return 1;
+ }
+
+ foo_i servant;
+ foo_var server = servant._this (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::String_var ior =
+ orb->object_to_string (server.in ()
+ TAO_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Activated as <%s>\n",
+ ior.in ()));
+
+ // If the ior_output_file exists, output the ior to it
+ if (ior_output_file != 0)
+ {
+ FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+
+ if (output_file == 0)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Can't open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ }
+
+ ACE_OS::fprintf (output_file,
+ "%s",
+ ior.in ());
+ ACE_OS::fclose (output_file);
+ }
+
+ poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->run (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Destroy the POA, waiting until the destruction terminates
+ root_poa->destroy (1,
+ 1
+ TAO_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Server: exception caught - ");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/tests/Bench/wire/server.dsp b/TAO/tests/Bench/wire/server.dsp
new file mode 100644
index 00000000000..d02f3f348b8
--- /dev/null
+++ b/TAO/tests/Bench/wire/server.dsp
@@ -0,0 +1,148 @@
+# Microsoft Developer Studio Project File - Name="server" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=server - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak" CFG="server - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "server - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\\" /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 TAO_Portableserver.lib TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\ace" /libpath:"..\..\..\..\TAO\tao" /libpath:"..\..\..\..\TAO\tao\PortableServer"
+
+!ELSEIF "$(CFG)" == "server - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir ""
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\\" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 TAO_Valuetyped.lib TAO_IORInterceptord.lib TAO_ObjRefTemplated.lib TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\ace" /libpath:"..\..\..\..\TAO\tao" /libpath:"..\..\..\..\TAO\tao\PortableServer" /libpath:"..\..\..\..\TAO\tao\Valuetype" /libpath:"..\..\..\..\TAO\tao\IORInterceptor" /libpath:"..\..\..\..\TAO\tao\ObjRefTemplate"
+
+!ENDIF
+
+# Begin Target
+
+# Name "server - Win32 Release"
+# Name "server - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\server.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\test_i.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\testC.cpp
+# ADD CPP /GR
+# End Source File
+# Begin Source File
+
+SOURCE=.\testS.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\test_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testS.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i"
+# Begin Source File
+
+SOURCE=.\testC.i
+# End Source File
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+# Begin Source File
+
+SOURCE=.\test.idl
+
+!IF "$(CFG)" == "server - Win32 Release"
+
+!ELSEIF "$(CFG)" == "server - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/tests/Bench/wire/test.idl b/TAO/tests/Bench/wire/test.idl
new file mode 100644
index 00000000000..23126ac93f0
--- /dev/null
+++ b/TAO/tests/Bench/wire/test.idl
@@ -0,0 +1,10 @@
+
+// $Id$
+
+interface foo
+{
+ string all_str (in string inarg,
+ inout string inoutarg,
+ out string outarg);
+};
+
diff --git a/TAO/tests/Bench/wire/testC.cpp b/TAO/tests/Bench/wire/testC.cpp
new file mode 100644
index 00000000000..d1712cfeecb
--- /dev/null
+++ b/TAO/tests/Bench/wire/testC.cpp
@@ -0,0 +1,931 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:351
+
+
+#include "testC.h"
+#include "tao/Stub.h"
+#include "tao/Invocation.h"
+#include "tao/PortableInterceptor.h"
+
+#if TAO_HAS_INTERCEPTORS == 1
+#include "tao/RequestInfo_Util.h"
+#include "tao/ClientRequestInfo_i.h"
+#include "tao/ClientInterceptorAdapter.h"
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+#include "tao/UB_String_Arguments.h"
+
+#if defined (__BORLANDC__)
+#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
+#endif /* __BORLANDC__ */
+
+#if !defined (__ACE_INLINE__)
+#include "testC.i"
+#endif /* !defined INLINE */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_cs.cpp:63
+
+int foo::_tao_class_id = 0;
+
+foo_ptr
+tao_foo_life::tao_duplicate (
+ foo_ptr p
+ )
+{
+ return foo::_duplicate (p);
+}
+
+void
+tao_foo_life::tao_release (
+ foo_ptr p
+ )
+{
+ CORBA::release (p);
+}
+
+foo_ptr
+tao_foo_life::tao_nil (
+ void
+ )
+{
+ return foo::_nil ();
+}
+
+CORBA::Boolean
+tao_foo_life::tao_marshal (
+ foo_ptr p,
+ TAO_OutputCDR &cdr
+ )
+{
+ return p->marshal (cdr);
+}
+
+foo_ptr
+tao_foo_cast::tao_narrow (
+ CORBA::Object *p
+ ACE_ENV_ARG_DECL
+ )
+{
+ return foo::_narrow (p ACE_ENV_ARG_PARAMETER);
+}
+
+CORBA::Object *
+tao_foo_cast::tao_upcast (
+ void *src
+ )
+{
+ foo **tmp =
+ ACE_static_cast (foo **, src);
+ return *tmp;
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+ template class
+ TAO_Objref_Var_T<
+ foo,
+ tao_foo_life
+ >;
+ template class
+ TAO_Objref_Out_T<
+ foo,
+ tao_foo_life
+ >;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+# pragma instantiate \
+ TAO_Objref_Var_T< \
+ foo, \
+ tao_foo_life \
+ >
+# pragma instantiate \
+ TAO_Objref_Out_T< \
+ foo, \
+ tao_foo_life \
+ >
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interceptors_cs.cpp:56
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_cs.cpp:76
+
+class TAO_ClientRequestInfo_foo_all_str : public TAO_ClientRequestInfo_i
+{
+public:
+ TAO_ClientRequestInfo_foo_all_str (
+ TAO_GIOP_Invocation *_tao_invocation,
+ CORBA::Object_ptr _tao_target,
+ const char * inarg,
+ char *& inoutarg
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS);
+
+ virtual Dynamic::ParameterList * arguments (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual Dynamic::ExceptionList * exceptions (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Any * result (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void result (char * result);
+
+ private:
+ TAO_ClientRequestInfo_foo_all_str (const TAO_ClientRequestInfo_foo_all_str &);
+ void operator= (const TAO_ClientRequestInfo_foo_all_str &);
+ const char * inarg_;
+ char * inoutarg_;
+
+ char * _result;
+ };
+
+ // TAO_IDL - Generated from
+ // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_cs.cpp:376
+
+ TAO_ClientRequestInfo_foo_all_str::TAO_ClientRequestInfo_foo_all_str (
+ TAO_GIOP_Invocation *_tao_invocation,
+ CORBA::Object_ptr _tao_target,
+ const char * inarg,
+ char *& inoutarg
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ : TAO_ClientRequestInfo_i (_tao_invocation, _tao_target),
+ inarg_ (inarg),
+ inoutarg_ (inoutarg)
+{}
+
+Dynamic::ParameterList *
+TAO_ClientRequestInfo_foo_all_str::arguments (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the argument list on demand.
+ Dynamic::ParameterList *parameter_list =
+ TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ Dynamic::ParameterList_var safe_parameter_list = parameter_list;
+
+ parameter_list->length (2);
+ CORBA::ULong len = 0;
+ (*parameter_list)[len].argument <<= inarg_;
+ (*parameter_list)[len].mode = CORBA::PARAM_IN;
+ len++;
+
+ (*parameter_list)[len].argument <<= inoutarg_;
+ (*parameter_list)[len].mode = CORBA::PARAM_INOUT;
+ len++;
+
+ return safe_parameter_list._retn ();
+}
+
+Dynamic::ExceptionList *
+TAO_ClientRequestInfo_foo_all_str::exceptions (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the exception list on demand.
+ Dynamic::ExceptionList *exception_list =
+ TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return exception_list;
+}
+
+CORBA::Any *
+TAO_ClientRequestInfo_foo_all_str::result (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the result on demand.
+ CORBA::Boolean tk_void_any = 0;
+ CORBA::Any *result_any =
+ TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Any_var safe_result_any = result_any;
+
+ (*result_any) <<= this->_result;
+ return safe_result_any._retn ();
+}
+
+void
+TAO_ClientRequestInfo_foo_all_str::result (char * result)
+{
+ // Update the result.
+ this->_result = result;
+}
+
+#endif /* TAO_HAS_INTERCEPTORS */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/remote_proxy_impl_cs.cpp:31
+
+///////////////////////////////////////////////////////////////////////
+// Base & Remote Proxy Implementation.
+//
+
+_TAO_foo_Proxy_Impl::_TAO_foo_Proxy_Impl (void)
+{}
+
+_TAO_foo_Remote_Proxy_Impl::_TAO_foo_Remote_Proxy_Impl (void)
+{}
+
+// Remote Implementation of the IDL interface methods
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/remote_proxy_impl_cs.cpp:63
+
+char * _TAO_foo_Remote_Proxy_Impl::all_str (
+ CORBA::Object *_collocated_tao_target_,
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ TAO::Arg_Traits<ACE_InputCDR::to_string>::stub_ret_val _tao_retval;
+ TAO::Arg_Traits<ACE_InputCDR::to_string>::in_arg_val _tao_inarg (inarg);
+ TAO::Arg_Traits<ACE_InputCDR::to_string>::inout_arg_val _tao_inoutarg (inoutarg);
+ TAO::Arg_Traits<ACE_InputCDR::to_string>::out_arg_val _tao_outarg (outarg);
+
+ TAO::Argument *_tao_signature [] =
+ {
+ &_tao_retval,
+ &_tao_inarg,
+ &_tao_inoutarg,
+ &_tao_outarg
+ };
+
+ TAO_Stub *istub = _collocated_tao_target_->_stubobj ();
+
+ if (istub == 0)
+ {
+ ACE_THROW_RETURN (CORBA::INTERNAL (),_tao_retval.excp ());
+ }
+
+ TAO_GIOP_Twoway_Invocation _tao_call (
+ istub,
+ "all_str",
+ 7,
+ 2,
+ istub->orb_core ()
+ );
+
+ int _invoke_status;
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+ TAO_ClientRequestInterceptor_Adapter _tao_vfr (
+ istub->orb_core ()->client_request_interceptors (),
+ &_tao_call,
+ _invoke_status
+ );
+
+#endif /* TAO_HAS_INTERCEPTORS */
+
+ for (;;)
+ {
+ _invoke_status = TAO_INVOKE_EXCEPTION;
+
+#if TAO_HAS_INTERCEPTORS == 1
+ // @@@ (JP) This constructor will eventually take _tao_signature.
+ TAO_ClientRequestInfo_foo_all_str _tao_ri (
+ &_tao_call,
+ _collocated_tao_target_,
+ inarg,
+ inoutarg
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK_RETURN (_tao_retval.excp ());
+
+#endif /* TAO_HAS_INTERCEPTORS */
+
+ CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG;
+ TAO_INTERCEPTOR (_tao_ri.response_expected (1));
+
+#if TAO_HAS_INTERCEPTORS == 1
+
+ ACE_TRY
+ {
+ _tao_vfr.send_request (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ if (_invoke_status == TAO_INVOKE_RESTART)
+ {
+ _tao_call.restart_flag (1);
+ }
+ else
+ {
+
+#endif /* TAO_HAS_INTERCEPTORS */
+
+ _tao_call.start (ACE_ENV_SINGLE_ARG_PARAMETER);
+ TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ());
+
+ _tao_call.prepare_header (
+ ACE_static_cast (CORBA::Octet, _tao_response_flag)
+ ACE_ENV_ARG_PARAMETER
+ );
+ TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ());
+
+ TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
+
+ if (!(
+ (_tao_retval.marshal (_tao_out)) &&
+ (_tao_inarg.marshal (_tao_out)) &&
+ (_tao_inoutarg.marshal (_tao_out)) &&
+ (_tao_outarg.marshal (_tao_out))
+ ))
+ {
+ TAO_OutputCDR::throw_stub_exception (errno ACE_ENV_ARG_PARAMETER);
+ TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ());
+
+ }
+
+ _invoke_status =
+ _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
+ TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ());
+
+ if (_invoke_status == TAO_INVOKE_EXCEPTION)
+ {
+ TAO_INTERCEPTOR_THROW_RETURN (
+ CORBA::UNKNOWN (
+ CORBA::OMGVMCID | 1, CORBA::COMPLETED_YES
+ ),
+ _tao_retval.excp ()
+ );
+ }
+ else if (_invoke_status == TAO_INVOKE_RESTART)
+ {
+ _tao_call.restart_flag (1);
+ TAO_INTERCEPTOR (
+ _tao_ri.reply_status (_invoke_status);
+ _tao_vfr.receive_other (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+ )
+ }
+ else
+ {
+ TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
+ _tao_call.transport()->assign_translators (&_tao_in,0);
+
+ if (!(
+ (_tao_retval.demarshal (_tao_in)) &&
+ (_tao_inarg.demarshal (_tao_in)) &&
+ (_tao_inoutarg.demarshal (_tao_in)) &&
+ (_tao_outarg.demarshal (_tao_in))
+ ))
+ {
+ TAO_InputCDR::throw_stub_exception (errno ACE_ENV_ARG_PARAMETER);
+ TAO_INTERCEPTOR_CHECK_RETURN (_tao_retval.excp ());
+
+
+ }
+
+#if TAO_HAS_INTERCEPTORS == 1
+ // @@@ (JP) This call will eventually take _tao_signature[0].
+ char * _tao_retval_info = 0;
+ _tao_ri.result (_tao_retval_info);
+
+ _tao_ri.reply_status (_invoke_status);
+ _tao_vfr.receive_reply (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+#endif /* TAO_HAS_INTERCEPTORS */
+ }
+
+#if TAO_HAS_INTERCEPTORS == 1
+ }
+ }
+ ACE_CATCHANY
+ {
+ _tao_ri.exception (&ACE_ANY_EXCEPTION);
+ _tao_vfr.receive_exception (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ const PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION
+ || _tao_status == PortableInterceptor::USER_EXCEPTION)
+ {
+ ACE_RE_THROW;
+ }
+ }
+
+# if defined (ACE_HAS_EXCEPTIONS) \
+ && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS)
+ ACE_CATCHALL
+ {
+ CORBA::UNKNOWN ex;
+
+ _tao_ri.exception (&ex);
+ _tao_vfr.receive_exception (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ const PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION)
+ ACE_TRY_THROW (ex);
+ }
+# endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */
+
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (_tao_retval.excp ());
+
+ const PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (_tao_retval.excp ());
+
+ if (_tao_status != PortableInterceptor::LOCATION_FORWARD
+ && _tao_status != PortableInterceptor::TRANSPORT_RETRY)
+
+#endif /* TAO_HAS_INTERCEPTORS */
+
+ if (_invoke_status != TAO_INVOKE_RESTART)
+ break;
+ }
+
+return _tao_retval.retn ();
+}
+
+//
+// End Base & Remote Proxy Implemeentation.
+///////////////////////////////////////////////////////////////////////
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/remote_proxy_broker_cs.cpp:31
+
+///////////////////////////////////////////////////////////////////////
+// Remote & Base Proxy Broker Implementation
+//
+
+_TAO_foo_Proxy_Broker::_TAO_foo_Proxy_Broker (void)
+{
+}
+
+_TAO_foo_Proxy_Broker::~_TAO_foo_Proxy_Broker (void)
+{
+}
+
+_TAO_foo_Proxy_Broker * (*_TAO_foo_Proxy_Broker_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+
+// Factory Member function Implementation.
+_TAO_foo_Remote_Proxy_Broker *
+_TAO_foo_Remote_Proxy_Broker::the_TAO_foo_Remote_Proxy_Broker (void)
+{
+ static ::_TAO_foo_Remote_Proxy_Broker remote_proxy_broker;
+ return &remote_proxy_broker;
+}
+
+_TAO_foo_Remote_Proxy_Broker::_TAO_foo_Remote_Proxy_Broker (void)
+{
+}
+
+_TAO_foo_Remote_Proxy_Broker::~_TAO_foo_Remote_Proxy_Broker (void)
+{
+}
+
+_TAO_foo_Proxy_Impl&
+_TAO_foo_Remote_Proxy_Broker::select_proxy (
+ ::foo *
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ return this->remote_proxy_impl_;
+}
+
+//
+// End Remote & Base Proxy Broker Implementation
+///////////////////////////////////////////////////////////////////////
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_cs.cpp:245
+
+foo::foo (int collocated)
+{
+ this->foo_setup_collocation (collocated);
+}
+
+void
+foo::foo_setup_collocation (int collocated)
+{
+ if (collocated)
+ this->the_TAO_foo_Proxy_Broker_ =
+ ::_TAO_foo_Proxy_Broker_Factory_function_pointer (this);
+ else
+ this->the_TAO_foo_Proxy_Broker_ =
+ ::_TAO_foo_Remote_Proxy_Broker::the_TAO_foo_Remote_Proxy_Broker ();
+}
+
+foo::~foo (void)
+{}
+
+void
+foo::_tao_any_destructor (void *_tao_void_pointer)
+{
+ foo *tmp = ACE_static_cast (foo *, _tao_void_pointer);
+ CORBA::release (tmp);
+}
+
+foo_ptr
+foo::_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL
+ )
+{
+ if (CORBA::is_nil (obj))
+ {
+ return foo::_nil ();
+ }
+
+ if (! obj->_is_local ())
+ {
+ CORBA::Boolean is_a =
+ obj->_is_a (
+ "IDL:foo:1.0"
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK_RETURN (foo::_nil ());
+
+ if (is_a == 0)
+ {
+ return foo::_nil ();
+ }
+ }
+
+ return foo::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
+}
+
+foo_ptr
+foo::_unchecked_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ if (CORBA::is_nil (obj))
+ {
+ return foo::_nil ();
+ }
+
+ foo_ptr default_proxy = foo::_nil ();
+
+ // Code for lazily evaluated IOR's
+ if (!obj->is_evaluated ())
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::foo (
+ obj->steal_ior (),
+ obj->orb_core ()
+ ),
+ foo::_nil ()
+ );
+
+ return default_proxy;
+ }
+
+ if (! obj->_is_local ())
+ {
+ TAO_Stub* stub = obj->_stubobj ();
+
+ if (stub != 0)
+ {
+ stub->_incr_refcnt ();
+ }
+
+ if (
+ !CORBA::is_nil (stub->servant_orb_var ().ptr ()) &&
+ stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () &&
+ obj->_is_collocated () &&
+ _TAO_foo_Proxy_Broker_Factory_function_pointer != 0
+ )
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::foo (
+ stub,
+ 1,
+ obj->_servant ()
+ ),
+ foo::_nil ()
+ );
+ }
+
+ if (CORBA::is_nil (default_proxy))
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::foo (
+ stub,
+ 0,
+ obj->_servant ()
+ ),
+ foo::_nil ()
+ );
+ }
+
+ return default_proxy;
+ }
+ else
+ return
+ ACE_reinterpret_cast (
+ foo_ptr,
+ obj->_tao_QueryInterface (
+ ACE_reinterpret_cast (
+ ptrdiff_t,
+ &foo::_tao_class_id
+ )
+ )
+ );
+}
+
+foo_ptr
+foo::_duplicate (foo_ptr obj)
+{
+ if (! CORBA::is_nil (obj))
+ {
+ obj->_add_ref ();
+ }
+
+ return obj;
+}
+
+CORBA::Boolean
+foo::_is_a (
+ const char *value
+ ACE_ENV_ARG_DECL
+ )
+{
+ if (
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:foo:1.0"
+ ) ||
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:omg.org/CORBA/Object:1.0"
+ )
+ )
+ {
+ return 1; // success using local knowledge
+ }
+ else
+ {
+ return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (
+ value
+ ACE_ENV_ARG_PARAMETER
+ );
+ }
+}
+
+void *foo::_tao_QueryInterface (ptrdiff_t type)
+{
+ void *retv = 0;
+
+ if (type == ACE_reinterpret_cast (
+ ptrdiff_t,
+ &foo::_tao_class_id)
+ )
+ {
+ retv = ACE_reinterpret_cast (void*, this);
+ }
+ else if (type == ACE_reinterpret_cast (
+ ptrdiff_t,
+ &CORBA::Object::_tao_class_id)
+ )
+ {
+ retv =
+ ACE_reinterpret_cast (
+ void *,
+ ACE_static_cast (CORBA::Object_ptr, this)
+ );
+ }
+
+ if (retv != 0)
+ {
+ this->_add_ref ();
+ }
+
+ return retv;
+}
+
+const char* foo::_interface_repository_id (void) const
+{
+ return "IDL:foo:1.0";
+}
+
+CORBA::Boolean
+foo::marshal (TAO_OutputCDR &cdr)
+{
+ return (cdr << this);
+}
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_cs.cpp:80
+
+char * foo::all_str (
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ if (!this->is_evaluated ())
+ {
+ ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
+
+ }
+ if (this->the_TAO_foo_Proxy_Broker_ == 0)
+ {
+ foo_setup_collocation (
+ this->ACE_NESTED_CLASS (CORBA, Object)::_is_collocated ()
+ );
+ }
+
+ _TAO_foo_Proxy_Impl &proxy =
+ this->the_TAO_foo_Proxy_Broker_->select_proxy (this ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return proxy.all_str (
+ this,
+ inarg,
+ inoutarg,
+ outarg
+ ACE_ENV_ARG_PARAMETER
+ );
+}
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_defn.cpp:284
+
+static const CORBA::Long _oc_foo[] =
+{
+ TAO_ENCAP_BYTE_ORDER, // byte order
+ 12,
+ ACE_NTOHL (0x49444c3a),
+ ACE_NTOHL (0x666f6f3a),
+ ACE_NTOHL (0x312e3000), // repository ID = IDL:foo:1.0
+ 4,
+ ACE_NTOHL (0x666f6f00), // name = foo
+ };
+
+static CORBA::TypeCode _tc_TAO_tc_foo (
+ CORBA::tk_objref,
+ sizeof (_oc_foo),
+ (char *) &_oc_foo,
+ 0,
+ sizeof (foo)
+ );
+
+::CORBA::TypeCode_ptr _tc_foo =
+ &_tc_TAO_tc_foo;
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/any_op_cs.cpp:50
+
+// Copying insertion.
+void
+operator<<= (
+ CORBA::Any &_tao_any,
+ foo_ptr _tao_elem
+ )
+{
+ foo_ptr _tao_objptr =
+ foo::_duplicate (_tao_elem);
+ _tao_any <<= &_tao_objptr;
+}
+
+// Non-copying insertion.
+void
+operator<<= (
+ CORBA::Any &_tao_any,
+ foo_ptr *_tao_elem
+ )
+{
+ TAO::Any_Impl_T<foo>::insert (
+ _tao_any,
+ foo::_tao_any_destructor,
+ _tc_foo,
+ *_tao_elem
+ );
+}
+
+CORBA::Boolean
+operator>>= (
+ const CORBA::Any &_tao_any,
+ foo_ptr &_tao_elem
+ )
+{
+ return
+ TAO::Any_Impl_T<foo>::extract (
+ _tao_any,
+ foo::_tao_any_destructor,
+ _tc_foo,
+ _tao_elem
+ );
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO::Any_Impl_T<foo>;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+# pragma instantiate TAO::Any_Impl_T<foo>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/cdr_op_cs.cpp:63
+
+CORBA::Boolean operator<< (
+ TAO_OutputCDR &strm,
+ const foo_ptr _tao_objref
+ )
+{
+ CORBA::Object_ptr _tao_corba_obj = _tao_objref;
+ return (strm << _tao_corba_obj);
+}
+
+CORBA::Boolean operator>> (
+ TAO_InputCDR &strm,
+ foo_ptr &_tao_objref
+ )
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::Object_var obj;
+
+ if ((strm >> obj.inout ()) == 0)
+ {
+ return 0;
+ }
+
+ // Narrow to the right type.
+ _tao_objref =
+ foo::_unchecked_narrow (
+ obj.in ()
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+ return 1;
+ }
+ ACE_CATCHANY
+ {
+ // do nothing
+ }
+ ACE_ENDTRY;
+ return 0;
+}
+
diff --git a/TAO/tests/Bench/wire/testC.h b/TAO/tests/Bench/wire/testC.h
new file mode 100644
index 00000000000..ab33728b64c
--- /dev/null
+++ b/TAO/tests/Bench/wire/testC.h
@@ -0,0 +1,403 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:151
+
+#ifndef _TAO_IDL_TESTC_H_
+#define _TAO_IDL_TESTC_H_
+
+
+#include "tao/corba.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+
+#if defined (TAO_EXPORT_MACRO)
+#undef TAO_EXPORT_MACRO
+#endif
+#define TAO_EXPORT_MACRO
+
+#if defined (TAO_EXPORT_NESTED_CLASSES)
+# if defined (TAO_EXPORT_NESTED_MACRO)
+# undef TAO_EXPORT_NESTED_MACRO
+# endif /* defined (TAO_EXPORT_NESTED_MACRO) */
+# define TAO_EXPORT_NESTED_MACRO
+#endif /* TAO_EXPORT_NESTED_CLASSES */
+
+#if defined(_MSC_VER)
+#if (_MSC_VER >= 1200)
+#pragma warning(push)
+#endif /* _MSC_VER >= 1200 */
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option push -w-rvl -w-rch -w-ccc -w-inl
+#endif /* __BORLANDC__ */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_interface.cpp:577
+
+#if !defined (_FOO__ODDS_N_ENDS_CH_)
+#define _FOO__ODDS_N_ENDS_CH_
+
+class foo;
+typedef foo *foo_ptr;
+struct tao_foo_life;
+
+typedef
+ TAO_Objref_Var_T<
+ foo,
+ tao_foo_life
+ >
+ foo_var;
+
+typedef
+ TAO_Objref_Out_T<
+ foo,
+ tao_foo_life
+ >
+ foo_out;
+
+struct tao_foo_life
+{
+ static foo_ptr tao_duplicate (foo_ptr);
+ static void tao_release (foo_ptr);
+ static foo_ptr tao_nil (void);
+ static CORBA::Boolean tao_marshal (
+ foo_ptr,
+ TAO_OutputCDR &
+ );
+};
+
+struct tao_foo_cast
+{
+ static foo_ptr tao_narrow (
+ CORBA::Object_ptr
+ ACE_ENV_ARG_DECL
+ );
+ static CORBA::Object_ptr tao_upcast (void *);
+};
+
+#endif /* end #if !defined */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ch.cpp:53
+
+#if !defined (_FOO_CH_)
+#define _FOO_CH_
+
+class _TAO_foo_Proxy_Impl;
+class _TAO_foo_Remote_Proxy_Impl;
+class _TAO_foo_Proxy_Broker;
+class _TAO_foo_Remote_Proxy_Broker;
+
+class foo
+ : public virtual CORBA::Object
+{
+public:
+ typedef foo_ptr _ptr_type;
+ typedef foo_var _var_type;
+ static int _tao_class_id;
+
+ // The static operations.
+ static foo_ptr _duplicate (foo_ptr obj);
+
+ static foo_ptr _narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ static foo_ptr _unchecked_narrow (
+ CORBA::Object_ptr obj
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ static foo_ptr _nil (void)
+ {
+ return (foo_ptr)0;
+ }
+
+ static void _tao_any_destructor (void *);
+
+ // TAO_IDL - Generated from
+ // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ch.cpp:46
+
+ virtual char * all_str (
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+
+ // TAO_IDL - Generated from
+ // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ch.cpp:210
+
+ virtual CORBA::Boolean _is_a (
+ const char *type_id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual void *_tao_QueryInterface (ptrdiff_t type);
+
+ virtual const char* _interface_repository_id (void) const;
+ virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr);
+private:
+ _TAO_foo_Proxy_Broker *the_TAO_foo_Proxy_Broker_;
+
+protected:
+ foo (int collocated = 0);
+
+ // These methods travese the inheritance tree and set the
+ // parents piece of the given class in the right mode.
+ virtual void foo_setup_collocation (int collocated);
+
+ foo (IOP::IOR *ior,
+ TAO_ORB_Core *orb_core = 0);
+
+ foo (
+ TAO_Stub *objref,
+ CORBA::Boolean _tao_collocated = 0,
+ TAO_Abstract_ServantBase *servant = 0,
+ TAO_ORB_Core *orb_core = 0
+ );
+ virtual ~foo (void);
+
+ friend class _TAO_foo_Remote_Proxy_Impl;
+ friend class _TAO_foo_ThruPOA_Proxy_Impl;
+ friend class _TAO_foo_Direct_Proxy_Impl;
+
+private:
+ foo (const foo &);
+ void operator= (const foo &);
+};
+
+// The Proxy Implementations are used by each interface to
+// perform a call. Each different implementation encapsulates
+// an invocation logic.
+
+
+///////////////////////////////////////////////////////////////////////
+// Base Proxy Impl. Declaration
+//
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/base_proxy_impl_ch.cpp:35
+
+class _TAO_foo_Proxy_Impl
+ : public virtual TAO_Object_Proxy_Impl
+{
+public:
+ virtual ~_TAO_foo_Proxy_Impl (void) {}
+
+ // TAO_IDL - Generated from
+ // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/base_proxy_impl_ch.cpp:24
+
+ virtual char * all_str (
+ CORBA::Object *_collocated_tao_target_,
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ )) = 0;
+
+protected:
+ _TAO_foo_Proxy_Impl (void);
+};
+
+//
+// End Base Proxy Impl. Declaration
+///////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////
+// Remote Proxy Impl. Declaration
+//
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/remote_proxy_impl_ch.cpp:37
+
+class _TAO_foo_Remote_Proxy_Impl
+ : public virtual _TAO_foo_Proxy_Impl,
+ public virtual TAO_Remote_Object_Proxy_Impl
+{
+public:
+ _TAO_foo_Remote_Proxy_Impl (void);
+
+ virtual ~_TAO_foo_Remote_Proxy_Impl (void) {}
+
+ // TAO_IDL - Generated from
+ // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/proxy_impl_xh.cpp:24
+
+ virtual char * all_str (
+ CORBA::Object *_collocated_tao_target_,
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+};
+
+//
+// End Remote Proxy Impl. Declaration
+///////////////////////////////////////////////////////////////////////
+
+// The Proxy Brokers are used by each interface to get
+// the right proxy for performing a call. In the new
+// collocation scheme, the proxy to be used can vary on
+// a call by call basis.
+
+///////////////////////////////////////////////////////////////////////
+// Base Proxy Broker Declaration
+//
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/base_proxy_broker_ch.cpp:35
+
+class _TAO_foo_Proxy_Broker
+{
+public:
+ virtual ~_TAO_foo_Proxy_Broker (void);
+ virtual _TAO_foo_Proxy_Impl &select_proxy (
+ foo *object
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ ) = 0;
+
+protected:
+ _TAO_foo_Proxy_Broker (void);
+
+};
+
+//
+// End Base Proxy Broker Declaration
+///////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////
+// Remote Proxy Broker Declaration
+//
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/remote_proxy_broker_ch.cpp:40
+
+class _TAO_foo_Remote_Proxy_Broker
+ : public virtual _TAO_foo_Proxy_Broker
+{
+public:
+ _TAO_foo_Remote_Proxy_Broker (void);
+
+ virtual ~_TAO_foo_Remote_Proxy_Broker (void);
+
+ virtual _TAO_foo_Proxy_Impl &select_proxy (
+ foo *object
+ ACE_ENV_ARG_DECL
+ );
+
+private:
+ _TAO_foo_Remote_Proxy_Impl remote_proxy_impl_;
+
+public:
+ // This member function is used to get an handle to the unique instance
+ // of the Remote Proxy Broker that is available for a given
+ // interface.
+ static _TAO_foo_Remote_Proxy_Broker *the_TAO_foo_Remote_Proxy_Broker (void);
+};
+
+//
+// End Remote Proxy Broker Declaration
+///////////////////////////////////////////////////////////////////////
+
+#endif /* end #if !defined */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_decl.cpp:44
+
+extern ::CORBA::TypeCode_ptr _tc_foo;
+
+// Proxy Broker Factory function pointer declarations.
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_root/root.cpp:76
+
+extern
+_TAO_foo_Proxy_Broker *
+(*_TAO_foo_Proxy_Broker_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ );
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/any_op_ch.cpp:52
+
+ void operator<<= (CORBA::Any &, foo_ptr); // copying
+ void operator<<= (CORBA::Any &, foo_ptr *); // non-copying
+ CORBA::Boolean operator>>= (const CORBA::Any &, foo_ptr &);
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_root/cdr_op.cpp:48
+
+#ifndef __ACE_INLINE__
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/cdr_op_ch.cpp:55
+
+ CORBA::Boolean operator<< (TAO_OutputCDR &, const foo_ptr );
+ CORBA::Boolean operator>> (TAO_InputCDR &, foo_ptr &);
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_root/cdr_op.cpp:64
+
+#endif /* __ACE_INLINE__ */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:1055
+
+#if defined (__ACE_INLINE__)
+#include "testC.i"
+#endif /* defined INLINE */
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option pop
+#endif /* __BORLANDC__ */
+
+#endif /* ifndef */
+
diff --git a/TAO/tests/Bench/wire/testC.i b/TAO/tests/Bench/wire/testC.i
new file mode 100644
index 00000000000..534c5a79ae1
--- /dev/null
+++ b/TAO/tests/Bench/wire/testC.i
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ci.cpp:63
+
+#if !defined (_FOO___CI_)
+#define _FOO___CI_
+
+ACE_INLINE
+foo::foo (
+ TAO_Stub *objref,
+ CORBA::Boolean _tao_collocated,
+ TAO_Abstract_ServantBase *servant,
+ TAO_ORB_Core *oc
+ )
+ : ACE_NESTED_CLASS (CORBA, Object) (objref, _tao_collocated, servant, oc),
+ the_TAO_foo_Proxy_Broker_ (0)
+
+{
+ this->foo_setup_collocation (_tao_collocated);
+}
+
+template<>
+ACE_INLINE
+CORBA::Boolean
+TAO::Any_Impl_T<foo>::to_object (
+ CORBA::Object_ptr &_tao_elem
+ ) const
+{
+ _tao_elem = CORBA::Object::_duplicate (this->value_);
+ return 1;
+}
+
+ACE_INLINE
+foo::foo (
+ IOP::IOR *ior,
+ TAO_ORB_Core *oc
+ )
+ : ACE_NESTED_CLASS (CORBA, Object) (ior, oc),
+ the_TAO_foo_Proxy_Broker_ (0)
+
+{
+}
+
+#endif /* end #if !defined */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/cdr_op_ci.cpp:72
+
+ CORBA::Boolean operator<< (
+ TAO_OutputCDR &,
+ const foo_ptr
+ );
+
+ CORBA::Boolean operator>> (
+ TAO_InputCDR &,
+ foo_ptr &
+ );
+
diff --git a/TAO/tests/Bench/wire/testS.cpp b/TAO/tests/Bench/wire/testS.cpp
new file mode 100644
index 00000000000..9270e1e3e93
--- /dev/null
+++ b/TAO/tests/Bench/wire/testS.cpp
@@ -0,0 +1,925 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:714
+
+#ifndef _TAO_IDL_TESTS_CPP_
+#define _TAO_IDL_TESTS_CPP_
+
+
+#include "testS.h"
+#include "tao/PortableServer/Object_Adapter.h"
+#include "tao/PortableServer/Operation_Table.h"
+#include "tao/TAO_Server_Request.h"
+#include "tao/ORB_Core.h"
+#include "tao/Profile.h"
+#include "tao/Stub.h"
+#include "tao/IFR_Client_Adapter.h"
+#include "tao/PortableInterceptor.h"
+#if TAO_HAS_INTERCEPTORS == 1
+#include "tao/RequestInfo_Util.h"
+#include "tao/PICurrent.h"
+#include "tao/PortableServer/ServerRequestInfo.h"
+#include "tao/PortableServer/ServerInterceptorAdapter.h"
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
+
+#include "ace/Dynamic_Service.h"
+#include "tao/UB_String_ARguments.h"
+
+#if defined (__BORLANDC__)
+#pragma option -w-rvl -w-rch -w-ccc -w-aus
+#endif /* __BORLANDC__ */
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_interface.cpp:1241
+
+class TAO_foo_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable
+{
+private:
+ unsigned int hash (const char *str, unsigned int len);
+public:
+ const TAO_operation_db_entry * lookup (const char *str, unsigned int len);
+};
+
+/* C++ code produced by gperf version 2.8 (ACE version) */
+/* Command-line: gperf -m -M -J -c -C -D -E -T -f 0 -F 0 -a -o -t -p -K opname_ -L C++ -Z TAO_foo_Perfect_Hash_OpTable -N lookup */
+unsigned int
+TAO_foo_Perfect_Hash_OpTable::hash (const char *str, unsigned int len)
+{
+ static const unsigned char asso_values[] =
+ {
+#if defined (ACE_MVS)
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 0,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 0,
+ 16, 16, 16, 5, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 0, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 0, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16,
+#else
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 0, 16, 0, 16, 16,
+ 16, 5, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 0, 16, 0, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+#endif /* ACE_MVS */
+ };
+ return len + asso_values[str[len - 1]] + asso_values[str[0]];
+}
+
+const class TAO_operation_db_entry *
+TAO_foo_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len)
+{
+ enum
+ {
+ TOTAL_KEYWORDS = 5,
+ MIN_WORD_LENGTH = 5,
+ MAX_WORD_LENGTH = 13,
+ MIN_HASH_VALUE = 5,
+ MAX_HASH_VALUE = 15,
+ HASH_VALUE_RANGE = 11,
+ DUPLICATES = 0,
+ WORDLIST_SIZE = 10
+ };
+
+ static const class TAO_operation_db_entry wordlist[] =
+ {
+ {"",0},{"",0},{"",0},{"",0},{"",0},
+ {"_is_a", &POA_foo::_is_a_skel},
+ {"",0},
+ {"all_str", &POA_foo::all_str_skel},
+ {"",0},{"",0},
+ {"_component", &POA_foo::_component_skel},
+ {"",0},{"",0},
+ {"_non_existent", &POA_foo::_non_existent_skel},
+ {"",0},
+ {"_interface", &POA_foo::_interface_skel},
+ };
+
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+ unsigned int key = hash (str, len);
+
+ if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
+ {
+ const char *s = wordlist[key].opname_;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
+ return &wordlist[key];
+ }
+ }
+ return 0;
+}
+static TAO_foo_Perfect_Hash_OpTable tao_foo_optable;
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interceptors_ss.cpp:52
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_ss.cpp:74
+
+class TAO_ServerRequestInfo_foo_all_str : public TAO_ServerRequestInfo
+{
+public:
+ TAO_ServerRequestInfo_foo_all_str (
+ TAO_ServerRequest &_tao_server_request,
+ TAO_Object_Adapter::Servant_Upcall *tao_servant_upcall,
+ POA_foo *tao_impl,
+ const char * inarg,
+ char *& inoutarg
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual Dynamic::ParameterList * arguments (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual Dynamic::ExceptionList * exceptions (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Any * result (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual char * target_most_derived_interface (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Boolean target_is_a (
+ const char * id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void result (char * result);
+
+private:
+ TAO_ServerRequestInfo_foo_all_str (
+ const TAO_ServerRequestInfo_foo_all_str &
+ );
+
+ void operator= (
+ const TAO_ServerRequestInfo_foo_all_str &
+ );
+
+private:
+ POA_foo *_tao_impl;
+
+ const char * inarg_;
+ char *& inoutarg_;
+ char * _result;
+};
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/interceptors_ss.cpp:438
+
+TAO_ServerRequestInfo_foo_all_str::TAO_ServerRequestInfo_foo_all_str (
+ TAO_ServerRequest &_tao_server_request,
+ TAO_Object_Adapter::Servant_Upcall *_tao_servant_upcall,
+ POA_foo *tao_impl,
+ const char * inarg,
+ char *& inoutarg
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+ : TAO_ServerRequestInfo (_tao_server_request, _tao_servant_upcall),
+ _tao_impl (tao_impl),
+ inarg_ (inarg),
+ inoutarg_ (inoutarg)
+{}
+
+Dynamic::ParameterList *
+TAO_ServerRequestInfo_foo_all_str::arguments (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the argument list on demand.
+ Dynamic::ParameterList *parameter_list =
+ TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ Dynamic::ParameterList_var safe_parameter_list = parameter_list;
+ parameter_list->length (2);
+ CORBA::ULong len = 0;
+
+ (*parameter_list)[len].argument <<= inarg_;
+ (*parameter_list)[len].mode = CORBA::PARAM_IN;
+ len++;
+
+ (*parameter_list)[len].argument <<= inoutarg_;
+ (*parameter_list)[len].mode = CORBA::PARAM_INOUT;
+ len++;
+
+ return safe_parameter_list._retn ();
+}
+
+Dynamic::ExceptionList *
+TAO_ServerRequestInfo_foo_all_str::exceptions (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the exception list on demand.
+ Dynamic::ExceptionList *exception_list =
+ TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return exception_list;
+}
+
+CORBA::Any *
+TAO_ServerRequestInfo_foo_all_str::result (
+ ACE_ENV_SINGLE_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ // Generate the result on demand.
+ CORBA::Boolean tk_void_any = 0;
+ CORBA::Any *result_any =
+ TAO_RequestInfo_Util::make_any (tk_void_any ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ CORBA::Any_var safe_result_any = result_any;
+
+ (*result_any) <<= this->_result;
+
+ return safe_result_any._retn ();
+}
+
+char *
+TAO_ServerRequestInfo_foo_all_str::target_most_derived_interface (
+ ACE_ENV_SINGLE_ARG_DECL_NOT_USED
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return
+ CORBA::string_dup (this->_tao_impl->_interface_repository_id ());
+}
+
+CORBA::Boolean
+TAO_ServerRequestInfo_foo_all_str::target_is_a (
+ const char * id
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ return this->_tao_impl->_is_a (id ACE_ENV_ARG_PARAMETER);
+}
+
+void
+TAO_ServerRequestInfo_foo_all_str::result (char * result)
+{
+ // Update the result.
+ this->_result = result;
+}
+
+#endif /* TAO_HAS_INTERCEPTORS */
+
+///////////////////////////////////////////////////////////////////////
+// Strategized Proxy Broker Implementation
+//
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/strategized_proxy_broker_ss.cpp:40
+
+// Factory function Implementation.
+_TAO_foo_Strategized_Proxy_Broker *_TAO_foo_Strategized_Proxy_Broker::the_TAO_foo_Strategized_Proxy_Broker (void)
+{
+ static _TAO_foo_Strategized_Proxy_Broker strategized_proxy_broker;
+ return &strategized_proxy_broker;
+}
+
+_TAO_foo_Strategized_Proxy_Broker::_TAO_foo_Strategized_Proxy_Broker (void)
+{
+ for (int i = 0; i < TAO_Collocation_Strategies::CS_LAST; ++i)
+ {
+ this->proxy_cache_[i] = 0;
+ }
+}
+
+_TAO_foo_Strategized_Proxy_Broker::~_TAO_foo_Strategized_Proxy_Broker (void)
+{
+ for (int i = 0; i < TAO_Collocation_Strategies::CS_LAST; ++i)
+ {
+ delete this->proxy_cache_[i];
+
+ // Hack to prevent bug mentioned in 1204. Refer to 1204
+ // for details..
+ this->proxy_cache_[i] = 0;
+ }
+}
+
+_TAO_foo_Proxy_Impl&
+_TAO_foo_Strategized_Proxy_Broker::select_proxy (
+ ::foo *object
+ ACE_ENV_ARG_DECL
+ )
+{
+ int strategy =
+ TAO_ORB_Core::collocation_strategy (object ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (*this->proxy_cache_[strategy]);
+
+ if (this->proxy_cache_[strategy] != 0)
+ {
+ return *this->proxy_cache_[strategy];
+ }
+
+ this->create_proxy (strategy ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (*this->proxy_cache_[strategy]);
+
+ return *this->proxy_cache_[strategy];
+}
+
+void
+_TAO_foo_Strategized_Proxy_Broker::create_proxy (
+ int strategy
+ ACE_ENV_ARG_DECL
+ )
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->mutex_);
+
+ if (this->proxy_cache_[strategy] == 0)
+ {
+ switch (strategy)
+ {
+ case TAO_Collocation_Strategies::CS_THRU_POA_STRATEGY:
+ ACE_NEW_THROW_EX (
+ this->proxy_cache_[strategy],
+ _TAO_foo_ThruPOA_Proxy_Impl,
+ CORBA::NO_MEMORY ()
+ );
+ ACE_CHECK;
+ break;
+
+ case TAO_Collocation_Strategies::CS_REMOTE_STRATEGY:
+ default:
+ ACE_NEW_THROW_EX (
+ this->proxy_cache_[strategy],
+ ::_TAO_foo_Remote_Proxy_Impl,
+ CORBA::NO_MEMORY ()
+ );
+ ACE_CHECK;
+ break;
+ }
+ }
+}
+
+//
+// End Strategized Proxy Broker Implementation
+///////////////////////////////////////////////////////////////////////
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:597
+
+_TAO_foo_Proxy_Broker *
+_TAO_foo_Proxy_Broker_Factory_function (CORBA::Object_ptr obj)
+{
+ ACE_UNUSED_ARG (obj);
+ return ::_TAO_foo_Strategized_Proxy_Broker::the_TAO_foo_Strategized_Proxy_Broker();
+}
+
+int
+_TAO_foo_Proxy_Broker_Factory_Initializer (size_t)
+{
+ _TAO_foo_Proxy_Broker_Factory_function_pointer =
+ _TAO_foo_Proxy_Broker_Factory_function;
+
+ return 0;
+}
+
+static int _TAO_foo_Proxy_Broker_Stub_Factory_Initializer_Scarecrow =
+ _TAO_foo_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, _TAO_foo_Proxy_Broker_Factory_Initializer));
+
+
+///////////////////////////////////////////////////////////////////////
+// ThruPOA Proxy Implementation
+//
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/thru_poa_proxy_impl_ss.cpp:37
+
+_TAO_foo_ThruPOA_Proxy_Impl::_TAO_foo_ThruPOA_Proxy_Impl (void)
+{}
+
+// ThruPOA Implementation of the IDL interface methods
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/thru_poa_proxy_impl_ss.cpp:67
+
+char * _TAO_foo_ThruPOA_Proxy_Impl::all_str (
+ CORBA::Object *_collocated_tao_target_,
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ CORBA::String_var _tao_retval;
+ ACE_UNUSED_ARG (_tao_retval);
+ TAO_Object_Adapter::Servant_Upcall servant_upcall (
+ _collocated_tao_target_->_stubobj ()->servant_orb_var ()->orb_core ()
+ );
+ CORBA::Object_var forward_to;
+ servant_upcall.prepare_for_upcall (
+ _collocated_tao_target_->_stubobj ()->object_key (),
+ "all_str",
+ forward_to.out ()
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_CHECK_RETURN (_tao_retval._retn ());
+
+ servant_upcall.pre_invoke_collocated_request (
+ ACE_ENV_SINGLE_ARG_PARAMETER
+ );
+ ACE_CHECK_RETURN (_tao_retval._retn ());
+
+ return ACE_reinterpret_cast (
+ POA_foo_ptr,
+ servant_upcall.servant ()->_downcast (
+ "IDL:foo:1.0"
+ )
+ )->all_str (
+
+ inarg,
+ inoutarg,
+ outarg
+ ACE_ENV_ARG_PARAMETER
+ );
+}//
+// End ThruPOA Proxy Implementation
+///////////////////////////////////////////////////////////////////////
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:98
+
+POA_foo::POA_foo (void)
+{
+ this->optable_ = &tao_foo_optable;
+}
+
+POA_foo::POA_foo (const POA_foo& rhs)
+ : TAO_Abstract_ServantBase (rhs),
+ TAO_ServantBase (rhs)
+{}
+
+POA_foo::~POA_foo (void)
+{
+}
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_ss.cpp:100
+
+void POA_foo::all_str_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void *_tao_servant,
+ void *_tao_servant_upcall
+ ACE_ENV_ARG_DECL
+ )
+{
+ TAO::Arg_Traits<ACE_InputCDR::to_string>::skel_ret_val _tao_retval;
+ TAO::Arg_Traits<ACE_InputCDR::to_string>::in_sarg_val _tao_inarg;
+ TAO::Arg_Traits<ACE_InputCDR::to_string>::inout_sarg_val _tao_inoutarg;
+ TAO::Arg_Traits<ACE_InputCDR::to_string>::out_sarg_val _tao_outarg;
+
+ TAO::Argument *_tao_signature [] =
+ {
+ &_tao_retval,
+ &_tao_inarg,
+ &_tao_inoutarg,
+ &_tao_outarg
+ };
+
+ TAO_InputCDR &_tao_in = _tao_server_request.incoming ();
+ POA_foo *_tao_impl =
+ ACE_static_cast (
+ POA_foo *,
+ _tao_servant
+ );
+
+ if (!(
+ (_tao_retval.demarshal (_tao_in)) &&
+ (_tao_inarg.demarshal (_tao_in)) &&
+ (_tao_inoutarg.demarshal (_tao_in)) &&
+ (_tao_outarg.demarshal (_tao_in))
+ ))
+ {
+
+ TAO_InputCDR::throw_skel_exception (errno ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+ TAO_Object_Adapter::Servant_Upcall *_tao_upcall =
+ ACE_static_cast (TAO_Object_Adapter::Servant_Upcall *, _tao_servant_upcall);
+
+ TAO_ServerRequestInterceptor_Adapter _tao_vfr (
+ _tao_server_request.orb_core ()->server_request_interceptors (),
+ _tao_server_request.interceptor_count ()
+ );
+
+ // @@@ (JP) This constructor will take _tao_signature eventually.
+ CORBA::String_var inarg;
+ CORBA::String_var inoutarg;
+ TAO_ServerRequestInfo_foo_all_str _tao_ri (
+ _tao_server_request,
+ _tao_upcall,
+ _tao_impl,
+
+ inarg.in (),
+
+ inoutarg.inout ()
+ ACE_ENV_ARG_PARAMETER
+ );
+
+ ACE_TRY
+ {
+ {
+ TAO_PICurrent_Guard _tao_pi_guard (_tao_ri.server_request (),
+ 1 /* Copy TSC to RSC */);
+
+ _tao_vfr.receive_request (&_tao_ri ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (!_tao_vfr.location_forwarded ())
+ {
+
+#endif /* TAO_HAS_INTERCEPTORS */
+ _tao_retval.arg () =
+ _tao_impl->all_str (
+
+ _tao_inarg.arg (),
+
+ _tao_inoutarg.arg (),
+
+ _tao_outarg.arg ()
+ ACE_ENV_ARG_PARAMETER
+ );
+ TAO_INTERCEPTOR_CHECK;
+
+#if (TAO_HAS_INTERCEPTORS == 1)
+
+ }
+ }
+
+ if (!_tao_vfr.location_forwarded ())
+ {
+ // @@@ (JP) This call will take the arg class eventually.
+ char * _tao_retval_info = 0;
+ _tao_ri.result (_tao_retval_info);
+
+ _tao_ri.reply_status (PortableInterceptor::SUCCESSFUL);
+ _tao_vfr.send_reply (&_tao_ri ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ }
+ ACE_CATCHANY
+ {
+ _tao_ri.exception (&ACE_ANY_EXCEPTION);
+ _tao_vfr.send_exception (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION
+ || _tao_status == PortableInterceptor::USER_EXCEPTION)
+ {
+ ACE_RE_THROW;
+ }
+ }
+
+# if defined (ACE_HAS_EXCEPTIONS) \
+ && defined (ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS)
+ ACE_CATCHALL
+ {
+ CORBA::UNKNOWN ex;
+
+ _tao_ri.exception (&ex);
+ _tao_vfr.send_exception (
+ &_tao_ri
+ ACE_ENV_ARG_PARAMETER
+ );
+ ACE_TRY_CHECK;
+
+ PortableInterceptor::ReplyStatus _tao_status =
+ _tao_ri.reply_status (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION)
+ ACE_TRY_THROW (ex);
+ }
+# endif /* ACE_HAS_EXCEPTIONS && ACE_HAS_BROKEN_UNEXPECTED_EXCEPTIONS */
+
+ ACE_ENDTRY;
+ ACE_CHECK;
+#endif /* TAO_HAS_INTERCEPTORS */
+
+ _tao_server_request.init_reply ();
+
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ if (!(
+ (_tao_retval.marshal (_tao_out)) &&
+ (_tao_inarg.marshal (_tao_out)) &&
+ (_tao_inoutarg.marshal (_tao_out)) &&
+ (_tao_outarg.marshal (_tao_out))
+ ))
+ {
+
+ TAO_OutputCDR::throw_skel_exception (errno ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+ }
+
+
+ // In case _tao_servant_upcall is not used in this function
+ ACE_UNUSED_ARG (_tao_servant_upcall);
+}
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:164
+
+void POA_foo::_is_a_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void * _tao_servant,
+ void * /* Servant_Upcall */
+ ACE_ENV_ARG_DECL
+ )
+{
+ TAO_InputCDR &_tao_in = _tao_server_request.incoming ();
+ POA_foo *_tao_impl = (POA_foo *) _tao_servant;
+ CORBA::Boolean _tao_retval = 0;
+ CORBA::String_var value;
+
+ if (!(_tao_in >> value.out ()))
+ ACE_THROW (CORBA::MARSHAL ());
+
+ _tao_retval = _tao_impl->_is_a (value.in () ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
+
+ _tao_server_request.init_reply ();
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval)))
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+void POA_foo::_non_existent_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void * _tao_servant,
+ void * /* Servant_Upcall */
+ ACE_ENV_ARG_DECL
+ )
+{
+ POA_foo *_tao_impl = (POA_foo *) _tao_servant;
+ CORBA::Boolean _tao_retval =
+ _tao_impl->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ _tao_server_request.init_reply ();
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval)))
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+void POA_foo::_interface_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void * _tao_servant,
+ void * /* Servant_Upcall */
+ ACE_ENV_ARG_DECL
+ )
+{
+ POA_foo *_tao_impl = (POA_foo *) _tao_servant;
+ CORBA::InterfaceDef_ptr _tao_retval = 0;
+ CORBA::Boolean _tao_result = 0;
+
+ TAO_IFR_Client_Adapter *_tao_adapter =
+ ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
+ TAO_ORB_Core::ifr_client_adapter_name ()
+ );
+
+ if (_tao_adapter == 0)
+ {
+ ACE_THROW (CORBA::INTF_REPOS ());
+ }
+
+ ACE_TRY
+ {
+ _tao_retval =
+ _tao_impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ _tao_server_request.init_reply ();
+
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ _tao_result =
+ _tao_adapter->interfacedef_cdr_insert (
+ _tao_out,
+ _tao_retval
+ );
+ }
+ ACE_CATCHALL
+ {
+ _tao_adapter->dispose (_tao_retval);
+ }
+ ACE_ENDTRY;
+
+ if (_tao_result == 0)
+ {
+ ACE_THROW (CORBA::MARSHAL ());
+ }
+}
+
+void POA_foo::_component_skel (
+ TAO_ServerRequest &_tao_server_request,
+ void * _tao_object_reference,
+ void * /* Servant_Upcall */
+ ACE_ENV_ARG_DECL
+ )
+{
+ POA_foo *_tao_impl = (POA_foo *) _tao_object_reference;
+ CORBA::Object_var _tao_retval =
+ _tao_impl->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK;
+
+ _tao_server_request.init_reply ();
+ TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
+
+ if (!(_tao_out << _tao_retval._retn ()))
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+CORBA::Boolean POA_foo::_is_a (
+ const char* value
+ ACE_ENV_ARG_DECL_NOT_USED
+ )
+{
+ if (
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:foo:1.0"
+ ) ||
+ !ACE_OS::strcmp (
+ (char *)value,
+ "IDL:org.omg/CORBA/Object:1.0"
+ )
+ )
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+void* POA_foo::_downcast (
+ const char* logical_type_id
+ )
+{
+ if (ACE_OS::strcmp (logical_type_id,
+ "IDL:foo:1.0") == 0)
+ {
+ return ACE_static_cast (POA_foo_ptr, this);
+ }
+
+ if (ACE_OS::strcmp (logical_type_id,
+ "IDL:omg.org/CORBA/Object:1.0") == 0)
+ {
+ return ACE_static_cast(PortableServer::Servant, this);
+ }
+
+ return 0;
+}
+
+const char* POA_foo::_interface_repository_id (void) const
+{
+ return "IDL:foo:1.0";
+}
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:532
+
+void POA_foo::_dispatch (
+ TAO_ServerRequest &req,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ )
+{
+ this->synchronous_upcall_dispatch (req,
+ servant_upcall,
+ this
+ ACE_ENV_ARG_PARAMETER);
+}
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_ss.cpp:478
+
+foo *
+POA_foo::_this (ACE_ENV_SINGLE_ARG_DECL)
+{
+ TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ TAO_Stub_Auto_Ptr safe_stub (stub);
+ CORBA::Object_ptr tmp = CORBA::Object::_nil ();
+
+ if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ())
+ {
+ ACE_NEW_RETURN (
+ tmp,
+ CORBA::Object (
+ stub,
+ 1,
+ this
+ ),
+ 0
+ );
+ }
+ else
+ {
+ ACE_NEW_RETURN (
+ tmp,
+ CORBA::Object (
+ stub,
+ 0,
+ this
+ ),
+ 0
+ );
+ }
+
+ CORBA::Object_var obj = tmp;
+ (void) safe_stub.release ();
+ return ::foo::_unchecked_narrow (obj.in ());
+}
+#endif /* ifndef */
diff --git a/TAO/tests/Bench/wire/testS.h b/TAO/tests/Bench/wire/testS.h
new file mode 100644
index 00000000000..dcec0bccd56
--- /dev/null
+++ b/TAO/tests/Bench/wire/testS.h
@@ -0,0 +1,238 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:487
+
+#ifndef _TAO_IDL_TESTS_H_
+#define _TAO_IDL_TESTS_H_
+
+
+#include "testC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/PortableServer/PortableServer.h"
+#include "tao/PortableServer/Servant_Base.h"
+#include "tao/PortableServer/Collocated_Object.h"
+#include "tao/PortableServer/ThruPOA_Object_Proxy_Impl.h"
+#include "tao/PortableServer/Direct_Object_Proxy_Impl.h"
+
+#if defined(_MSC_VER)
+#if (_MSC_VER >= 1200)
+#pragma warning(push)
+#endif /* _MSC_VER >= 1200 */
+#pragma warning(disable:4250)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option push -w-rvl -w-rch -w-ccc -w-inl
+#endif /* __BORLANDC__ */// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/interface_sh.cpp:86
+
+class POA_foo;
+typedef POA_foo *POA_foo_ptr;
+
+class _TAO_foo_ThruPOA_Proxy_Impl;
+class _TAO_foo_Strategized_Proxy_Broker;
+
+class POA_foo
+ : public virtual PortableServer::ServantBase
+{
+protected:
+ POA_foo (void);
+
+public:
+ POA_foo (const POA_foo& rhs);
+ virtual ~POA_foo (void);
+
+ virtual CORBA::Boolean _is_a (
+ const char* logical_type_id
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual void* _downcast (
+ const char* logical_type_id
+ );
+
+ static void _is_a_skel (
+ TAO_ServerRequest &req,
+ void *servant,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ static void _non_existent_skel (
+ TAO_ServerRequest &req,
+ void *servant,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ static void _interface_skel (
+ TAO_ServerRequest &req,
+ void *servant,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ static void _component_skel (
+ TAO_ServerRequest &req,
+ void *obj,
+ void *servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ virtual void _dispatch (
+ TAO_ServerRequest &req,
+ void *_servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+
+ ::foo *_this (
+ ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS
+ );
+
+ virtual const char* _interface_repository_id (void) const;
+
+ // TAO_IDL - Generated from
+ // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/operation_sh.cpp:45
+
+ virtual char * all_str (
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ )) = 0;
+
+ static void all_str_skel (
+ TAO_ServerRequest &_tao_req,
+ void *_tao_servant,
+ void *_tao_servant_upcall
+ ACE_ENV_ARG_DECL
+ );
+};
+
+///////////////////////////////////////////////////////////////////////
+// Strategized Proxy Broker Declaration
+//
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/strategized_proxy_broker_sh.cpp:39
+
+class _TAO_foo_Strategized_Proxy_Broker : public virtual ::_TAO_foo_Proxy_Broker
+{
+public:
+ _TAO_foo_Strategized_Proxy_Broker (void);
+
+ virtual ~_TAO_foo_Strategized_Proxy_Broker (void);
+
+ virtual ::_TAO_foo_Proxy_Impl &select_proxy (
+ ::foo *object
+ ACE_ENV_ARG_DECL
+ );
+
+private:
+ // Helper methods that takes care to create the proxy
+ // as soon as their use is necessary.
+ void create_proxy (
+ int collocation_strategy
+ ACE_ENV_ARG_DECL
+ );
+
+ // Caches the proxy implementations. The proxy implementation
+ // are totally stateless, and those can be shared by all the
+ // instances of a given IDL interface type.
+ ::_TAO_foo_Proxy_Impl
+ *proxy_cache_[TAO_Collocation_Strategies::CS_LAST];
+
+ TAO_SYNCH_MUTEX mutex_;
+ // This funxtion is used to get an handle to the unique instance
+ // of the Strategized Proxy Broker that is available for a given
+ // interface.
+
+public:
+ static _TAO_foo_Strategized_Proxy_Broker *the_TAO_foo_Strategized_Proxy_Broker (void);
+};
+
+//
+// End Strategized Proxy Broker Declaration
+///////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////
+// ThruPOA Impl. Declaration
+//
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_interface/thru_poa_proxy_impl_sh.cpp:37
+
+class _TAO_foo_ThruPOA_Proxy_Impl :
+ public virtual ::_TAO_foo_Proxy_Impl,
+ public virtual TAO_ThruPOA_Object_Proxy_Impl
+{
+public:
+ _TAO_foo_ThruPOA_Proxy_Impl (void);
+
+ virtual ~_TAO_foo_ThruPOA_Proxy_Impl (void) {}
+
+ // TAO_IDL - Generated from
+ // W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_operation/proxy_impl_xh.cpp:24
+
+ virtual char * all_str (
+ CORBA::Object *_collocated_tao_target_,
+ const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+};
+
+//
+// ThruPOA Proxy Impl. Declaration
+///////////////////////////////////////////////////////////////////////
+
+// TAO_IDL - Generated from
+// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:1090
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+#pragma warning(pop)
+#endif /* _MSC_VER */
+
+#if defined (__BORLANDC__)
+#pragma option pop
+#endif /* __BORLANDC__ */
+
+#endif /* ifndef */
diff --git a/TAO/tests/Bench/wire/test_i.cpp b/TAO/tests/Bench/wire/test_i.cpp
new file mode 100644
index 00000000000..a04b0fe1d06
--- /dev/null
+++ b/TAO/tests/Bench/wire/test_i.cpp
@@ -0,0 +1,33 @@
+
+// $Id$
+
+#include "test_i.h"
+
+char *
+foo_i::all_str (const char *inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ cout << "inarg: " << inarg << endl;
+ cout << "inoutarg: " << inoutarg << endl;
+
+ const char *new_inout = "new_inout";
+ const char *new_out = "out";
+ const char *new_retval = "return";
+
+ CORBA::string_free (inoutarg);
+
+ inoutarg = CORBA::string_alloc (ACE_OS::strlen (new_inout));
+ outarg = CORBA::string_alloc (ACE_OS::strlen (new_out));
+ char *retval = CORBA::string_alloc (ACE_OS::strlen (new_retval));
+
+ ACE_OS::sprintf (inoutarg, "%s", new_inout);
+ ACE_OS::sprintf (outarg.ptr (), "%s", new_out);
+ ACE_OS::sprintf (retval, "%s", new_retval);
+
+ return retval;
+}
diff --git a/TAO/tests/Bench/wire/test_i.h b/TAO/tests/Bench/wire/test_i.h
new file mode 100644
index 00000000000..8d7df7b5e9f
--- /dev/null
+++ b/TAO/tests/Bench/wire/test_i.h
@@ -0,0 +1,24 @@
+
+// $Id$
+
+#ifndef TAO_TEST_I_H
+#define TAO_TEST_I_H
+
+#include "testS.h"
+
+class foo_i : public virtual POA_foo
+{
+ virtual char * all_str (const char * inarg,
+ char *& inoutarg,
+ CORBA::String_out outarg
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ));
+};
+
+#if defined(__ACE_INLINE__)
+#include "test_i.inl"
+#endif /* __ACE_INLINE__ */
+
+#endif /* TAO_TEST_I_H */