Classes | Public Member Functions | Protected Attributes | Private Types

TAO_Notify_Container_T< TYPE > Class Template Reference

A template class that manages a collection. TYPE = type of collection. More...

#include <Container_T.h>

Collaboration diagram for TAO_Notify_Container_T< TYPE >:
Collaboration graph
[legend]

List of all members.

Classes

class  Destroyer

Public Member Functions

 TAO_Notify_Container_T (void)
 Constructor.
virtual ~TAO_Notify_Container_T ()
 Destructor.
void init (void)
 Init this object.
virtual void insert (TYPE *type)
 Insert object to this container.
virtual void remove (TYPE *type)
 Remove type from container_.
virtual void shutdown (void)
 Shutdown.
virtual void destroy (void)
 Call destroy on each contained object.
COLLECTIONcollection (void)
 Collection.

Protected Attributes

COLLECTIONcollection_
 The collection data structure that we add objects to.

Private Types

typedef
TAO_ESF_Proxy_Collection< TYPE > 
COLLECTION

Detailed Description

template<class TYPE>
class TAO_Notify_Container_T< TYPE >

A template class that manages a collection. TYPE = type of collection.

Definition at line 35 of file Container_T.h.


Member Typedef Documentation

template<class TYPE >
typedef TAO_ESF_Proxy_Collection<TYPE> TAO_Notify_Container_T< TYPE >::COLLECTION [private]

Definition at line 37 of file Container_T.h.


Constructor & Destructor Documentation

template<class TYPE >
TAO_Notify_Container_T< TYPE >::TAO_Notify_Container_T ( void   ) 

Constructor.

Definition at line 28 of file Container_T.cpp.

  : collection_ (0)
{
}

template<class TYPE >
TAO_Notify_Container_T< TYPE >::~TAO_Notify_Container_T (  )  [virtual]

Destructor.

Definition at line 34 of file Container_T.cpp.

{
  delete collection_;
}


Member Function Documentation

template<class TYPE >
TAO_Notify_Container_T< TYPE >::COLLECTION * TAO_Notify_Container_T< TYPE >::collection ( void   ) 

Collection.

Definition at line 8 of file Container_T.inl.

{
  return this->collection_;
}

template<class TYPE >
void TAO_Notify_Container_T< TYPE >::destroy ( void   )  [virtual]

Call destroy on each contained object.

Definition at line 48 of file Container_T.cpp.

{
  Destroyer destroyer;
  this->collection_->for_each (&destroyer);
}

template<class TYPE >
void TAO_Notify_Container_T< TYPE >::init ( void   ) 

Init this object.

Definition at line 67 of file Container_T.cpp.

{
  // get the factory
  TAO_Notify_Factory* factory = TAO_Notify_PROPERTIES::instance ()->factory ();

  // Init variables
  factory->create (this->collection_);
}

template<class TYPE >
void TAO_Notify_Container_T< TYPE >::insert ( TYPE *  type  )  [virtual]

Insert object to this container.

Definition at line 55 of file Container_T.cpp.

{
  this->collection_->connected (type);
}

template<class TYPE >
void TAO_Notify_Container_T< TYPE >::remove ( TYPE *  type  )  [virtual]

Remove type from container_.

Definition at line 61 of file Container_T.cpp.

{
  this->collection_->disconnected (type);
}

template<class TYPE >
void TAO_Notify_Container_T< TYPE >::shutdown ( void   )  [virtual]

Shutdown.

Definition at line 40 of file Container_T.cpp.

{
  TAO_ESF_Shutdown_Proxy<TYPE> shutdown_worker;

  this->collection_->for_each (&shutdown_worker);
}


Member Data Documentation

template<class TYPE >
COLLECTION* TAO_Notify_Container_T< TYPE >::collection_ [protected]

The collection data structure that we add objects to.

Definition at line 66 of file Container_T.h.


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