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
|
// -*- C++ -*-
//=============================================================================
/**
* @file EventChannelFactory_i.h
*
* $Id$
*
* @author Huang-Ming Huang <hh1@cse.wustl.edu>
*/
//=============================================================================
#ifndef EVENTCHANNELFACTORY_I_H
#define EVENTCHANNELFACTORY_I_H
#include "orbsvcs/FT_CORBAS.h"
#include "ace/Synch.h"
#include "ace/Hash_Map_Manager_T.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
class EventChannelFactory_i : public POA_FT::GenericFactory {
public:
EventChannelFactory_i(const char* conf_filename, CORBA::ORB_ptr);
virtual CORBA::Object_ptr create_object (
const char * type_id,
const FT::Criteria & the_criteria,
FT::GenericFactory::FactoryCreationId_out factory_creation_id
ACE_ENV_ARG_DECL_WITH_DEFAULTS
)
ACE_THROW_SPEC ((
CORBA::SystemException
, FT::NoFactory
, FT::ObjectNotCreated
, FT::InvalidCriteria
, FT::InvalidProperty
, FT::CannotMeetCriteria
)) ;
virtual void delete_object (
const FT::GenericFactory::FactoryCreationId & factory_creation_id
ACE_ENV_ARG_DECL_WITH_DEFAULTS
)
ACE_THROW_SPEC ((
CORBA::SystemException
, FT::ObjectNotFound
));
private:
CORBA::Object_ptr create_process (
char * process,
const FT::Criteria & the_criteria,
FT::GenericFactory::FactoryCreationId_out factory_creation_id);
const char* conf_file;
int id;
CORBA::ORB_ptr orb;
typedef ACE_Hash_Map_Manager<int, CORBA::Object_var, ACE_Null_Mutex> Objects;
Objects objects;
};
#endif
|