ESF_Worker.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   ESF_Worker.h
00005  *
00006  *  $Id: ESF_Worker.h 76589 2007-01-25 18:04:11Z elliott_c $
00007  *
00008  *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
00009  *
00010  *  http://doc.ece.uci.edu/~coryan/EC/index.html
00011  */
00012 
00013 #ifndef TAO_ESF_WORKER_H
00014 #define TAO_ESF_WORKER_H
00015 
00016 #include "ace/CORBA_macros.h"
00017 #include "ace/os_include/os_stddef.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/Versioned_Namespace.h"
00024 
00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00026 
00027 class Object;
00028 
00029 namespace CORBA
00030 {
00031   class Environment;
00032 }
00033 /// Define the interface for the Worker objects
00034 /**
00035  * The Event Service Framework uses Worker classes to iterate over
00036  * collections of proxies.
00037  * The following class defines the worker interface, basically users of
00038  * the framework implement a worker object and pass it to one
00039  * collection.  The collection invokes the worker for each element the
00040  * colection contains.
00041  */
00042 template<class Object>
00043 class TAO_ESF_Worker
00044 {
00045 public:
00046   virtual ~TAO_ESF_Worker (void);
00047 
00048   /// Used by the collection to inform the worker
00049   /// the number of proxies in the collection.
00050   virtual void set_size(size_t size);
00051 
00052   /// Callback interface.
00053   virtual void work (Object *object) = 0;
00054 };
00055 
00056 TAO_END_VERSIONED_NAMESPACE_DECL
00057 
00058 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00059 #include "orbsvcs/ESF/ESF_Worker.cpp"
00060 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00061 
00062 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00063 #pragma implementation ("ESF_Worker.cpp")
00064 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00065 
00066 #endif /* TAO_ESF_WORKER_H */

Generated on Tue Feb 2 17:43:47 2010 for TAO_ESF by  doxygen 1.4.7