--- deployment/DeploymentComponent.hpp 2008-10-31 17:51:52.000000000 +0100 +++ DeploymentComponent.hpp 2008-09-16 12:30:27.000000000 +0200 @@ -38,7 +38,6 @@ #include #include #include -#include namespace OCL { @@ -77,7 +76,7 @@ : instance(0), act(0), loaded(false), autostart(false), autoconf(false), autoconnect(false), proxy(false), server(false), - use_naming(true),type("") + use_naming(true) {} /** * The component instance. This is always a valid pointer. @@ -96,7 +95,6 @@ bool loaded; bool autostart, autoconf, autoconnect; bool proxy, server, use_naming; - std::string type; }; /** @@ -125,28 +123,14 @@ * Keep a list of all loaded libraries such that double * loads are avoided during import/loadLibrary. */ - class LoadedLib{ - public: - LoadedLib(std::string n, void* h) - { - name = n; - handle = h; - } - std::string name; - void* handle; - std::vector components_type; - }; - - static std::vector< LoadedLib > loadedLibs; - - + static std::vector > LoadedLibs; /** * Handle of last loaded library. */ void* handle; /** - * Name of last loaded library. + * Name of last loaded libarary. */ std::string libname; @@ -156,15 +140,6 @@ bool configureHook(); /** - * This method removes all references to the component hold in \a cit, - * on the condition that it is not running. - * When this method returns true, you need to remove \a cit yourself from - * the this->conmap. - */ - bool unloadComponentImpl( CompList::iterator cit ); - - - /** * Hook function for subclasses. Allows a subclass * to abort or extend the loading of a component. * By default, this function returns true. @@ -177,8 +152,6 @@ ~DeploymentComponent(); - TaskContext* myGetPeer(std::string name) {return comps[ name ].instance; } - /** * Establish a bidirectional connection between two tasks. * @@ -470,53 +443,6 @@ * for the DeploymentComponent. */ FactoryMap& getFactories(); - - /** - * Stop a single loaded and running component. - * @param instance instance pointer of the component. - * @return true if successfully stopped. - */ - bool stopComponent(RTT::TaskContext *instance); - - /** - * Stop a single loaded and running components. - * @param comp_name name of the component. - * @return true if successfully stopped - */ - bool stopComponent(const std::string& comp_name) - { - return this->stopComponent( this->getPeer(comp_name) ); - } - - /** - * Cleanup a single loaded and not running component. - * @param instance instance pointer of the component. - * @return true if successfully cleaned up - */ - bool cleanupComponent(RTT::TaskContext *instance); - - /** - * Cleanup a single loaded and not running component. - * @param comp_name name of the component. - * @return true if successfully cleaned up - */ - bool cleanupComponent(const std::string& comp_name) - { - return this->cleanupComponent( this->getPeer(comp_name) ); - } - - /** - * Stop, cleanup and unload a single component which were loaded by this component. - * @param comp_name name of the component. - * @return true if successfully stopped, cleaned and unloaded - */ - bool kickOutComponent(const std::string& comp_name); - - /** - * Identical to \a kickOut, but it read the name of the Components to kickOut from a XML file - * @param config_file name of an XML file (probably the same used by loadComponents() ). - */ - void kickOutFile(const std::string& config_file); };