Struct NodeBackendID

Nested Relationships

Nested Types

Struct Documentation

struct NodeBackendID

Public Types

using underlying_type = uint64_t

Public Functions

constexpr NodeBackendID() noexcept = default
inline explicit constexpr NodeBackendID(underlying_type const underlying_id) noexcept
inline constexpr NodeBackendID(NodeID const node_id, RDFNodeType const node_type, bool const inlined = false, uint16_t const tagging_bits = 0) noexcept

Constructor

Parameters:
  • node_idNodeID to be used. NodeID() indicates a null() NodeBackendHandle.

  • node_type – RDFNodeType to be used

  • inlined – inlined bit

  • tagging_bits – tagging bits (must be all zero for usage with the backend)

inline constexpr RDFNodeType type() const noexcept

Get the RDFNodeType

Returns:

RDFNodeType

inline constexpr bool is_iri() const noexcept

Check if the NodeBackendHandle identifies a IRI.

Returns:

inline constexpr bool is_literal() const noexcept

Check if the NodeBackendHandle identifies a Literal.

Returns:

inline constexpr bool is_blank_node() const noexcept

Check if the NodeBackendHandle identifies a BlankNode.

Returns:

inline constexpr bool is_variable() const noexcept

Check if the NodeBackendHandle identifies a Variable.

Returns:

inline constexpr bool null() const noexcept

If true, the NodeBackendHandle identifies no Node.

Returns:

inline constexpr NodeID node_id() const noexcept

Get the NodeID

Returns:

inline constexpr bool is_inlined() const noexcept
Returns:

Whether the LiteralID is an inlined value or a normal node storage ID

inline constexpr uint16_t free_tagging_bits() const noexcept

Get the free tagging bits

Returns:

inline constexpr void set_free_tagging_bits(uint16_t new_value) noexcept

Set the free tagging bits. Must be reset to 0 before using comparison functions or raw() const

Parameters:

new_value

inline underlying_type to_underlying() const noexcept

Retrieve underlying 64 bit data

Returns:

template<std::unsigned_integral I> inline  requires (sizeof(I) >=sizeof(underlying_type)) explicit const expr operator I() const noexcept
inline constexpr std::strong_ordering operator<=>(NodeBackendID const &other) const noexcept
inline constexpr bool operator==(NodeBackendID const &other) const noexcept

Public Members

underlying_type underlying_
id_parts parts_

Public Static Attributes

static constexpr size_t width = 64
static constexpr size_t tagging_bits_width = 13
static std::pair<NodeBackendID, std::string_view> const default_graph_iri = {literal_type_to_iri_node_id(datatypes::registry::reserved_datatype_ids[datatypes::registry::default_graph_iri]), datatypes::registry::default_graph_iri}
static std::pair<NodeBackendID, std::string_view> const xsd_string_iri = {literal_type_to_iri_node_id(datatypes::xsd::String::fixed_id), datatypes::xsd::String::identifier}
static std::pair<NodeBackendID, std::string_view> const rdf_langstring_iri = {literal_type_to_iri_node_id(datatypes::rdf::LangString::fixed_id), datatypes::rdf::LangString::identifier}