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
28 Life_Cycle_Service_i (int debug_level
= 1);
29 ~Life_Cycle_Service_i ();
31 /// Returns true if the Generic Factory is able to forward a request
32 /// for creating an object described by the <factory_key>.
33 CORBA::Boolean
supports (const CosLifeCycle::Key
&factory_key
);
36 * Returns an object reference to a newly created object, though the
37 * Generic Factory itself cannot create objects, it will forward the
38 * request to a more concrete Factory.
40 CORBA::Object_ptr
create_object (const CosLifeCycle::Key
&factory_key
,
41 const CosLifeCycle::Criteria
&the_criteria
);
43 void register_factory (const char * name
,
44 const char * location
,
45 const char * description
,
46 CORBA::Object_ptr object
);
48 // Registers a factory with specified properties
51 Factory_Trader
*factory_trader_ptr_
;
53 /// debug level (0 = quiet, 1 = default, informative, 2+ = noisy);
57 #endif /* LIFECYCLE_SERVICE_IMPL_H */