helics
3.5.2
|
#include <UnknownHandleManager.hpp>
Public Types | |
using | TargetInfo = std::pair< GlobalHandle, uint16_t > |
Public Member Functions | |
UnknownHandleManager ()=default | |
void | addUnknownPublication (std::string_view key, GlobalHandle target, uint16_t flags) |
void | addUnknownInput (std::string_view key, GlobalHandle target, uint16_t flags) |
void | addUnknownEndpoint (std::string_view key, GlobalHandle target, uint16_t flags) |
void | addUnknownFilter (std::string_view key, GlobalHandle target, uint16_t flags) |
void | addReconnectablePublication (std::string_view key, GlobalHandle target, uint16_t flags) |
void | addReconnectableInput (std::string_view key, GlobalHandle target, uint16_t flags) |
void | addReconnectableEndpoint (std::string_view key, GlobalHandle target, uint16_t flags) |
void | addReconnectableFilter (std::string_view key, GlobalHandle target, uint16_t flags) |
void | addDataLink (std::string_view source, std::string_view target) |
void | addEndpointLink (std::string_view source, std::string_view target) |
void | addSourceFilterLink (std::string_view filter, std::string_view endpoint) |
void | addDestinationFilterLink (std::string_view filter, std::string_view endpoint) |
std::vector< TargetInfo > | checkForInputs (const std::string &newInput) const |
std::vector< TargetInfo > | checkForPublications (const std::string &newPublication) const |
std::vector< TargetInfo > | checkForEndpoints (const std::string &newEndpoint) const |
std::vector< TargetInfo > | checkForFilters (const std::string &newFilter) const |
std::vector< TargetInfo > | checkForReconnectionInputs (const std::string &newInput) const |
std::vector< TargetInfo > | checkForReconnectionPublications (const std::string &newPublication) const |
std::vector< TargetInfo > | checkForReconnectionEndpoints (const std::string &newEndpoint) const |
std::vector< TargetInfo > | checkForReconnectionFilters (const std::string &newFilter) const |
std::vector< std::string > | checkForLinks (const std::string &newSource) const |
std::vector< std::string > | checkForEndpointLinks (const std::string &newSource) const |
std::vector< std::string > | checkForFilterSourceTargets (const std::string &newFilter) const |
std::vector< std::string > | checkForFilterDestTargets (const std::string &newFilter) const |
void | clearInput (const std::string &newInput) |
void | clearPublication (const std::string &newPublication) |
void | clearEndpoint (const std::string &newEndpoint) |
void | clearFilter (const std::string &newFilter) |
void | clearFederateUnknowns (GlobalFederateId id) |
void | clearUnknownsIf (const std::function< bool(const std::string &name, InterfaceType, TargetInfo)> &cfunc) |
bool | hasUnknowns () const |
bool | hasNonOptionalUnknowns () const |
bool | hasRequiredUnknowns () const |
void | processRequiredUnknowns (const std::function< void(const std::string &name, InterfaceType, TargetInfo)> &cfunc) const |
void | processNonOptionalUnknowns (const std::function< void(const std::string &name, InterfaceType, TargetInfo)> &cfunc) const |
void | processUnknowns (const std::function< void(const std::string &name, InterfaceType, TargetInfo)> &cfunc) const |
void | processUnknownLinks (const std::function< void(const std::string &origin, InterfaceType, const std::string &target, InterfaceType)> &cfunc) const |
class for managing a coordinating the different types of handles used in helics
this class is not designed to be thread safe that would require a wrapper around it
|
default |
default constructor
void helics::UnknownHandleManager::addDataLink | ( | std::string_view | source, |
std::string_view | target | ||
) |
add a data link where neither side is known
void helics::UnknownHandleManager::addEndpointLink | ( | std::string_view | source, |
std::string_view | target | ||
) |
add an endpoint link where neither side is known
void helics::UnknownHandleManager::addReconnectableEndpoint | ( | std::string_view | key, |
GlobalHandle | target, | ||
uint16_t | flags | ||
) |
add a reconnectable endpoint
add a missing destination endpoint
void helics::UnknownHandleManager::addReconnectableFilter | ( | std::string_view | key, |
GlobalHandle | target, | ||
uint16_t | flags | ||
) |
add a reconnectable filter
add a missing filter
void helics::UnknownHandleManager::addReconnectableInput | ( | std::string_view | key, |
GlobalHandle | target, | ||
uint16_t | flags | ||
) |
add a reconnectable Input
add a missing publication
void helics::UnknownHandleManager::addReconnectablePublication | ( | std::string_view | key, |
GlobalHandle | target, | ||
uint16_t | flags | ||
) |
add a reconnectable Publication
void helics::UnknownHandleManager::addUnknownEndpoint | ( | std::string_view | key, |
GlobalHandle | target, | ||
uint16_t | flags | ||
) |
add a missing endpoint
add a missing destination endpoint
void helics::UnknownHandleManager::addUnknownFilter | ( | std::string_view | key, |
GlobalHandle | target, | ||
uint16_t | flags | ||
) |
add a missing source filter
add a missing filter
void helics::UnknownHandleManager::addUnknownInput | ( | std::string_view | key, |
GlobalHandle | target, | ||
uint16_t | flags | ||
) |
add a missing Input
add a missingPublication
void helics::UnknownHandleManager::addUnknownPublication | ( | std::string_view | key, |
GlobalHandle | target, | ||
uint16_t | flags | ||
) |
add a missing Publication
add a missingPublication
std::vector< std::string > helics::UnknownHandleManager::checkForEndpointLinks | ( | const std::string & | newSource | ) | const |
specify found endpoint links
std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForEndpoints | ( | const std::string & | newEndpoint | ) | const |
specify a found input
std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForFilters | ( | const std::string & | newFilter | ) | const |
specify a found Source Filter
std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForInputs | ( | const std::string & | newInput | ) | const |
specify a found input
std::vector< std::string > helics::UnknownHandleManager::checkForLinks | ( | const std::string & | newSource | ) | const |
specify found data links
std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForPublications | ( | const std::string & | newPublication | ) | const |
specify a found input
std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForReconnectionEndpoints | ( | const std::string & | newEndpoint | ) | const |
specify a found input
std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForReconnectionFilters | ( | const std::string & | newFilter | ) | const |
specify a found Source Filter
std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForReconnectionInputs | ( | const std::string & | newInput | ) | const |
specify a found input
std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForReconnectionPublications | ( | const std::string & | newPublication | ) | const |
specify a found input
void helics::UnknownHandleManager::clearEndpoint | ( | const std::string & | newEndpoint | ) |
specify a found endpoint
specify a found input
void helics::UnknownHandleManager::clearFederateUnknowns | ( | GlobalFederateId | id | ) |
clear all unknowns belonging to a certain federate
void helics::UnknownHandleManager::clearFilter | ( | const std::string & | newFilter | ) |
specify a found source filter
specify a found input
void helics::UnknownHandleManager::clearInput | ( | const std::string & | newInput | ) |
specify a found input
void helics::UnknownHandleManager::clearPublication | ( | const std::string & | newPublication | ) |
specify a found publication
specify a found input
void helics::UnknownHandleManager::clearUnknownsIf | ( | const std::function< bool(const std::string &name, InterfaceType, TargetInfo)> & | cfunc | ) |
clear unknowns if callback is true
References helics::ENDPOINT, helics::FILTER, helics::INPUT, and helics::PUBLICATION.
bool helics::UnknownHandleManager::hasNonOptionalUnknowns | ( | ) | const |
check if there are any unknowns remaining that do not specify that they are optional
References helics::make_flags(), and helics::optional_flag.
bool helics::UnknownHandleManager::hasRequiredUnknowns | ( | ) | const |
check if there are any unknowns remaining that specify they are required
References helics::make_flags(), and helics::required_flag.
bool helics::UnknownHandleManager::hasUnknowns | ( | ) | const |
check if there are any unknowns remaining
void helics::UnknownHandleManager::processNonOptionalUnknowns | ( | const std::function< void(const std::string &name, InterfaceType, TargetInfo)> & | cfunc | ) | const |
run a callback for each non optional Unknown
cfunc | a callback function with the signature of the name of the required interface a character with the interface type and the global handle. |
References helics::ENDPOINT, helics::FILTER, helics::INPUT, helics::make_flags(), helics::optional_flag, and helics::PUBLICATION.
void helics::UnknownHandleManager::processRequiredUnknowns | ( | const std::function< void(const std::string &name, InterfaceType, TargetInfo)> & | cfunc | ) | const |
run a callback for each requiredUnknown
cfunc | a callback function with the signature of the name of the required interface a character with the interface type and the global handle. |
References helics::ENDPOINT, helics::FILTER, helics::INPUT, helics::make_flags(), helics::PUBLICATION, and helics::required_flag.
void helics::UnknownHandleManager::processUnknownLinks | ( | const std::function< void(const std::string &origin, InterfaceType, const std::string &target, InterfaceType)> & | cfunc | ) | const |
run a callback for each Unknown Link
cfunc | a callback function with the signature of the name of the interface, the interface type, the name of the target, and type of the target. |
References helics::ENDPOINT, helics::FILTER, helics::INPUT, and helics::PUBLICATION.
void helics::UnknownHandleManager::processUnknowns | ( | const std::function< void(const std::string &name, InterfaceType, TargetInfo)> & | cfunc | ) | const |
run a callback for each Unknown
cfunc | a callback function with the signature of the name of the required interface, a character with the interface type and the global handle. |
References helics::ENDPOINT, helics::FILTER, helics::INPUT, and helics::PUBLICATION.