Apache Celix
latest
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.
45 celix_properties_t *cProperties = celix_properties_create();
47 celix_properties_set(cProperties, pair.first.c_str(), pair.second.c_str());
64 "BaseProvidedService::wait: Cannot wait for Celix event queue on the Celix event queue thread! "
65 "Use async DepMan API instead.");
70 template<
typename T,
typename I>
72 svcVersion = std::move(v);
76 template<
typename T,
typename I>
78 properties = std::move(p);
82 template<
typename T,
typename I>
85 properties[key] = std::to_string(value);
89 template<
typename T,
typename I>
96 template<
typename T,
typename I>
102 template<
typename T,
typename I>
104 :
BaseProvidedService(_cmp, svcName, std::static_pointer_cast<void>(std::move(_svc)), _cppService) {
108 template<
typename T,
typename I>
110 properties[key] = std::string{value};
114 template<
typename T,
typename I>
116 properties[key] = value;
Definition: ProvidedService.h:57
bool cppService
Definition: ProvidedService.h:50
ProvidedService< T, I > & setVersion(std::string v)
Definition: ProvidedService_Impl.h:71
Definition: ProvidedService.h:29
std::string svcName
Definition: ProvidedService.h:48
ProvidedService(celix_dm_component_t *_cmp, std::string svcName, std::shared_ptr< I > svc, bool _cppService)
Definition: ProvidedService_Impl.h:103
bool provideAddedToCmp
Definition: ProvidedService.h:53
void wait() const
Definition: ProvidedService_Impl.h:56
std::shared_ptr< void > svc
Definition: ProvidedService.h:49
CELIX_FRAMEWORK_EXPORT void celix_bundleContext_waitForEvents(celix_bundle_context_t *ctx)
Wait until all Celix event for this bundle are completed.
const std::string & getVersion() const
Definition: ProvidedService_Impl.h:26
std::string svcVersion
Definition: ProvidedService.h:51
ProvidedService< T, I > & buildAsync()
Definition: ProvidedService_Impl.h:97
ProvidedService< T, I > & build()
Definition: ProvidedService_Impl.h:90
celix::dm::Properties properties
Definition: ProvidedService.h:52
CELIX_FRAMEWORK_EXPORT bool celix_framework_isCurrentThreadTheEventLoop(celix_framework_t *fw)
Returns whether the current thread is the Celix framework event loop thread.
CELIX_FRAMEWORK_EXPORT celix_status_t celix_dmComponent_addInterface(celix_dm_component_t *component, const char *serviceName, const char *serviceVersion, const void *service, celix_properties_t *properties)
CELIX_FRAMEWORK_EXPORT void celix_bundleContext_log(const celix_bundle_context_t *ctx, celix_log_level_e level, const char *format,...) __attribute__((format(printf
Logs a message to Celix framework logger with the provided log level.
const std::string & getName() const
Definition: ProvidedService_Impl.h:22
BaseProvidedService(celix_dm_component_t *_cmp, std::string svcName, std::shared_ptr< void > svc, bool _cppService)
Definition: ProvidedService_Impl.h:20
celix_dm_component_t * cCmp
Definition: ProvidedService.h:47
void runBuild()
Definition: ProvidedService_Impl.h:42
CELIX_FRAMEWORK_EXPORT celix_bundle_context_t * celix_dmComponent_getBundleContext(celix_dm_component_t *component)
celix::Properties Properties
Definition: Properties.h:25
CELIX_FRAMEWORK_EXPORT celix_framework_t * celix_bundleContext_getFramework(const celix_bundle_context_t *ctx)
ProvidedService< T, I > & addProperty(const std::string &key, const U &value)
ProvidedService< T, I > & setProperties(celix::dm::Properties)
Definition: ProvidedService_Impl.h:77
const celix::dm::Properties & getProperties() const
Definition: ProvidedService_Impl.h:38
bool isCppService() const
Definition: ProvidedService_Impl.h:30
void * getService() const
Definition: ProvidedService_Impl.h:34