dxFeed Graal CXX API v4.3.1
Loading...
Searching...
No Matches
HistoryEndpoint::Builder Class Reference

Builder is a static inner class that provides a flexible and readable way to construct instances of the HistoryEndpoint class. More...

#include <HistoryEndpoint.hpp>

+ Inheritance diagram for HistoryEndpoint::Builder:

Public Member Functions

std::shared_ptr< BuilderwithAddress (const std::string &address)
 Specifies the address for the target endpoint.
 
std::shared_ptr< BuilderwithUserName (const std::string &userName)
 Sets the username for the target endpoint.
 
std::shared_ptr< BuilderwithPassword (const std::string &password)
 Sets the password for the target endpoint.
 
std::shared_ptr< BuilderwithAuthToken (const std::string &authToken)
 Sets the authentication token for the target endpoint.
 
std::shared_ptr< BuilderwithCompression (Compression compression)
 Sets the compression type to be used for data transmission or storage.
 
std::shared_ptr< BuilderwithFormat (Format format)
 Sets the format to be used for data handling.
 
std::shared_ptr< HistoryEndpointbuild ()
 Builds and returns a configured instance of HistoryEndpoint.
 
- Public Member Functions inherited from SharedEntity
template<typename T>
bool is () const noexcept
 Checks that pointer to the current type could be converted to type T* In other words: whether type T belongs to the type hierarchy in which the current type resides.
 
template<typename T>
std::shared_ptr< T > sharedAs () noexcept
 Returns a pointer to the current object wrapped in a smart pointer to type T.
 
template<typename T>
std::shared_ptr< T > sharedAs () const noexcept
 Returns a pointer to the current object wrapped in a smart pointer to type T.
 
virtual std::string toString () const
 Returns a string representation of the current object.
 
- Public Member Functions inherited from Entity
virtual ~Entity () noexcept=default
 The default virtual d-tor.
 

Additional Inherited Members

- Public Types inherited from SharedEntity
using Ptr = std::shared_ptr<SharedEntity>
 The alias to a type of shared pointer to the SharedEntity object.
 
- Static Public Member Functions inherited from RequireMakeShared< Builder >
static auto createShared (Args &&...args)
 Creates smart pointer to object.
 

Detailed Description

Builder is a static inner class that provides a flexible and readable way to construct instances of the HistoryEndpoint class.

This class follows the builder pattern, allowing users to specify various configuration parameters for a HistoryEndpoint instance through fluent method chaining. The final built object is created using the Builder::build() method.

Member Function Documentation

◆ build()

std::shared_ptr< HistoryEndpoint > HistoryEndpoint::Builder::build ( )

Builds and returns a configured instance of HistoryEndpoint.

This method uses the values set in the Builder instance, such as address, username, password, compression, format, and authentication token, to create a new HistoryEndpoint object.

Returns
A new instance of HistoryEndpoint configured with the provided settings

◆ withAddress()

std::shared_ptr< HistoryEndpoint::Builder > HistoryEndpoint::Builder::withAddress ( const std::string & address)

Specifies the address for the target endpoint.

Parameters
addressThe address of the endpoint to be set.
Returns
The Builder instance with the updated address value.

◆ withAuthToken()

std::shared_ptr< HistoryEndpoint::Builder > HistoryEndpoint::Builder::withAuthToken ( const std::string & authToken)

Sets the authentication token for the target endpoint.

Parameters
authTokenThe authentication token to be used for access.
Returns
The Builder instance with the updated authentication token value.

◆ withCompression()

std::shared_ptr< HistoryEndpoint::Builder > HistoryEndpoint::Builder::withCompression ( Compression compression)

Sets the compression type to be used for data transmission or storage.

Parameters
compressionThe compression type to be applied, represented by the Compression enum.
Returns
The Builder instance with the updated compression value.

◆ withFormat()

std::shared_ptr< HistoryEndpoint::Builder > HistoryEndpoint::Builder::withFormat ( Format format)

Sets the format to be used for data handling.

Parameters
formatThe format type to be applied, represented by the Format enum.
Returns
The Builder instance with the updated format value.

◆ withPassword()

std::shared_ptr< HistoryEndpoint::Builder > HistoryEndpoint::Builder::withPassword ( const std::string & password)

Sets the password for the target endpoint.

Parameters
passwordThe password to be set for the endpoint.
Returns
The Builder instance with the updated password value.

◆ withUserName()

std::shared_ptr< HistoryEndpoint::Builder > HistoryEndpoint::Builder::withUserName ( const std::string & userName)

Sets the username for the target endpoint.

Parameters
userNameThe username to be set for the endpoint.
Returns
The Builder instance with the updated username value.