.. _program_listing_file_src_rdf4cpp_query_Solution.hpp: Program Listing for File Solution.hpp ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/rdf4cpp/query/Solution.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef RDF4CPP_SOLUTION_HPP #define RDF4CPP_SOLUTION_HPP #include #include namespace rdf4cpp::query { struct Solution { private: using storage_type = std::vector>; public: using value_type = std::pair; using reference = value_type &; using const_reference = value_type const &; using pointer = value_type *; using const_pointer = value_type const *; using iterator = typename storage_type::iterator; using const_iterator = typename storage_type::const_iterator; using size_type = size_t; using difference_type = ptrdiff_t; private: storage_type partial_mapping; template static std::vector extract_variables(Pat const &pat); public: Solution() noexcept = default; explicit Solution(std::vector const &variables); explicit Solution(QuadPattern const &qp); explicit Solution(TriplePattern const &tp); Node operator[](Variable const &variable) const noexcept; Node const &operator[](size_t pos) const noexcept; Node &operator[](size_t pos) noexcept; [[nodiscard]] Variable const &variable(size_t pos) const noexcept; [[nodiscard]] size_t variable_count() const noexcept; [[nodiscard]] size_t bound_count() const noexcept; [[nodiscard]] iterator begin() noexcept; [[nodiscard]] iterator end() noexcept; [[nodiscard]] const_iterator begin() const noexcept; [[nodiscard]] const_iterator end() const noexcept; }; } // namespace rdf4cpp::query #endif //RDF4CPP_SOLUTION_HPP