Public Member Functions | List of all members
ucxx::AddressBuilder Class Referencefinal

Builder class for constructing std::shared_ptr<ucxx::Address> objects. More...

#include <address_builder.h>

Public Member Functions

 AddressBuilder (std::shared_ptr< Worker > worker)
 Constructor for AddressBuilder from a worker. More...
 
 AddressBuilder (std::string_view addressString)
 Constructor for AddressBuilder from a serialized address string. More...
 
 ~AddressBuilder ()
 AddressBuilder destructor.
 
 AddressBuilder (const AddressBuilder &other)
 Copy constructor (deep-copies internal state).
 
AddressBuilder & operator= (const AddressBuilder &other)
 Copy assignment operator (deep-copies internal state).
 
 AddressBuilder (AddressBuilder &&) noexcept
 Move constructor.
 
AddressBuilder & operator= (AddressBuilder &&) noexcept
 Move assignment operator.
 
 operator std::shared_ptr< Address > ()
 Implicit conversion operator to shared_ptr<Address>. More...
 
std::shared_ptr< Address > build ()
 Build and return the Address. More...
 

Detailed Description

Builder class for constructing std::shared_ptr<ucxx::Address> objects.

This class implements the builder pattern for std::shared_ptr<ucxx::Address>. Construction happens when build() is called or when the builder is implicitly converted to std::shared_ptr<Address>.

Constructor & Destructor Documentation

◆ AddressBuilder() [1/2]

ucxx::AddressBuilder::AddressBuilder ( std::shared_ptr< Worker >  worker)
explicit

Constructor for AddressBuilder from a worker.

Parameters
[in]workerworker from which to get the address.

◆ AddressBuilder() [2/2]

ucxx::AddressBuilder::AddressBuilder ( std::string_view  addressString)
explicit

Constructor for AddressBuilder from a serialized address string.

Parameters
[in]addressStringserialized worker address.

Member Function Documentation

◆ build()

std::shared_ptr<Address> ucxx::AddressBuilder::build ( )

Build and return the Address.

Each call to build() creates a new Address instance with the current parameters.

Returns
The constructed shared_ptr<ucxx::Address> object.

◆ operator std::shared_ptr< Address >()

ucxx::AddressBuilder::operator std::shared_ptr< Address > ( )

Implicit conversion operator to shared_ptr<Address>.

Returns
The constructed shared_ptr<ucxx::Address> object.

The documentation for this class was generated from the following file: