class ObjectId
C++
class ObjectId
A reference to an object: its id, where it lives, and the URLs it can be
reached at. Object adds a connection to it.
Converts to a string (to_string() / from_string()) so a reference
can be handed out of band, e.g. in a config file.
include/nprpc/nprpc.hpp:83
Methods
void assign_from_direct(const detail::flat::ObjectId_Direct &other)
Copies from the wire form, as received in a call.
include/nprpc/nprpc.hpp:103
static void assign_to_direct(const ::nprpc::ObjectId &oid, detail::flat::ObjectId_Direct &direct)
Copies oid into its wire form, to send it in a call.
include/nprpc/nprpc.hpp:110
const std::string &class_id() const noexcept
Interface identifier, <idl file>/<namespace>.<interface>.
include/nprpc/nprpc.hpp:126
oflags_t flags() const noexcept
detail::ObjectFlag bits: lifespan, and which browser transports may
reach the object.
include/nprpc/nprpc.hpp:122
bool from_string(std::string_view str)
Deserialize ObjectId from string. Returns true on success, false on parse error.
include/nprpc/nprpc.hpp:148
::nprpc::detail::ObjectId &get_data() noexcept
The underlying record, for code that builds references by hand.
include/nprpc/nprpc.hpp:138
const ::nprpc::detail::ObjectId &get_data() const noexcept
The underlying record.
include/nprpc/nprpc.hpp:140
bool is_same_origin(const uuid_t &other) const noexcept
Whether the object was created by the process with UUID other.
include/nprpc/nprpc.hpp:132
oid_t object_id() const noexcept
The object's id within its POA.
include/nprpc/nprpc.hpp:117
const uuid_t &origin() const noexcept
UUID of the process that created the object.
include/nprpc/nprpc.hpp:124
poa_idx_t poa_idx() const noexcept
Index of the POA the object lives in.
include/nprpc/nprpc.hpp:119
template <typename Archive> void serialize(Archive &ar)
Writes or reads the fields through ar; used for host.json.
include/nprpc/nprpc.hpp:92
std::string to_string() const
Serialize ObjectId to a string (NPRPC IOR format).
Format: NPRPC1:<base64_encoded_binary_data>
include/nprpc/nprpc.hpp:144
const std::string &urls() const noexcept
Where the object can be reached, ;-separated
(tcp://, web://, mem://, quic://).
include/nprpc/nprpc.hpp:129