![]() |
helics
3.3.0
|
#include <HandleManager.hpp>
Public Member Functions | |
HandleManager ()=default | |
BasicHandleInfo & | addHandle (GlobalFederateId fed_id, InterfaceType what, std::string_view key, std::string_view type, std::string_view units) |
BasicHandleInfo & | addHandle (GlobalFederateId fed_id, InterfaceHandle local_id, InterfaceType what, std::string_view key, std::string_view type, std::string_view units) |
void | addHandle (const BasicHandleInfo &otherHandle) |
void | addHandleAtIndex (const BasicHandleInfo &otherHandle, int32_t index) |
void | removeHandle (GlobalHandle handle) |
BasicHandleInfo * | getHandleInfo (int32_t index) |
const BasicHandleInfo * | getHandleInfo (int32_t index) const |
BasicHandleInfo * | getHandleInfo (InterfaceHandle handle) |
const BasicHandleInfo * | getHandleInfo (InterfaceHandle handle) const |
BasicHandleInfo * | findHandle (GlobalHandle id) |
const BasicHandleInfo * | findHandle (GlobalHandle id) const |
void | setHandleOption (InterfaceHandle handle, int32_t option, int32_t val) |
int32_t | getHandleOption (InterfaceHandle handle, int32_t option) const |
BasicHandleInfo * | getEndpoint (std::string_view name) |
const BasicHandleInfo * | getEndpoint (std::string_view name) const |
BasicHandleInfo * | getEndpoint (InterfaceHandle handle) |
const BasicHandleInfo * | getEndpoint (InterfaceHandle handle) const |
const BasicHandleInfo * | getFilter (std::string_view name) const |
BasicHandleInfo * | getFilter (std::string_view name) |
BasicHandleInfo * | getFilter (InterfaceHandle handle) |
const BasicHandleInfo * | getTranslator (std::string_view name) const |
BasicHandleInfo * | getTranslator (std::string_view name) |
BasicHandleInfo * | getTranslator (InterfaceHandle handle) |
BasicHandleInfo * | getPublication (std::string_view name) |
const BasicHandleInfo * | getPublication (std::string_view name) const |
BasicHandleInfo * | getPublication (InterfaceHandle handle) |
BasicHandleInfo * | getInput (std::string_view name) |
const BasicHandleInfo * | getInput (std::string_view name) const |
LocalFederateId | getLocalFedID (InterfaceHandle handle) const |
BasicHandleInfo & | operator[] (size_t index) |
const BasicHandleInfo & | operator[] (size_t index) const |
void | addAlias (std::string_view interfaceName, std::string_view alias) |
auto | begin () |
auto | end () |
auto | begin () const |
auto | end () const |
auto | size () 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::HandleManager::addAlias | ( | std::string_view | interfaceName, |
std::string_view | alias | ||
) |
add an alias for an interface*
interfaceName | the name of the interface to add an alias for |
alias | the new name by which an interface can be referenced |
std::runtime_error | if an alias is duplicated |
BasicHandleInfo & helics::HandleManager::addHandle | ( | GlobalFederateId | fed_id, |
InterfaceHandle | local_id, | ||
InterfaceType | what, | ||
std::string_view | key, | ||
std::string_view | type, | ||
std::string_view | units | ||
) |
add a handle to manage
BasicHandleInfo & helics::HandleManager::addHandle | ( | GlobalFederateId | fed_id, |
InterfaceType | what, | ||
std::string_view | key, | ||
std::string_view | type, | ||
std::string_view | units | ||
) |
add a handle to manage
References helics::InterfaceHandle::baseValue().
Referenced by addHandleAtIndex().
void helics::HandleManager::addHandleAtIndex | ( | const BasicHandleInfo & | otherHandle, |
int32_t | index | ||
) |
add a handle at the specified index
References addHandle(), and helics::isValidIndex().
BasicHandleInfo * helics::HandleManager::findHandle | ( | GlobalHandle | id | ) |
find a handle from both the federate and local id
const BasicHandleInfo * helics::HandleManager::findHandle | ( | GlobalHandle | id | ) | const |
find a const handle from both the federate and local id
BasicHandleInfo * helics::HandleManager::getEndpoint | ( | InterfaceHandle | handle | ) |
get an endpoint by index
References helics::InterfaceHandle::baseValue(), helics::ENDPOINT, and helics::isValidIndex().
const BasicHandleInfo * helics::HandleManager::getEndpoint | ( | InterfaceHandle | handle | ) | const |
get a const endpoint by index
References helics::InterfaceHandle::baseValue(), helics::ENDPOINT, and helics::isValidIndex().
BasicHandleInfo * helics::HandleManager::getEndpoint | ( | std::string_view | name | ) |
get an endpoint from its name
Referenced by helics::FilterFederate::processDestFilterReturn(), and helics::FilterFederate::processFilterReturn().
const BasicHandleInfo * helics::HandleManager::getEndpoint | ( | std::string_view | name | ) | const |
get an endpoint from its name
BasicHandleInfo * helics::HandleManager::getFilter | ( | InterfaceHandle | handle | ) |
get a filter by index
References helics::InterfaceHandle::baseValue(), helics::FILTER, and helics::isValidIndex().
const BasicHandleInfo * helics::HandleManager::getFilter | ( | std::string_view | name | ) | const |
get a const filter by name
BasicHandleInfo * helics::HandleManager::getHandleInfo | ( | int32_t | index | ) |
get a handle by index
References helics::isValidIndex().
const BasicHandleInfo * helics::HandleManager::getHandleInfo | ( | int32_t | index | ) | const |
get a const handle by index
References helics::isValidIndex().
BasicHandleInfo * helics::HandleManager::getHandleInfo | ( | InterfaceHandle | handle | ) |
get a handle by local interface handle
References helics::InterfaceHandle::baseValue(), and helics::isValidIndex().
const BasicHandleInfo * helics::HandleManager::getHandleInfo | ( | InterfaceHandle | handle | ) | const |
get a const handle by local interface handle
References helics::InterfaceHandle::baseValue(), and helics::isValidIndex().
BasicHandleInfo * helics::HandleManager::getPublication | ( | InterfaceHandle | handle | ) |
get a publication by index
References helics::InterfaceHandle::baseValue(), helics::isValidIndex(), and helics::PUBLICATION.
BasicHandleInfo * helics::HandleManager::getPublication | ( | std::string_view | name | ) |
get a publication by name
BasicHandleInfo * helics::HandleManager::getTranslator | ( | InterfaceHandle | handle | ) |
get a translator by index
References helics::InterfaceHandle::baseValue(), helics::isValidIndex(), and helics::TRANSLATOR.
void helics::HandleManager::removeHandle | ( | GlobalHandle | handle | ) |
remove the information at the specified handle
References helics::ENDPOINT, helics::FILTER, helics::INPUT, and helics::PUBLICATION.