13#ifndef RTCTK_COMPONENTFRAMEWORK_SERVERALIASCACHE_HPP
14#define RTCTK_COMPONENTFRAMEWORK_SERVERALIASCACHE_HPP
46 m_cache.push_back(std::make_tuple(path.
ToString(), alias));
60 for (
auto const& entry : m_cache) {
61 if (
auto found = path.
ToString().rfind(std::get<0>(entry), 0);
62 found != std::string::npos) {
63 return std::get<1>(entry);
73 std::vector<std::tuple<std::string, std::string>> m_cache;
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:73
const std::string & ToString() const noexcept
Get string representing the DataPointPath.
Definition: dataPointPath.hpp:423
A utility class used to lookup the Server Alias for a given Data Point Path.
Definition: serverAliasCache.hpp:30
void AddServerAlias(DataPointPath const &path, std::string const &alias)
Adds a new entry into the Cache.
Definition: serverAliasCache.hpp:45
void Clear()
Clears the Cache.
Definition: serverAliasCache.hpp:35
std::string GetServerAlias(DataPointPath const &path)
Get Server Alias for a specific datapoint.
Definition: serverAliasCache.hpp:56
Header file for DataPointPath.
Definition: commandReplier.cpp:22