libcosim 0.9.0
C++ library for distributed co-simulation
|
An interface for classes that resolve model URIs of one or more specific URI schemes. More...
#include <cosim/orchestration.hpp>
Public Member Functions | |
virtual std::shared_ptr< model > | lookup_model (const uri &baseUri, const uri &modelUriReference) |
Tries to resolve a model URI relative to some base URI. More... | |
virtual std::shared_ptr< model > | lookup_model (const uri &modelUri)=0 |
Tries to resolve a model URI. More... | |
An interface for classes that resolve model URIs of one or more specific URI schemes.
Examples could be a file URI resolver which handles URIs like file:///models/my_model.fmu
or an FMU-proxy URI resolver which handles URIs like fmu-proxy://sim.example.com:6345
.
Client code will normally not use this directly to resolve URIs, but rather as one of many sub-resolvers in a model_uri_resolver
.
|
virtual |
Tries to resolve a model URI relative to some base URI.
Returns a model
object for the model referred to by the resulting URI, or null if this resolver is not designed to handle such URIs. May also throw an exception if the URI would normally be handled, but the address resolution failed (e.g. due to I/O error).
modelUriReference
relative to baseUri
in an RFC 3986 compliant manner using cosim::resolve_uri_reference()
and forwards to lookup_model(const uri&)
. Specific sub-resolvers may override it to use non-standard resolution mechanisms.[in] | baseUri | An (absolute) base URI. |
[in] | modelUriReference | A model URI reference that will be resolved relative to baseUri . |
|
pure virtual |
Tries to resolve a model URI.
Returns a model
object for the model referred to by modelUri
, or null if this resolver is not designed to handle such URIs. May also throw an exception if the URI would normally be handled, but the address resolution failed (e.g. due to I/O error).
[in] | modelUri | An (absolute) model URI. |
Implemented in cosim::fmu_file_uri_sub_resolver.