Apache Celix
2.4.0
Apache Celix is a framework for C, C++14 and C++17 to develop dynamic modular software applications using component and in-process service-oriented programming.
|
Go to the documentation of this file.
32 #include "celix_dependency_manager.h"
34 namespace celix {
namespace dm {
69 typename std::enable_if<std::is_default_constructible<T>::value,
Component<T>&>::type
70 createComponent(std::string name = std::string{}, std::string uuid = {});
191 std::shared_ptr<Component<T>>
findComponent(
const std::string& uuid)
const;
221 std::vector<celix::dm::DependencyManagerInfo>
getInfos()
const;
226 Component<T>& createComponentInternal(std::string name, std::string uuid);
228 std::shared_ptr<celix_bundle_context_t> context;
229 std::shared_ptr<celix_dependency_manager_t> cDepMan;
230 mutable std::mutex mutex{};
231 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:59
Definition: DependencyManager.h:47
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:165
virtual ~DependencyManager()
Definition: DependencyManager_Impl.h:29
std::vector< celix::dm::DependencyManagerInfo > getInfos() const
Definition: DependencyManager_Impl.h:214
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:60
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