Public Types | Static Public Member Functions | Static Private Member Functions

TAO::Utils::RIR_Narrow< T > Class Template Reference

Helper class to obtain an initial reference and narrow it to the proper object reference. More...

#include <RIR_Narrow.h>

List of all members.

Public Types

typedef T::_ptr_type _ptr_type
typedef T::_var_type _var_type

Static Public Member Functions

static _ptr_type narrow (CORBA::ORB_ptr orb, char const *id)
static _ptr_type narrow (PortableInterceptor::ORBInitInfo_ptr orb, char const *id)

Static Private Member Functions

static _ptr_type narrow_object (CORBA::Object_ptr object)

Detailed Description

template<class T>
class TAO::Utils::RIR_Narrow< T >

Helper class to obtain an initial reference and narrow it to the proper object reference.

Definition at line 40 of file RIR_Narrow.h.


Member Typedef Documentation

template<class T >
typedef T::_ptr_type TAO::Utils::RIR_Narrow< T >::_ptr_type

Definition at line 43 of file RIR_Narrow.h.

template<class T >
typedef T::_var_type TAO::Utils::RIR_Narrow< T >::_var_type

Definition at line 44 of file RIR_Narrow.h.


Member Function Documentation

template<class T >
TAO::Utils::RIR_Narrow< T >::_ptr_type TAO::Utils::RIR_Narrow< T >::narrow ( CORBA::ORB_ptr  orb,
char const *  id 
) [static]

Use resolve_initial_references to find an object and then narrow it.

Definition at line 13 of file RIR_Narrow.cpp.

{
  CORBA::Object_var object =
    orb->resolve_initial_references (id);

  return RIR_Narrow<T>::narrow_object (object.in ());
}

template<class T >
TAO::Utils::RIR_Narrow< T >::_ptr_type TAO::Utils::RIR_Narrow< T >::narrow ( PortableInterceptor::ORBInitInfo_ptr  orb,
char const *  id 
) [static]

Use resolve_initial_references to find an object and then narrow it.

Definition at line 22 of file RIR_Narrow.cpp.

{
  CORBA::Object_var object = info->resolve_initial_references (id);

  return RIR_Narrow<T>::narrow_object (object.in ());
}

template<class T >
TAO::Utils::RIR_Narrow< T >::_ptr_type TAO::Utils::RIR_Narrow< T >::narrow_object ( CORBA::Object_ptr  object  )  [static, private]

Definition at line 31 of file RIR_Narrow.cpp.

{
  _var_type narrowed_object = T::_narrow (object);

  if (CORBA::is_nil (narrowed_object.in ()))
  {
    throw ::CORBA::INV_OBJREF ();
  }
  return narrowed_object._retn ();
}


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines