summaryrefslogtreecommitdiff
path: root/TAO/tao/PI/RequestInfo_Util.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:21 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:21 +0000
commit3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch)
tree197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/tao/PI/RequestInfo_Util.cpp
parent6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff)
downloadATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/tao/PI/RequestInfo_Util.cpp')
-rw-r--r--TAO/tao/PI/RequestInfo_Util.cpp113
1 files changed, 113 insertions, 0 deletions
diff --git a/TAO/tao/PI/RequestInfo_Util.cpp b/TAO/tao/PI/RequestInfo_Util.cpp
new file mode 100644
index 00000000000..65d42175dd2
--- /dev/null
+++ b/TAO/tao/PI/RequestInfo_Util.cpp
@@ -0,0 +1,113 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#include "tao/PI/RequestInfo_Util.h"
+
+#if TAO_HAS_INTERCEPTORS == 1
+
+#include "tao/AnyTypeCode/TypeCode.h"
+#include "tao/AnyTypeCode/DynamicC.h"
+#include "tao/ORB_Constants.h"
+#include "tao/StringSeqC.h"
+#include "tao/SystemException.h"
+
+ACE_RCSID (tao,
+ RequestInfo_Util,
+ "$Id$")
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+Dynamic::ParameterList *
+TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_DECL)
+{
+ Dynamic::ParameterList *parameter_list = 0;
+ ACE_NEW_THROW_EX (parameter_list,
+ Dynamic::ParameterList,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ 0,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+
+ // No need to do an ACE_CHECK_RETURN. The caller should do that.
+
+ return parameter_list;
+}
+
+Dynamic::ExceptionList *
+TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_DECL)
+{
+ Dynamic::ExceptionList *exception_list = 0;
+ ACE_NEW_THROW_EX (exception_list,
+ Dynamic::ExceptionList,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ 0,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+
+ // No need to do an ACE_CHECK_RETURN. The caller should do that.
+
+ return exception_list;
+}
+
+Dynamic::ContextList *
+TAO_RequestInfo_Util::make_context_list (ACE_ENV_SINGLE_ARG_DECL)
+{
+ Dynamic::ContextList *context_list = 0;
+ ACE_NEW_THROW_EX (context_list,
+ Dynamic::ContextList,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ 0,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+
+ // No need to do an ACE_CHECK_RETURN. The caller should do that.
+
+ return context_list;
+}
+
+Dynamic::RequestContext *
+TAO_RequestInfo_Util::make_request_context (ACE_ENV_SINGLE_ARG_DECL)
+{
+ Dynamic::RequestContext *request_context = 0;
+ ACE_NEW_THROW_EX (request_context,
+ Dynamic::RequestContext,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ 0,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+
+ // No need to do an ACE_CHECK_RETURN. The caller should do that.
+
+ return request_context;
+}
+
+CORBA::Any *
+TAO_RequestInfo_Util::make_any (CORBA::Boolean tk_void_any
+ ACE_ENV_ARG_DECL)
+{
+ CORBA::Any *any = 0;
+ ACE_NEW_THROW_EX (any,
+ CORBA::Any,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ 0,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (any);
+
+ if (tk_void_any)
+ {
+ any->_tao_set_typecode (CORBA::_tc_void);
+ }
+
+ return any;
+}
+
+TAO_END_VERSIONED_NAMESPACE_DECL
+
+#endif