00001
00002
00003
00004
00005 #include "tao/PI/RequestInfo_Util.h"
00006
00007 #if TAO_HAS_INTERCEPTORS == 1
00008
00009 #include "tao/AnyTypeCode/TypeCode.h"
00010 #include "tao/AnyTypeCode/DynamicC.h"
00011 #include "tao/ORB_Constants.h"
00012 #include "tao/StringSeqC.h"
00013 #include "tao/SystemException.h"
00014
00015 ACE_RCSID (tao,
00016 RequestInfo_Util,
00017 "RequestInfo_Util.cpp,v 1.4 2006/03/10 07:19:12 jtc Exp")
00018
00019 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00020
00021 Dynamic::ParameterList *
00022 TAO_RequestInfo_Util::make_parameter_list (ACE_ENV_SINGLE_ARG_DECL)
00023 {
00024 Dynamic::ParameterList *parameter_list = 0;
00025 ACE_NEW_THROW_EX (parameter_list,
00026 Dynamic::ParameterList,
00027 CORBA::NO_MEMORY (
00028 CORBA::SystemException::_tao_minor_code (
00029 0,
00030 ENOMEM),
00031 CORBA::COMPLETED_NO));
00032
00033
00034
00035 return parameter_list;
00036 }
00037
00038 Dynamic::ExceptionList *
00039 TAO_RequestInfo_Util::make_exception_list (ACE_ENV_SINGLE_ARG_DECL)
00040 {
00041 Dynamic::ExceptionList *exception_list = 0;
00042 ACE_NEW_THROW_EX (exception_list,
00043 Dynamic::ExceptionList,
00044 CORBA::NO_MEMORY (
00045 CORBA::SystemException::_tao_minor_code (
00046 0,
00047 ENOMEM),
00048 CORBA::COMPLETED_NO));
00049
00050
00051
00052 return exception_list;
00053 }
00054
00055 Dynamic::ContextList *
00056 TAO_RequestInfo_Util::make_context_list (ACE_ENV_SINGLE_ARG_DECL)
00057 {
00058 Dynamic::ContextList *context_list = 0;
00059 ACE_NEW_THROW_EX (context_list,
00060 Dynamic::ContextList,
00061 CORBA::NO_MEMORY (
00062 CORBA::SystemException::_tao_minor_code (
00063 0,
00064 ENOMEM),
00065 CORBA::COMPLETED_NO));
00066
00067
00068
00069 return context_list;
00070 }
00071
00072 Dynamic::RequestContext *
00073 TAO_RequestInfo_Util::make_request_context (ACE_ENV_SINGLE_ARG_DECL)
00074 {
00075 Dynamic::RequestContext *request_context = 0;
00076 ACE_NEW_THROW_EX (request_context,
00077 Dynamic::RequestContext,
00078 CORBA::NO_MEMORY (
00079 CORBA::SystemException::_tao_minor_code (
00080 0,
00081 ENOMEM),
00082 CORBA::COMPLETED_NO));
00083
00084
00085
00086 return request_context;
00087 }
00088
00089 CORBA::Any *
00090 TAO_RequestInfo_Util::make_any (CORBA::Boolean tk_void_any
00091 ACE_ENV_ARG_DECL)
00092 {
00093 CORBA::Any *any = 0;
00094 ACE_NEW_THROW_EX (any,
00095 CORBA::Any,
00096 CORBA::NO_MEMORY (
00097 CORBA::SystemException::_tao_minor_code (
00098 0,
00099 ENOMEM),
00100 CORBA::COMPLETED_NO));
00101 ACE_CHECK_RETURN (any);
00102
00103 if (tk_void_any)
00104 {
00105 any->_tao_set_typecode (CORBA::_tc_void);
00106 }
00107
00108 return any;
00109 }
00110
00111 TAO_END_VERSIONED_NAMESPACE_DECL
00112
00113 #endif