Struct RDFFileParser

Nested Relationships

Nested Types

Struct Documentation

struct RDFFileParser

Similar to rdf4cpp::parser::IStreamQuadIterator Parses the file by the given path and tries to extract Quads given in TURTLE format.

Example:
for (const auto& e : rdf4cpp::parser::RDFFileParser{"somewhere.ttl"}) {
 if (e.has_value())
    std::cout << e.value();
 else
    std::cout << e.error();
}

Note

the iterator starts on the first Quad

Note

An exhausted iterator becomes the end-of-stream iterator.

Warning

The value pointed to by an end-of-stream iterator is undefined

Public Types

using value_type = Quad
using state_type = IStreamQuadIterator::state_type
using flags_type = IStreamQuadIterator::flags_type
using sentinel = std::default_sentinel_t

Public Functions

explicit RDFFileParser(const std::string &file_path, flags_type flags = flags_type::none(), state_type *state = nullptr)
explicit RDFFileParser(std::string &&file_path, flags_type flags = flags_type::none(), state_type *state = nullptr)
iterator begin() const
sentinel end() const noexcept
struct iterator

Public Types

using value_type = IStreamQuadIterator::value_type
using reference = IStreamQuadIterator::reference
using pointer = IStreamQuadIterator::pointer
using difference_type = IStreamQuadIterator::difference_type
using iterator_category = IStreamQuadIterator::iterator_category
using istream_type = IStreamQuadIterator::istream_type

Public Functions

~iterator() noexcept
reference operator*() const noexcept
pointer operator->() const noexcept
iterator &operator++()
bool operator==(const iterator &other) const noexcept

Friends

friend struct RDFFileParser