8 #include "BasicHandleInfo.hpp"
14 #include <string_view>
15 #include <unordered_map>
16 #include <unordered_set>
27 using MapType = std::unordered_map<std::string_view, InterfaceHandle>;
35 std::deque<BasicHandleInfo> handles;
42 std::unordered_map<std::uint64_t, int32_t> unique_ids;
44 std::unordered_map<std::string_view, std::vector<std::string_view>> aliases;
45 std::unordered_set<std::string> alias_names;
53 std::string_view type,
54 std::string_view units);
60 std::string_view type,
61 std::string_view units);
83 void setHandleOption(
InterfaceHandle handle, int32_t option, int32_t val);
100 const BasicHandleInfo& operator[](
size_t index)
const {
return handles[index]; }
105 void addAlias(std::string_view interfaceName, std::string_view alias);
106 auto begin() {
return handles.begin(); }
107 auto end() {
return handles.end(); }
108 auto begin()
const {
return handles.begin(); }
109 auto end()
const {
return handles.end(); }
110 auto size()
const {
return handles.size(); }
112 std::vector<GlobalHandle> regexSearch(
const std::string& regexExpression,
115 const std::unordered_map<std::string_view, std::vector<std::string_view>>&
getAliases()
const
124 void addPublicationAlias(std::string_view interfaceName, std::string_view alias);
126 void addInputAlias(std::string_view interfaceName, std::string_view alias);
128 void addEndpointAlias(std::string_view interfaceName, std::string_view alias);
130 void addFilterAlias(std::string_view interfaceName, std::string_view alias);
135 bool addAliasName(std::string_view interfaceName, std::string_view alias);
Definition: BasicHandleInfo.hpp:20
Definition: GlobalFederateId.hpp:75
Definition: GlobalFederateId.hpp:147
Definition: HandleManager.hpp:25
BasicHandleInfo * findHandle(GlobalHandle id)
Definition: HandleManager.cpp:148
void addHandleAtIndex(const BasicHandleInfo &otherHandle, int32_t index)
Definition: HandleManager.cpp:97
const std::unordered_map< std::string_view, std::vector< std::string_view > > & getAliases() const
Definition: HandleManager.hpp:115
void addAlias(std::string_view interfaceName, std::string_view alias)
Definition: HandleManager.cpp:400
void removeHandle(GlobalHandle handle)
Definition: HandleManager.cpp:47
BasicHandleInfo & addHandle(GlobalFederateId fed_id, InterfaceType what, std::string_view key, std::string_view type, std::string_view units)
Definition: HandleManager.cpp:13
void removeFederateHandles(GlobalFederateId fedToRemove)
Definition: HandleManager.cpp:88
BasicHandleInfo * getHandleInfo(int32_t index)
Definition: HandleManager.cpp:112
BasicHandleInfo * getInterfaceHandle(std::string_view name, InterfaceType type)
Definition: HandleManager.cpp:297
Definition: LocalFederateId.hpp:65
Definition: LocalFederateId.hpp:22
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
InterfaceType
Definition: CoreTypes.hpp:111