Loading...
Searching...
No Matches
remote_key_builder.h
1
5#pragma once
6
7#include <memory>
8#include <utility>
9
10#include <ucxx/typedefs.h>
11
12namespace ucxx {
13
14class Endpoint;
15class MemoryHandle;
16class RemoteKey;
17
25class RemoteKeyBuilder final {
26 public:
32 explicit RemoteKeyBuilder(std::shared_ptr<MemoryHandle> memoryHandle);
33
40 RemoteKeyBuilder(std::shared_ptr<Endpoint> endpoint, SerializedRemoteKey serializedRemoteKey);
41
44
52 RemoteKeyBuilder& operator=(RemoteKeyBuilder&&) noexcept;
53
59 operator std::shared_ptr<RemoteKey>();
60
68 [[nodiscard]] std::shared_ptr<RemoteKey> build();
69
70 private:
71 struct Impl;
72 std::unique_ptr<Impl> _impl;
73};
74
75} // namespace ucxx
Component encapsulating a UCP endpoint.
Definition endpoint.h:69
Component holding a UCP memory handle.
Definition memory_handle.h:28
RemoteKeyBuilder(std::shared_ptr< MemoryHandle > memoryHandle)
Constructor for RemoteKeyBuilder from a local memory handle.
std::shared_ptr< RemoteKey > build()
Build and return the RemoteKey.
RemoteKeyBuilder & operator=(const RemoteKeyBuilder &other)
Copy assignment operator (deep-copies internal state).
RemoteKeyBuilder(const RemoteKeyBuilder &other)
Copy constructor (deep-copies internal state).
RemoteKeyBuilder(RemoteKeyBuilder &&) noexcept
Move constructor.
RemoteKeyBuilder(std::shared_ptr< Endpoint > endpoint, SerializedRemoteKey serializedRemoteKey)
Constructor for RemoteKeyBuilder from a serialized remote key.
~RemoteKeyBuilder()
RemoteKeyBuilder destructor.
Component holding a UCP rkey (remote key).
Definition remote_key.h:39
Definition address.h:16
const std::string SerializedRemoteKey
Serialized form of a remote key.
Definition typedefs.h:304