2 //=============================================================================
4 * @file LifeCycle_Service_i.h
6 * A Life Cycle Service for the Quoter example.
8 * @author Michael Kircher (mk1@cs.wustl.edu)
10 //=============================================================================
13 #include "orbsvcs/LifeCycleServiceS.h"
14 #include "Factory_Trader.h"
15 #include "Criteria_Evaluator.h"
17 #ifndef LIFECYCLE_SERVICE_IMPL_H
18 #define LIFECYCLE_SERVICE_IMPL_H
21 * @class Life_Cycle_Service_i
23 * A CosLifeCycle conforming Generic Factory.
25 class Life_Cycle_Service_i
: public POA_LifeCycleService::Life_Cycle_Service
29 Life_Cycle_Service_i (int debug_level
= 1);
30 ~Life_Cycle_Service_i (void);
32 /// Returns true if the Generic Factory is able to forward a request
33 /// for creating an object described by the <factory_key>.
34 CORBA::Boolean
supports (const CosLifeCycle::Key
&factory_key
);
37 * Returns an object reference to a newly created object, though the
38 * Generic Factory itself cannot create objects, it will forward the
39 * request to a more concrete Factory.
41 CORBA::Object_ptr
create_object (const CosLifeCycle::Key
&factory_key
,
42 const CosLifeCycle::Criteria
&the_criteria
);
44 void register_factory (const char * name
,
45 const char * location
,
46 const char * description
,
47 CORBA::Object_ptr object
);
49 // Registers a factory with specified properties
52 Factory_Trader
*factory_trader_ptr_
;
54 /// debug level (0 = quiet, 1 = default, informative, 2+ = noisy);
58 #endif /* LIFECYCLE_SERVICE_IMPL_H */