summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Notify_Factory.h
blob: 6aa9522e3a15ac7872c7257c36653ee4d99b03c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* -*- C++ -*- */
//=============================================================================
/**
 *  @file   Notify_Factory.h
 *
 *  $Id$
 *
 * A collection of factories -
 * a) A factory for event channel objects - the EC factory, EC, Admins, Proxys, et al.
 * b) A factory for collections.
 * c) A factory for POA's.
 * d) A factory for manager objects.
 *
 *
 *  @author Pradeep Gore <pradeep@cs.wustl.edu>
 */
//=============================================================================


#ifndef NOTIFY_FACTORY_H
#define NOTIFY_FACTORY_H

#include "ace/pre.h"
#include "tao/corba.h"
#include "notify_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

class TAO_Notify_CO_Factory;
class TAO_Notify_POA_Factory;
class TAO_Notify_Collection_Factory;
class TAO_Notify_EMO_Factory;
class TAO_Notify_EventChannelFactory_i;

 /**
  * @class TAO_Notify_Factory
  *
  * @brief TAO_Notify_Factory
  *
  * This classes initializes the static default factories.
  */
class TAO_Notify_Export TAO_Notify_Factory
{
 public:
  /// The factory for channel objects.
  static TAO_Notify_CO_Factory* get_channel_objects_factory (void);

  /// The factory for POA's.
  static TAO_Notify_POA_Factory* get_poa_factory (void);

  /// Factory for all collections in the notify service.
  static TAO_Notify_Collection_Factory* get_collection_factory (void);

  /// The event manager objects.
  static TAO_Notify_EMO_Factory* create_event_manager_objects_factory (void);

 protected:
  friend class TAO_Notify_EventChannelFactory_i;

  /// Initalize the services.
  static void init (ACE_ENV_SINGLE_ARG_DECL);

  /// shutdown the svcs.
  static void shutdown (void);

  // = Data Members
  static TAO_Notify_CO_Factory* co_factory_;
  static TAO_Notify_POA_Factory* poa_factory_;
  static TAO_Notify_Collection_Factory* collection_factory_;
  static TAO_Notify_EMO_Factory* emo_factory_;
};

#define TAO_NOTIFY_DEF_CO_FACTORY_NAME "Notify_Default_Channel_Objects_Factory"
#define TAO_NOTIFY_DEF_POA_FACTORY_NAME "Notify_Default_POA_Factory"
#define TAO_NOTIFY_DEF_COLLECTION_FACTORY_NAME "Notify_Default_Collection_Factory"
#define TAO_NOTIFY_DEF_EMO_FACTORY_NAME "Notify_Default_Event_Manager_Objects_Factory"

#include "ace/post.h"
#endif /* NOTIFY_FACTORY_H */