28 #include <boost/type_index.hpp> 30 #include <type_traits> 82 std::lock_guard<std::mutex> lg(mutex_);
84 ASSERT_LOG(backends_.count(controller_module) == 0,
85 "A backend for this module is already registered.");
86 backends_[controller_module] = backend;
91 std::lock_guard<std::mutex> lg(mutex_);
93 backends_.erase(controller_module);
void register_backend(const std::string &controller_module, AccessPointBackend *backend)
Register an AccessPointBackend for controller_module.
This is the header file for a generated source file, GitSHA1.cpp.
Provides dynamic serializers management for a given object's hierarchy.
virtual json update(SecurityContext &sec_ctx, Audit::IAuditEntryPtr, const json &req, IAccessPointPtr ap)=0
std::shared_ptr< IAuditEntry > IAuditEntryPtr
std::shared_ptr< IAccessPoint > IAccessPointPtr
An AccessPointBackend object is used for module to provide implementation for access point CRUD opera...
This service lets various AccessPoint backend register and provide implementation to use by the Acces...
A SecurityContext is used to query permission while doing an operation.
void unregister_backend(const std::string &controller_module)
#define ASSERT_LOG(cond, msg)
virtual json create(SecurityContext &sec_ctx, Audit::IAuditEntryPtr, const json &req)=0
virtual json erase(SecurityContext &sec_ctx, Audit::IAuditEntryPtr, const json &req, IAccessPointPtr ap)=0
std::map< std::string, AccessPointBackend * > backends_
The various backend for various type of AccessPoint.