$darkmode
engine::Registrar Class Reference
Inheritance diagram for engine::Registrar:
Collaboration diagram for engine::Registrar:

Public Member Functions

 Registrar (std::unique_ptr< ServerRegistrar > r, std::shared_ptr< Coordinator > c)
 
 Registrar (const Registrar &ar, const std::string &trigger_prefix, const std::string &static_prefix, const std::string &api_prefix)
 
void register_static_handler (const std::string &endpoint, cloe::Handler h) override
 
void register_api_handler (const std::string &endpoint, cloe::HandlerType t, cloe::Handler h) override
 
std::unique_ptr< cloe::Registrarclone () const
 
std::unique_ptr< cloe::Registrarwith_static_prefix (const std::string &prefix) const override
 
std::unique_ptr< cloe::Registrarwith_api_prefix (const std::string &prefix) const override
 
std::unique_ptr< cloe::Registrarwith_trigger_prefix (const std::string &prefix) const override
 
std::string trigger_key (const std::string &name)
 
void register_action (cloe::ActionFactoryPtr &&af) override
 
void register_event (cloe::EventFactoryPtr &&ef, std::shared_ptr< cloe::Callback > storage) override
 
- Public Member Functions inherited from cloe::Registrar
virtual void register_action (std::unique_ptr< ActionFactory > &&)=0
 
template<typename F , typename... Ctx>
void register_action (Ctx &&... ctx)
 
virtual void register_event (std::unique_ptr< EventFactory > &&f, std::shared_ptr< Callback > c)=0
 
template<typename F , typename... Ctx>
DirectCallbackPtr< typename F::EventType, Ctx... > register_event (std::unique_ptr< F > &&f)
 
template<typename F , typename... Ctx, typename... Args>
DirectCallbackPtr< typename F::EventType, Ctx... > register_event (Args... args)
 

Member Function Documentation

◆ register_api_handler()

void engine::Registrar::register_api_handler ( const std::string &  endpoint,
cloe::HandlerType  ,
cloe::Handler   
)
inlineoverridevirtual

Register a web handler that can be accessed at the given endpoint.

Currently, the endpoint should be a valid static path, starting with a slash "/". The root represents whatever receives the Registrar, e.g., the controller or simulator. Any endpoint registered will be prefixed to ensure identifiability.

Implements cloe::Registrar.

◆ register_static_handler()

void engine::Registrar::register_static_handler ( const std::string &  endpoint,
cloe::Handler   
)
inlineoverridevirtual

Register a static web handler that can be given at the endpoint.

Currently, the endpoint should be a valid static path, starting with a slash "/". The root represents whatever receives the Registrar, e.g., the controller or simulator. Any endpoint registered will be prefixed to ensure identifiability.

Implements cloe::Registrar.

◆ with_api_prefix()

std::unique_ptr<cloe::Registrar> engine::Registrar::with_api_prefix ( const std::string &  prefix) const
inlineoverridevirtual

Return a new Registrar with the given static handler prefix.

The returned object should remain valid even if the object creating it is destroyed.

Implements cloe::Registrar.

◆ with_static_prefix()

std::unique_ptr<cloe::Registrar> engine::Registrar::with_static_prefix ( const std::string &  prefix) const
inlineoverridevirtual

Return a new Registrar with the given dynamic handler prefix.

The returned object should remain valid even if the object creating it is destroyed.

Implements cloe::Registrar.

◆ with_trigger_prefix()

std::unique_ptr<cloe::Registrar> engine::Registrar::with_trigger_prefix ( const std::string &  prefix) const
inlineoverridevirtual

Return a new Registrar with the given trigger prefix.

The returned object should remain valid even if the object creating it is destroyed.

Implements cloe::Registrar.


The documentation for this class was generated from the following file: