2 //=============================================================================
4 * @file Generic_Factory_i.h
6 * A LifeCycle Service Generic Factory for the Quoter example.
8 * @author Michael Kircher (mk1@cs.wustl.edu)
10 //=============================================================================
16 #ifndef QUOTER_GENERIC_FACTORY_IMPL_H
17 #define QUOTER_GENERIC_FACTORY_IMPL_H
20 * @class Quoter_Generic_Factory_i
22 * A CosLifeCycle conforming Generic Factory for the Quoter
23 * example. It uses the Naming Service to find a fitting factory.
25 class Quoter_Generic_Factory_i
: public POA_Stock::Quoter_Generic_Factory
28 Quoter_Generic_Factory_i (int debug_level
= 1);
29 ~Quoter_Generic_Factory_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
);
44 /// a helper to get the proper naming context.
45 CosNaming::NamingContext_ptr
get_naming_context (const CosLifeCycle::Key
&factory_key
);
47 /// debug level (0 = quiet, 1 = default, informative, 2+ = noisy);
51 #endif /* QUOTER_GENERIC_FACTORY_IMPL_H */