Public Member Functions | Protected Member Functions | Protected Attributes | Private Types

TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION > Class Template Reference

Helper to locate a TYPE given its ID. More...

#include <Find_Worker_T.h>

Inheritance diagram for TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >:
Inheritance graph
[legend]
Collaboration diagram for TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_Notify_Find_Worker_T (void)
 Constructor.
TYPE * find (const TAO_Notify_Object::ID id, CONTAINER &container)
 Find the Type.
INTERFACE_PTR resolve (const TAO_Notify_Object::ID id, CONTAINER &container)
 Find and resolve to the Interface.

Protected Member Functions

void work (TYPE *object)
 = TAO_ESF_Worker method

Protected Attributes

TAO_Notify_Object::ID id_
 The id we're looking for.
TYPE * result_
 The result.

Private Types

typedef TAO_Notify_Container_T
< TYPE > 
CONTAINER
typedef
TAO_ESF_Proxy_Collection< TYPE > 
COLLECTION

Detailed Description

template<class TYPE, class INTERFACE, class INTERFACE_PTR, class EXCEPTION>
class TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >

Helper to locate a TYPE given its ID.

Definition at line 36 of file Find_Worker_T.h.


Member Typedef Documentation

template<class TYPE , class INTERFACE , class INTERFACE_PTR , class EXCEPTION >
typedef TAO_ESF_Proxy_Collection<TYPE> TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::COLLECTION [private]

Definition at line 39 of file Find_Worker_T.h.

template<class TYPE , class INTERFACE , class INTERFACE_PTR , class EXCEPTION >
typedef TAO_Notify_Container_T<TYPE> TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::CONTAINER [private]

Definition at line 38 of file Find_Worker_T.h.


Constructor & Destructor Documentation

template<class TYPE , class INTERFACE , class INTERFACE_PTR , class EXCEPTION >
TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::TAO_Notify_Find_Worker_T ( void   ) 

Constructor.

Definition at line 15 of file Find_Worker_T.cpp.

  :id_ (0), result_ (0)
{
}


Member Function Documentation

template<class TYPE , class INTERFACE , class INTERFACE_PTR , class EXCEPTION >
TYPE * TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::find ( const TAO_Notify_Object::ID  id,
CONTAINER container 
)

Find the Type.

Definition at line 21 of file Find_Worker_T.cpp.

{
  this->id_ = id;

  container.collection ()->for_each (this);

  return this->result_;
}

template<class TYPE , class INTERFACE , class INTERFACE_PTR , class EXCEPTION >
INTERFACE_PTR TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::resolve ( const TAO_Notify_Object::ID  id,
CONTAINER container 
)

Find and resolve to the Interface.

Definition at line 31 of file Find_Worker_T.cpp.

{
  this->find (id, container);

  if (this->result_ == 0)
    throw EXCEPTION ();

  CORBA::Object_var object = this->result_->ref ();

  return INTERFACE::_narrow (object.in ());
}

template<class TYPE , class INTERFACE , class INTERFACE_PTR , class EXCEPTION >
void TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::work ( TYPE *  object  )  [protected, virtual]

= TAO_ESF_Worker method

Implements TAO_ESF_Worker< TYPE >.

Definition at line 8 of file Find_Worker_T.inl.

{
  if (type->id () == this->id_)
    this->result_ = type;
}


Member Data Documentation

template<class TYPE , class INTERFACE , class INTERFACE_PTR , class EXCEPTION >
TAO_Notify_Object::ID TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::id_ [protected]

The id we're looking for.

Definition at line 56 of file Find_Worker_T.h.

template<class TYPE , class INTERFACE , class INTERFACE_PTR , class EXCEPTION >
TYPE* TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::result_ [protected]

The result.

Definition at line 59 of file Find_Worker_T.h.


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