Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

oep_types.h

Go to the documentation of this file.
00001 // -*- Mode: C++; -*-
00002 //                            Package   : omniEvents
00003 // oep_types.h                Created   : 1/10/99
00004 //                            Author    : Paul Nader (pwn)
00005 //
00006 //    Copyright (C) 1998 Paul Nader.
00007 //
00008 //    This file is part of the omniEvents application.
00009 //
00010 //    omniEvents is free software; you can redistribute it and/or
00011 //    modify it under the terms of the GNU Lesser General Public
00012 //    License as published by the Free Software Foundation; either
00013 //    version 2.1 of the License, or (at your option) any later version.
00014 //
00015 //    omniEvents is distributed in the hope that it will be useful,
00016 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 //    Lesser General Public License for more details.
00019 //
00020 //    You should have received a copy of the GNU Lesser General Public
00021 //    License along with this library; if not, write to the Free Software
00022 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 //
00024 // Description:
00025 //
00026 
00027 /*
00028   $Log: oep_types.h,v $
00029   Revision 1.3  2003/11/03 22:33:49  alextingle
00030   Removed all platform specific switches. Now uses autoconf, config.h.
00031 
00032   Revision 1.1.1.1.2.1  2002/09/28 22:20:51  shamus13
00033   Added ifdefs to enable omniEvents to compile
00034   with both omniORB3 and omniORB4. If __OMNIORB4__
00035   is defined during compilation, omniORB4 headers
00036   and command line option syntax is used, otherwise
00037   fall back to omniORB3 style.
00038 
00039   Revision 1.1.1.1  2002/09/25 19:00:32  shamus13
00040   Import of OmniEvents source tree from release 2.1.1
00041 
00042   Revision 1.8  2000/10/03 08:37:14  naderp
00043   *** empty log message ***
00044 
00045   Revision 1.7  2000/09/26 08:42:41  naderp
00046   Configurable STL default parameters.
00047 
00048   Revision 1.6  2000/09/05 01:07:40  naderp
00049   Added MaxQueueLength QOS.
00050 
00051   Revision 1.5  2000/09/04 03:42:19  naderp
00052   Naming.hh no longer required. Replaced with omniORB.h.
00053 
00054   Revision 1.4  2000/08/30 04:17:48  naderp
00055   Port to omniORB 3.0.1.
00056 
00057   Revision 1.3  2000/03/06 13:06:53  naderp
00058   Removed EventChannelFactory dependency with Naming Service.
00059   Moved port from COMMON to channelFactory.
00060 
00061   Revision 1.2  2000/03/02 03:41:59  naderp
00062   Changed Proxy containment from channel to admin objects.
00063   Added Support for multiple admin objects per channel.
00064 
00065   Revision 1.1  1999/11/02 15:37:39  naderp
00066   *** empty log message ***
00067 
00068  * Revision 1.0  99/11/01  16:48:16  16:48:16  naderp (Paul Nader)
00069  * Initial revision
00070  * 
00071 */
00072 
00073 #ifndef __OEP_TYPES_H_
00074 #define __OEP_TYPES_H_
00075 
00076 #ifdef HAVE_CONFIG_H
00077 #  include "config.h"
00078 #endif
00079 
00080 #include <list>
00081 #ifdef HAVE_STD_STL
00082 using namespace std;
00083 #endif
00084 
00085 #ifdef HAVE_OMNIORB3
00086 #  include <omniORB3/CORBA.h>
00087 #endif
00088 
00089 #ifdef HAVE_OMNIORB4
00090 #  include <omniORB4/CORBA.h>
00091 #endif
00092 
00093 class OEP_prxy;
00094 class OEP_caps;
00095 class OEP_saps;
00096 class OEP_ecps;
00097 
00098 
00099 #ifdef STL_HAS_DEFAULT_ARGS
00100 typedef list<OEP_prxy *> OepPrxyList;
00101 typedef list<OEP_caps *> OepCapsList;
00102 typedef list<OEP_saps *> OepSapsList;
00103 typedef list<OEP_ecps *> OepEcpsList;
00104 #else
00105 #  ifdef STL_NO_ALLOCATOR_ARGS
00106 #    define STL_ALLOCATOR(T) allocator
00107 #  else
00108 #    define STL_ALLOCATOR(T) allocator<T>
00109 #  endif
00110 typedef list<OEP_prxy *, STL_ALLOCATOR(OEP_prxy *) > OepPrxyList;
00111 typedef list<OEP_caps *, STL_ALLOCATOR(OEP_caps *) > OepCapsList;
00112 typedef list<OEP_saps *, STL_ALLOCATOR(OEP_saps *) > OepSapsList;
00113 typedef list<OEP_ecps *, STL_ALLOCATOR(OEP_ecps *) > OepEcpsList;
00114 #endif
00115 
00116 //------------------------------------------------------------------------
00117 // Proxy Persistent Data Representation
00118 //------------------------------------------------------------------------
00119 
00120 class OEP_prxy
00121 {
00122 public:
00123   OEP_prxy();
00124   virtual ~OEP_prxy();
00125 
00126 public:
00127   void setIor(char *ior);
00128   const char *getIor(void) const;
00129   void setKey(char *key);
00130   const char *getKey(void) const;
00131 
00132 private:
00133   char *key;
00134   char *ior;
00135 };
00136 
00137 //------------------------------------------------------------------------
00138 // Consumer Admin Persistent Data Representation
00139 //------------------------------------------------------------------------
00140 
00141 class OEP_caps
00142 {
00143 public:
00144   OEP_caps();
00145   virtual ~OEP_caps();
00146 
00147 public:
00148   void setKey(char *key);
00149   const char *getKey(void) const;
00150   void addProxyPushSupplier(OEP_prxy *);
00151   const OepPrxyList &getProxyPushSuppliers(void) const;
00152   void addProxyPullSupplier(OEP_prxy *);
00153   const OepPrxyList &getProxyPullSuppliers(void) const;
00154 
00155 private:
00156   OepPrxyList ppss;
00157   OepPrxyList ppls;
00158   char *key;
00159 };
00160 
00161 //------------------------------------------------------------------------
00162 // Supplier Admin Persistent Data Representation
00163 //------------------------------------------------------------------------
00164 
00165 class OEP_saps
00166 {
00167 public:
00168   OEP_saps();
00169   virtual ~OEP_saps();
00170 
00171 public:
00172   void setKey(char *key);
00173   const char *getKey(void) const;
00174   void addProxyPushConsumer(OEP_prxy *);
00175   const OepPrxyList &getProxyPushConsumers(void) const;
00176   void addProxyPullConsumer(OEP_prxy *);
00177   const OepPrxyList &getProxyPullConsumers(void) const;
00178 
00179 private:
00180   OepPrxyList ppsc;
00181   OepPrxyList pplc;
00182   char *key;
00183 };
00184 
00185 //------------------------------------------------------------------------
00186 // Event Channel Persistent Data Representation
00187 //------------------------------------------------------------------------
00188 class OEP_ecps
00189 {
00190 public:
00191   OEP_ecps();
00192   virtual ~OEP_ecps();
00193 
00194 public:
00195   void setKey(char *key);
00196   const char *getKey(void) const;
00197   void addConsumerAdmin(OEP_caps *cadm);
00198   const OepCapsList &getConsumerAdmins(void) const;
00199   void addSupplierAdmin(OEP_saps *cadm);
00200   const OepSapsList &getSupplierAdmins(void) const;
00201   void setPullRetryPeriod(long);
00202   long getPullRetryPeriod(void) const;
00203   void setMaxQueueLength(long);
00204   long getMaxQueueLength(void) const;
00205   void setMaxEventsPerConsumer(long);
00206   long getMaxEventsPerConsumer(void) const;
00207 
00208 private:
00209   char *key;
00210   OepCapsList cadm;
00211   OepSapsList sadm;
00212   long pullRetryPeriod;
00213   long maxQueueLength;
00214   long maxEventsPerConsumer;
00215 };
00216 
00217 //------------------------------------------------------------------------
00218 // Channel Factory Persistent Data Representation
00219 //------------------------------------------------------------------------
00220 class OEP_cfps
00221 {
00222 public:
00223   OEP_cfps();
00224   virtual ~OEP_cfps();
00225 
00226 public:
00227   void setPort(unsigned int port);
00228   const unsigned int getPort(void) const;
00229   void setKey(char *key);
00230   const char *getKey(void) const;
00231   void addChannel(OEP_ecps *channel);
00232   OepEcpsList &getChannels(void);
00233 
00234 private:
00235   unsigned int port;
00236   char *key;
00237   OepEcpsList channels;
00238 };
00239 
00240 #endif /* __OEP_TYPES_H_ */
00241 

Generated on Fri Dec 12 10:53:02 2003 for OmniEvents by doxygen1.2.15