Builder is a static inner class that provides a flexible and readable way to construct instances of the HistoryEndpoint class.
More...
#include <HistoryEndpoint.hpp>
|
std::shared_ptr< Builder > | withAddress (const std::string &address) |
| Specifies the address for the target endpoint.
|
|
std::shared_ptr< Builder > | withUserName (const std::string &userName) |
| Sets the username for the target endpoint.
|
|
std::shared_ptr< Builder > | withPassword (const std::string &password) |
| Sets the password for the target endpoint.
|
|
std::shared_ptr< Builder > | withAuthToken (const std::string &authToken) |
| Sets the authentication token for the target endpoint.
|
|
std::shared_ptr< Builder > | withCompression (Compression compression) |
| Sets the compression type to be used for data transmission or storage.
|
|
std::shared_ptr< Builder > | withFormat (Format format) |
| Sets the format to be used for data handling.
|
|
std::shared_ptr< HistoryEndpoint > | build () |
| Builds and returns a configured instance of HistoryEndpoint.
|
|
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.
|
|
virtual | ~Entity () noexcept=default |
| The default virtual d-tor.
|
|
|
using | Ptr = std::shared_ptr<SharedEntity> |
| The alias to a type of shared pointer to the SharedEntity object.
|
|
static auto | createShared (Args &&...args) |
| Creates smart pointer to object.
|
|
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.
◆ 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()
Specifies the address for the target endpoint.
- Parameters
-
address | The address of the endpoint to be set. |
- Returns
- The Builder instance with the updated address value.
◆ withAuthToken()
Sets the authentication token for the target endpoint.
- Parameters
-
authToken | The authentication token to be used for access. |
- Returns
- The Builder instance with the updated authentication token value.
◆ withCompression()
Sets the compression type to be used for data transmission or storage.
- Parameters
-
compression | The compression type to be applied, represented by the Compression enum. |
- Returns
- The Builder instance with the updated compression value.
◆ withFormat()
Sets the format to be used for data handling.
- Parameters
-
format | The format type to be applied, represented by the Format enum. |
- Returns
- The Builder instance with the updated format value.
◆ withPassword()
Sets the password for the target endpoint.
- Parameters
-
password | The password to be set for the endpoint. |
- Returns
- The Builder instance with the updated password value.
◆ withUserName()
Sets the username for the target endpoint.
- Parameters
-
userName | The username to be set for the endpoint. |
- Returns
- The Builder instance with the updated username value.