6 #ifndef KNOWROB_PREFIX_REGISTRY_H
7 #define KNOWROB_PREFIX_REGISTRY_H
15 using OptionalStringRef = std::optional<std::reference_wrapper<const std::string>>;
20 class PrefixRegistry {
55 static std::optional<std::string>
createIRI(std::string_view alias, std::string_view entityName);
66 using Iterator = std::map<std::string, std::string>::iterator;
79 std::map<std::string, std::string, std::less<>> uriToAlias_;
80 std::map<std::string, std::string, std::less<>> aliasToURI_;
84 void registerPrefix_(std::string_view
prefix, std::string_view uri);
std::map< std::string, std::string >::iterator Iterator
static void registerPrefix(std::string_view prefix, std::string_view uri)
static std::optional< std::string > createIRI(std::string_view alias, std::string_view entityName)
static OptionalStringRef aliasToUri(std::string_view alias)
static std::vector< std::string_view > getAliasesWithPrefix(std::string_view prefix)
static PrefixRegistry & get()
static OptionalStringRef uriToAlias(std::string_view uri)
constexpr std::string_view prefix
std::optional< std::reference_wrapper< const std::string > > OptionalStringRef