Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_RequestInfo_Util Class Reference

Helper class that provides methods useful for both PortableInterceptor::ClientRequestInfo and PortableInterceptor::ServerRequestInfo objects. More...

#include <RequestInfo_Util.h>

List of all members.

Static Public Methods

Factory Methods
These are methods called by TAO_{Client,Server}RequestInfo and their subclasses. Rather than having the same factory code in each subclass, we factor the common code in to this utility class.

Dynamic::ParameterListmake_parameter_list (ACE_ENV_SINGLE_ARG_DECL)
Dynamic::ExceptionListmake_exception_list (ACE_ENV_SINGLE_ARG_DECL)
Dynamic::ContextListmake_context_list (ACE_ENV_SINGLE_ARG_DECL)
Dynamic::RequestContextmake_request_context (ACE_ENV_SINGLE_ARG_DECL)
CORBA::Anymake_any (CORBA::Boolean tk_void_any ACE_ENV_ARG_DECL)


Detailed Description

Helper class that provides methods useful for both PortableInterceptor::ClientRequestInfo and PortableInterceptor::ServerRequestInfo objects.

Definition at line 33 of file RequestInfo_Util.h.


Member Function Documentation

CORBA::Any * TAO_RequestInfo_Util::make_any CORBA::Boolean tk_void_any    ACE_ENV_ARG_DECL [static]
 

Definition at line 81 of file RequestInfo_Util.cpp.

References ACE_CHECK_RETURN, ACE_ENV_ARG_DECL, ACE_NEW_THROW_EX, and TAO_DEFAULT_MINOR_CODE.

Referenced by TAO_ClientRequestInfo_CORBA_Policy_destroy::result, and TAO_ClientRequestInfo_CORBA_Policy_copy::result.

00083 {
00084   CORBA::Any *any = 0;
00085 
00086   if (tk_void_any)
00087     {
00088       CORBA::TypeCode *tc = 0;
00089       ACE_NEW_THROW_EX (tc,
00090                         CORBA::TypeCode (CORBA::tk_void),
00091                         CORBA::NO_MEMORY (
00092                           CORBA::SystemException::_tao_minor_code (
00093                             TAO_DEFAULT_MINOR_CODE,
00094                             ENOMEM),
00095                           CORBA::COMPLETED_NO));
00096       ACE_CHECK_RETURN (0);
00097 
00098       CORBA::TypeCode_var safe_tc = tc;
00099 
00100       ACE_NEW_THROW_EX (any,
00101                         CORBA::Any (tc),
00102                         CORBA::NO_MEMORY (
00103                           CORBA::SystemException::_tao_minor_code (
00104                             TAO_DEFAULT_MINOR_CODE,
00105                             ENOMEM),
00106                           CORBA::COMPLETED_NO));
00107 
00108       // The Any duplicates the TypeCode so there is no problem in
00109       // allowing the TypeCode_var to decrement the reference count on
00110       // the tk_void TypeCode.
00111     }
00112   else
00113     {
00114       ACE_NEW_THROW_EX (any,
00115                         CORBA::Any,
00116                         CORBA::NO_MEMORY (
00117                           CORBA::SystemException::_tao_minor_code (
00118                             TAO_DEFAULT_MINOR_CODE,
00119                             ENOMEM),
00120                           CORBA::COMPLETED_NO));
00121     }
00122 
00123   // No need to do an ACE_CHECK_RETURN.  The caller should do that.
00124 
00125   return any;
00126 }

Dynamic::ContextList * TAO_RequestInfo_Util::make_context_list ACE_ENV_SINGLE_ARG_DECL    [static]
 

Definition at line 47 of file RequestInfo_Util.cpp.

References ACE_ENV_SINGLE_ARG_DECL, ACE_NEW_THROW_EX, and TAO_DEFAULT_MINOR_CODE.

00048 {
00049   Dynamic::ContextList *context_list = 0;
00050   ACE_NEW_THROW_EX (context_list,
00051                     Dynamic::ContextList,
00052                     CORBA::NO_MEMORY (
00053                       CORBA::SystemException::_tao_minor_code (
00054                         TAO_DEFAULT_MINOR_CODE,
00055                         ENOMEM),
00056                       CORBA::COMPLETED_NO));
00057 
00058   // No need to do an ACE_CHECK_RETURN.  The caller should do that.
00059 
00060   return context_list;
00061 }

Dynamic::ExceptionList * TAO_RequestInfo_Util::make_exception_list ACE_ENV_SINGLE_ARG_DECL    [static]
 

Definition at line 30 of file RequestInfo_Util.cpp.

References ACE_ENV_SINGLE_ARG_DECL, ACE_NEW_THROW_EX, and TAO_DEFAULT_MINOR_CODE.

Referenced by TAO_ClientRequestInfo_CORBA_Policy_destroy::exceptions, and TAO_ClientRequestInfo_CORBA_Policy_copy::exceptions.

00031 {
00032   Dynamic::ExceptionList *exception_list = 0;
00033   ACE_NEW_THROW_EX (exception_list,
00034                     Dynamic::ExceptionList,
00035                     CORBA::NO_MEMORY (
00036                       CORBA::SystemException::_tao_minor_code (
00037                         TAO_DEFAULT_MINOR_CODE,
00038                         ENOMEM),
00039                       CORBA::COMPLETED_NO));
00040 
00041   // No need to do an ACE_CHECK_RETURN.  The caller should do that.
00042 
00043   return exception_list;
00044 }

Dynamic::ParameterList * TAO_RequestInfo_Util::make_parameter_list ACE_ENV_SINGLE_ARG_DECL    [static]
 

Definition at line 13 of file RequestInfo_Util.cpp.

References ACE_ENV_SINGLE_ARG_DECL, ACE_NEW_THROW_EX, and TAO_DEFAULT_MINOR_CODE.

Referenced by TAO_ClientRequestInfo_CORBA_Policy_destroy::arguments, and TAO_ClientRequestInfo_CORBA_Policy_copy::arguments.

00014 {
00015   Dynamic::ParameterList *parameter_list = 0;
00016   ACE_NEW_THROW_EX (parameter_list,
00017                     Dynamic::ParameterList,
00018                     CORBA::NO_MEMORY (
00019                       CORBA::SystemException::_tao_minor_code (
00020                         TAO_DEFAULT_MINOR_CODE,
00021                         ENOMEM),
00022                       CORBA::COMPLETED_NO));
00023 
00024   // No need to do an ACE_CHECK_RETURN.  The caller should do that.
00025 
00026   return parameter_list;
00027 }

Dynamic::RequestContext * TAO_RequestInfo_Util::make_request_context ACE_ENV_SINGLE_ARG_DECL    [static]
 

Definition at line 64 of file RequestInfo_Util.cpp.

References ACE_ENV_SINGLE_ARG_DECL, ACE_NEW_THROW_EX, and TAO_DEFAULT_MINOR_CODE.

00065 {
00066   Dynamic::RequestContext *request_context = 0;
00067   ACE_NEW_THROW_EX (request_context,
00068                     Dynamic::RequestContext,
00069                     CORBA::NO_MEMORY (
00070                       CORBA::SystemException::_tao_minor_code (
00071                         TAO_DEFAULT_MINOR_CODE,
00072                         ENOMEM),
00073                       CORBA::COMPLETED_NO));
00074 
00075   // No need to do an ACE_CHECK_RETURN.  The caller should do that.
00076 
00077   return request_context;
00078 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:38:33 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002