ESF_Worker.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   ESF_Worker.h
00005  *
00006  *  ESF_Worker.h,v 1.13 2006/03/15 07:52:21 jtc Exp
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
00054                      ACE_ENV_ARG_DECL) = 0;
00055 };
00056 
00057 TAO_END_VERSIONED_NAMESPACE_DECL
00058 
00059 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00060 #include "orbsvcs/ESF/ESF_Worker.cpp"
00061 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00062 
00063 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00064 #pragma implementation ("ESF_Worker.cpp")
00065 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00066 
00067 #endif /* TAO_ESF_WORKER_H */

Generated on Thu Nov 9 13:08:14 2006 for TAO_ESF by doxygen 1.3.6