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

#include <UnknownHandleManager.hpp>

Public Types

using targetInfo = std::pair< global_handle, uint16_t >
 

Public Member Functions

 UnknownHandleManager ()=default
 
void addUnknownPublication (const std::string &key, global_handle target, uint16_t flags)
 
void addUnknownInput (const std::string &key, global_handle target, uint16_t flags)
 
void addUnknownEndpoint (const std::string &key, global_handle target, uint16_t flags)
 
void addUnknownFilter (const std::string &key, global_handle target, uint16_t flags)
 
void addDataLink (const std::string &source, const std::string &target)
 
void addSourceFilterLink (const std::string &filter, const std::string &endpoint)
 
void addDestinationFilterLink (const std::string &filter, const std::string &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< std::string > checkForLinks (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 (global_federate_id id)
 
bool hasUnknowns () const
 
bool hasNonOptionalUnknowns () const
 
bool hasRequiredUnknowns () const
 
void processRequiredUnknowns (std::function< void(const std::string &name, char type, global_handle)> cfunc) const
 
void processNonOptionalUnknowns (std::function< void(const std::string &name, char type, global_handle)> 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 ( const std::string &  source,
const std::string &  target 
)

add a data link where neither side is known

◆ addUnknownEndpoint()

void helics::UnknownHandleManager::addUnknownEndpoint ( const std::string &  key,
global_handle  target,
uint16_t  flags 
)

add a missing source endpoint

add a missing destination endpoint

◆ addUnknownFilter()

void helics::UnknownHandleManager::addUnknownFilter ( const std::string &  key,
global_handle  target,
uint16_t  flags 
)

add a missing source filter

add a missing filter

◆ addUnknownInput()

void helics::UnknownHandleManager::addUnknownInput ( const std::string &  key,
global_handle  target,
uint16_t  flags 
)

add a missingPublication

◆ addUnknownPublication()

void helics::UnknownHandleManager::addUnknownPublication ( const std::string &  key,
global_handle  target,
uint16_t  flags 
)

add a missingPublication

◆ 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

specify a found input

◆ 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

◆ clearEndpoint()

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

specify a found input

◆ clearFederateUnknowns()

void helics::UnknownHandleManager::clearFederateUnknowns ( global_federate_id  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 input

◆ hasNonOptionalUnknowns()

bool helics::UnknownHandleManager::hasNonOptionalUnknowns ( ) const

check if there are any unknowns remaining that do not specify that they are optional

References make_flags(), and optional_flag.

◆ hasRequiredUnknowns()

bool helics::UnknownHandleManager::hasRequiredUnknowns ( ) const

check if there are any unknowns remaining that specify they are required

References make_flags(), and required_flag.

◆ hasUnknowns()

bool helics::UnknownHandleManager::hasUnknowns ( ) const

check if there are any unknowns remaining

◆ processNonOptionalUnknowns()

void helics::UnknownHandleManager::processNonOptionalUnknowns ( std::function< void(const std::string &name, char type, global_handle)>  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 type 'p' for publication, 'i' for input, 'f' for filter, 'e' for endpoint and the global handle.

References make_flags(), and optional_flag.

◆ processRequiredUnknowns()

void helics::UnknownHandleManager::processRequiredUnknowns ( std::function< void(const std::string &name, char type, global_handle)>  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 type 'p' for publication, 'i' for input, 'f' for filter, 'e' for endpoint and the global handle.

References make_flags(), and required_flag.


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