helics  3.5.2
Public Types | Public Member Functions | List of all members
helics::UnknownHandleManager Class Reference

#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
 

Detailed Description

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

Constructor & Destructor Documentation

◆ UnknownHandleManager()

helics::UnknownHandleManager::UnknownHandleManager ( )
default

default constructor

Member Function Documentation

◆ addDataLink()

void helics::UnknownHandleManager::addDataLink ( std::string_view  source,
std::string_view  target 
)

add a data link where neither side is known

◆ addEndpointLink()

void helics::UnknownHandleManager::addEndpointLink ( std::string_view  source,
std::string_view  target 
)

add an endpoint link where neither side is known

◆ addReconnectableEndpoint()

void helics::UnknownHandleManager::addReconnectableEndpoint ( std::string_view  key,
GlobalHandle  target,
uint16_t  flags 
)

add a reconnectable endpoint

add a missing destination endpoint

◆ addReconnectableFilter()

void helics::UnknownHandleManager::addReconnectableFilter ( std::string_view  key,
GlobalHandle  target,
uint16_t  flags 
)

add a reconnectable filter

add a missing filter

◆ addReconnectableInput()

void helics::UnknownHandleManager::addReconnectableInput ( std::string_view  key,
GlobalHandle  target,
uint16_t  flags 
)

add a reconnectable Input

add a missing publication

◆ addReconnectablePublication()

void helics::UnknownHandleManager::addReconnectablePublication ( std::string_view  key,
GlobalHandle  target,
uint16_t  flags 
)

add a reconnectable Publication

◆ addUnknownEndpoint()

void helics::UnknownHandleManager::addUnknownEndpoint ( std::string_view  key,
GlobalHandle  target,
uint16_t  flags 
)

add a missing endpoint

add a missing destination endpoint

◆ addUnknownFilter()

void helics::UnknownHandleManager::addUnknownFilter ( std::string_view  key,
GlobalHandle  target,
uint16_t  flags 
)

add a missing source filter

add a missing filter

◆ addUnknownInput()

void helics::UnknownHandleManager::addUnknownInput ( std::string_view  key,
GlobalHandle  target,
uint16_t  flags 
)

add a missing Input

add a missingPublication

◆ addUnknownPublication()

void helics::UnknownHandleManager::addUnknownPublication ( std::string_view  key,
GlobalHandle  target,
uint16_t  flags 
)

add a missing Publication

add a missingPublication

◆ checkForEndpointLinks()

std::vector< std::string > helics::UnknownHandleManager::checkForEndpointLinks ( const std::string &  newSource) const

specify found endpoint links

◆ checkForEndpoints()

std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForEndpoints ( const std::string &  newEndpoint) const

specify a found input

◆ checkForFilters()

std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForFilters ( const std::string &  newFilter) const

specify a found Source Filter

◆ checkForInputs()

std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForInputs ( const std::string &  newInput) const

specify a found input

◆ checkForLinks()

std::vector< std::string > helics::UnknownHandleManager::checkForLinks ( const std::string &  newSource) const

specify found data links

◆ checkForPublications()

std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForPublications ( const std::string &  newPublication) const

specify a found input

◆ checkForReconnectionEndpoints()

std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForReconnectionEndpoints ( const std::string &  newEndpoint) const

specify a found input

◆ checkForReconnectionFilters()

std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForReconnectionFilters ( const std::string &  newFilter) const

specify a found Source Filter

◆ checkForReconnectionInputs()

std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForReconnectionInputs ( const std::string &  newInput) const

specify a found input

◆ checkForReconnectionPublications()

std::vector< UnknownHandleManager::TargetInfo > helics::UnknownHandleManager::checkForReconnectionPublications ( const std::string &  newPublication) const

specify a found input

◆ clearEndpoint()

void helics::UnknownHandleManager::clearEndpoint ( const std::string &  newEndpoint)

specify a found endpoint

specify a found input

◆ clearFederateUnknowns()

void helics::UnknownHandleManager::clearFederateUnknowns ( GlobalFederateId  id)

clear all unknowns belonging to a certain federate

◆ clearFilter()

void helics::UnknownHandleManager::clearFilter ( const std::string &  newFilter)

specify a found source filter

specify a found input

◆ clearInput()

void helics::UnknownHandleManager::clearInput ( const std::string &  newInput)

specify a found input

◆ clearPublication()

void helics::UnknownHandleManager::clearPublication ( const std::string &  newPublication)

specify a found publication

specify a found input

◆ clearUnknownsIf()

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.

◆ hasNonOptionalUnknowns()

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.

◆ hasRequiredUnknowns()

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.

◆ hasUnknowns()

bool helics::UnknownHandleManager::hasUnknowns ( ) const

check if there are any unknowns remaining

◆ processNonOptionalUnknowns()

void helics::UnknownHandleManager::processNonOptionalUnknowns ( const std::function< void(const std::string &name, InterfaceType, TargetInfo)> &  cfunc) const

run a callback for each non optional Unknown

Parameters
cfunca 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.

◆ processRequiredUnknowns()

void helics::UnknownHandleManager::processRequiredUnknowns ( const std::function< void(const std::string &name, InterfaceType, TargetInfo)> &  cfunc) const

run a callback for each requiredUnknown

Parameters
cfunca 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.

◆ processUnknownLinks()

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

Parameters
cfunca 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.

◆ processUnknowns()

void helics::UnknownHandleManager::processUnknowns ( const std::function< void(const std::string &name, InterfaceType, TargetInfo)> &  cfunc) const

run a callback for each Unknown

Parameters
cfunca 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.


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