Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
API changes in version 2.0.0
This page lists the changes in the CppMicroServices 2.0.0 library.
- Removed the base class requirement for service objects.
- Improved compile time type checking when working with the service registry.
- Added a new service factory class for creating multiple service instances based on RFC 195 Service Scopes.
- Added ModuleFindHook and ModuleEventHook classes.
- Added Service Hooks support.
- Added the utility class us::LDAPProp for creating LDAP filter strings fluently.
- Added support for getting file locations for writing persistent data via us::ModuleContext::GetDataFile(const std::string&).
Changes in C++ classes
us::ServiceReference is now a class template over the service interface type. Example:
us::ServiceReference<A> ref = context->GetServiceReference<A>()
us::ServiceRegistration is now a class template over the service interface type(s). Example:
us::ServiceRegistration<A,B> reg = context->RegisterService<A,B>(service)
- The template argument for the function template us_service_interface_iid should now be a plain type instead of a pointer type, e.g.
- The requirements for the template arguments of the class template us::ServiceTracker changed. The first one should now be a plain type instead of a pointer type and the second one is a type traits class for the tracked type, see us::TrackedTypeTraitsBase:
- Many methods returning or expecting a
std::listto return a list of objects now return a
- The objectClass service property now expects a
std::vector<std::string>instead of a
- The GetModules and GetLoadedModules methods of the us::ModuleRegistry class now return a
std::vectorinstead of taking a reference as an argument.
- Typedefs ending with a T have been removed to end with Type instead. E.g.
TrackedTwas renamed to
The free method
std::ostream& operator<<(std::ostream& os, const us::Any& any) was removed because implicit type conversions to
us::Any could lead to complications. Use
us::Any::ToString() directly instead.