Apache Celix
2.3.0
An implementation of the OSGi specification adapted to C and C++
|
Go to the documentation of this file.
31 #include "bundle_context.h"
33 #include "celix_dependency_manager.h"
35 namespace celix {
namespace dm {
70 typename std::enable_if<std::is_default_constructible<T>::value,
Component<T>&>::type
71 createComponent(std::string name = std::string{}, std::string uuid = {});
189 std::shared_ptr<Component<T>>
findComponent(
const std::string& uuid)
const;
219 std::vector<celix::dm::DependencyManagerInfo>
getInfos()
const;
224 Component<T>& createComponentInternal(std::string name, std::string uuid);
226 std::shared_ptr<celix_bundle_context_t> context;
227 std::shared_ptr<celix_dependency_manager_t> cDepMan;
228 mutable std::mutex mutex{};
229 std::vector<std::shared_ptr<BaseComponent>> components{};
bool removeComponent(const std::string &uuid)
Removes component with provided UUID from the dependency manager and wail until the component is dest...
Definition: DependencyManager_Impl.h:87
celix_bundle_context_t * bundleContext() const
Definition: DependencyManager.h:60
Definition: DependencyManager.h:48
void wait() const
Wait for an empty Celix event queue.
Definition: DependencyManager_Impl.h:123
void start()
Definition: DependencyManager_Impl.h:67
DependencyManager & operator=(DependencyManager &&rhs)=delete
std::ostream & operator<<(std::ostream &out, const BaseComponent &cmp)
Definition: Component_Impl.h:54
void waitIfAble() const
Wait (if not called on the Celix event thread) for an empty Celix event queue.
Definition: DependencyManager_Impl.h:127
celix::dm::DependencyManagerInfo getInfo() const
Definition: DependencyManager_Impl.h:202
void stop()
Definition: DependencyManager_Impl.h:134
void build()
Definition: DependencyManager_Impl.h:71
void buildAsync()
Definition: DependencyManager_Impl.h:76
void destroyComponent(BaseComponent &component)
Removes a component from the Dependency Manager and wait until the component is destroyed.
Definition: DependencyManager_Impl.h:83
friend std::ostream & operator<<(std::ostream &out, const DependencyManager &mng)
std::shared_ptr< Component< T > > findComponent(const std::string &uuid) const
Definition: DependencyManager_Impl.h:143
Definition: Component.h:163
virtual ~DependencyManager()
Definition: DependencyManager_Impl.h:29
std::vector< celix::dm::DependencyManagerInfo > getInfos() const
Definition: DependencyManager_Impl.h:210
std::size_t getNrOfComponents() const
Definition: DependencyManager_Impl.h:138
void clearAsync()
Definition: DependencyManager_Impl.h:114
bool removeComponentAsync(const std::string &uuid)
Removes a component from the Dependency Manager and destroys it async.
Definition: DependencyManager_Impl.h:93
celix_dependency_manager_t * cDependencyManager() const
Definition: DependencyManager.h:61
void clear()
Clears the dependency manager, which removes all configured components and waits until all components...
Definition: DependencyManager_Impl.h:109
std::enable_if< std::is_default_constructible< T >::value, Component< T > & >::type createComponent(std::string name=std::string{}, std::string uuid={})
Definition: DependencyManager_Impl.h:48
DependencyManager(celix_bundle_context_t *ctx)
Definition: DependencyManager_Impl.h:25
Definition: Component.h:57
Definition: DependencyManagerInfo.h:126