| 1 | //
|
|---|
| 2 | // File: MPQC_ComponentFactory_Impl.hh
|
|---|
| 3 | // Symbol: MPQC.ComponentFactory-v0.2
|
|---|
| 4 | // Symbol Type: class
|
|---|
| 5 | // Babel Version: 0.10.2
|
|---|
| 6 | // Description: Server-side implementation for MPQC.ComponentFactory
|
|---|
| 7 | //
|
|---|
| 8 | // WARNING: Automatically generated; only changes within splicers preserved
|
|---|
| 9 | //
|
|---|
| 10 | // babel-version = 0.10.2
|
|---|
| 11 | //
|
|---|
| 12 |
|
|---|
| 13 | #ifndef included_MPQC_ComponentFactory_Impl_hh
|
|---|
| 14 | #define included_MPQC_ComponentFactory_Impl_hh
|
|---|
| 15 |
|
|---|
| 16 | #ifndef included_sidl_cxx_hh
|
|---|
| 17 | #include "sidl_cxx.hh"
|
|---|
| 18 | #endif
|
|---|
| 19 | #ifndef included_MPQC_ComponentFactory_IOR_h
|
|---|
| 20 | #include "MPQC_ComponentFactory_IOR.h"
|
|---|
| 21 | #endif
|
|---|
| 22 | //
|
|---|
| 23 | // Includes for all method dependencies.
|
|---|
| 24 | //
|
|---|
| 25 | #ifndef included_MPQC_ComponentFactory_hh
|
|---|
| 26 | #include "MPQC_ComponentFactory.hh"
|
|---|
| 27 | #endif
|
|---|
| 28 | #ifndef included_gov_cca_CCAException_hh
|
|---|
| 29 | #include "gov_cca_CCAException.hh"
|
|---|
| 30 | #endif
|
|---|
| 31 | #ifndef included_gov_cca_Component_hh
|
|---|
| 32 | #include "gov_cca_Component.hh"
|
|---|
| 33 | #endif
|
|---|
| 34 | #ifndef included_gov_cca_ComponentClassDescription_hh
|
|---|
| 35 | #include "gov_cca_ComponentClassDescription.hh"
|
|---|
| 36 | #endif
|
|---|
| 37 | #ifndef included_sidl_BaseInterface_hh
|
|---|
| 38 | #include "sidl_BaseInterface.hh"
|
|---|
| 39 | #endif
|
|---|
| 40 | #ifndef included_sidl_ClassInfo_hh
|
|---|
| 41 | #include "sidl_ClassInfo.hh"
|
|---|
| 42 | #endif
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 | // DO-NOT-DELETE splicer.begin(MPQC.ComponentFactory._includes)
|
|---|
| 46 | // Put additional includes or other arbitrary code here...
|
|---|
| 47 | // DO-NOT-DELETE splicer.end(MPQC.ComponentFactory._includes)
|
|---|
| 48 |
|
|---|
| 49 | namespace MPQC {
|
|---|
| 50 |
|
|---|
| 51 | /**
|
|---|
| 52 | * Symbol "MPQC.ComponentFactory" (version 0.2)
|
|---|
| 53 | */
|
|---|
| 54 | class ComponentFactory_impl
|
|---|
| 55 | // DO-NOT-DELETE splicer.begin(MPQC.ComponentFactory._inherits)
|
|---|
| 56 |
|
|---|
| 57 | /** ComponentFactory implements a CCA standard component
|
|---|
| 58 | interface for component factories. This class is used to
|
|---|
| 59 | inform the embedded framework of available components in a
|
|---|
| 60 | statically linked executable.
|
|---|
| 61 |
|
|---|
| 62 | This is an implementation of a SIDL interface.
|
|---|
| 63 | The stub code is generated by the Babel tool. Do not make
|
|---|
| 64 | modifications outside of splicer blocks, as these will be lost.
|
|---|
| 65 | This is a server implementation for a Babel class, the Babel
|
|---|
| 66 | client code is provided by the cca-spec-babel package.
|
|---|
| 67 | */
|
|---|
| 68 |
|
|---|
| 69 | // DO-NOT-DELETE splicer.end(MPQC.ComponentFactory._inherits)
|
|---|
| 70 | {
|
|---|
| 71 |
|
|---|
| 72 | private:
|
|---|
| 73 | // Pointer back to IOR.
|
|---|
| 74 | // Use this to dispatch back through IOR vtable.
|
|---|
| 75 | ComponentFactory self;
|
|---|
| 76 |
|
|---|
| 77 | // DO-NOT-DELETE splicer.begin(MPQC.ComponentFactory._implementation)
|
|---|
| 78 | std::vector< gov::cca::ComponentClassDescription > descriptions;
|
|---|
| 79 | // DO-NOT-DELETE splicer.end(MPQC.ComponentFactory._implementation)
|
|---|
| 80 |
|
|---|
| 81 | private:
|
|---|
| 82 | // private default constructor (required)
|
|---|
| 83 | ComponentFactory_impl()
|
|---|
| 84 | {}
|
|---|
| 85 |
|
|---|
| 86 | public:
|
|---|
| 87 | // sidl constructor (required)
|
|---|
| 88 | // Note: alternate Skel constructor doesn't call addref()
|
|---|
| 89 | // (fixes bug #275)
|
|---|
| 90 | ComponentFactory_impl( struct MPQC_ComponentFactory__object * s ) : self(s,
|
|---|
| 91 | true) { _ctor(); }
|
|---|
| 92 |
|
|---|
| 93 | // user defined construction
|
|---|
| 94 | void _ctor();
|
|---|
| 95 |
|
|---|
| 96 | // virtual destructor (required)
|
|---|
| 97 | virtual ~ComponentFactory_impl() { _dtor(); }
|
|---|
| 98 |
|
|---|
| 99 | // user defined destruction
|
|---|
| 100 | void _dtor();
|
|---|
| 101 |
|
|---|
| 102 | // static class initializer
|
|---|
| 103 | static void _load();
|
|---|
| 104 |
|
|---|
| 105 | public:
|
|---|
| 106 |
|
|---|
| 107 | /**
|
|---|
| 108 | * user defined non-static method.
|
|---|
| 109 | */
|
|---|
| 110 | void
|
|---|
| 111 | addDescription (
|
|---|
| 112 | /* in */ const ::std::string& className,
|
|---|
| 113 | /* in */ const ::std::string& classAlias
|
|---|
| 114 | )
|
|---|
| 115 | throw ()
|
|---|
| 116 | ;
|
|---|
| 117 |
|
|---|
| 118 |
|
|---|
| 119 | /**
|
|---|
| 120 | * Collect the currently obtainable class name strings from
|
|---|
| 121 | * factories known to the builder and the from the
|
|---|
| 122 | * already instantiated components.
|
|---|
| 123 | * @return The list of class description, which may be empty, that are
|
|---|
| 124 | * known a priori to contain valid values for the className
|
|---|
| 125 | * argument of createInstance.
|
|---|
| 126 | * @throws CCAException in the event of error.
|
|---|
| 127 | */
|
|---|
| 128 | ::sidl::array< ::gov::cca::ComponentClassDescription>
|
|---|
| 129 | getAvailableComponentClasses() throw (
|
|---|
| 130 | ::gov::cca::CCAException
|
|---|
| 131 | );
|
|---|
| 132 |
|
|---|
| 133 | /**
|
|---|
| 134 | * the component instance returned is nil if the name is unknown
|
|---|
| 135 | * to the factory. The component is raw: it has been constructed
|
|---|
| 136 | * but not initialized via setServices.
|
|---|
| 137 | */
|
|---|
| 138 | ::gov::cca::Component
|
|---|
| 139 | createComponentInstance (
|
|---|
| 140 | /* in */ const ::std::string& className
|
|---|
| 141 | )
|
|---|
| 142 | throw ()
|
|---|
| 143 | ;
|
|---|
| 144 |
|
|---|
| 145 |
|
|---|
| 146 | /**
|
|---|
| 147 | * reclaim any resources the factory may have associated with
|
|---|
| 148 | * the port it is using. This will occur after the
|
|---|
| 149 | * normal component shutdown (ala componentrelease) is finished.
|
|---|
| 150 | */
|
|---|
| 151 | void
|
|---|
| 152 | destroyComponentInstance (
|
|---|
| 153 | /* in */ const ::std::string& className,
|
|---|
| 154 | /* in */ ::gov::cca::Component c
|
|---|
| 155 | )
|
|---|
| 156 | throw ()
|
|---|
| 157 | ;
|
|---|
| 158 |
|
|---|
| 159 | }; // end class ComponentFactory_impl
|
|---|
| 160 |
|
|---|
| 161 | } // end namespace MPQC
|
|---|
| 162 |
|
|---|
| 163 | // DO-NOT-DELETE splicer.begin(MPQC.ComponentFactory._misc)
|
|---|
| 164 | // Put miscellaneous things here...
|
|---|
| 165 | // DO-NOT-DELETE splicer.end(MPQC.ComponentFactory._misc)
|
|---|
| 166 |
|
|---|
| 167 | #endif
|
|---|