.. _program_listing_file_src_rdf4cpp_ClosedNamespace.cpp: Program Listing for File ClosedNamespace.cpp ============================================ |exhale_lsh| :ref:`Return to documentation for file ` (``src/rdf4cpp/ClosedNamespace.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include "ClosedNamespace.hpp" namespace rdf4cpp { IRI ClosedNamespace::operator+(std::string_view suffix) const { if (auto found = cache_.find(suffix); found != cache_.end()) { return IRI{storage::identifier::NodeBackendHandle{found->second, node_storage_}}; } else { std::ostringstream oss; oss << "Resource " << suffix << " does not exist within the vocabulary " << namespace_iri_ << '.'; throw std::runtime_error{oss.str()}; } } void ClosedNamespace::clear() const { // this should not be cleared } } // namespace rdf4cpp