retdec-cpp
List of all members
retdec::Settings Class Reference

Library settings. More...

#include <settings.h>

Public Member Functions

Construction, Assignment, and Destruction
 Settings ()
 Constructs a default settings. More...
 
 Settings (const Settings &other)
 Copy-constructs settings from the given settings. More...
 
 Settings (Settings &&other)
 Move-constructs settings from the given settings. More...
 
Settingsoperator= (const Settings &other)
 Copy-assigns the given settings. More...
 
Settingsoperator= (Settings &&other)
 Move-assigns the given settings. More...
 
 ~Settings ()
 Destructs the settings. More...
 
API Key
SettingsapiKey (const std::string &apiKey)
 Sets a new API key. More...
 
Settings withApiKey (const std::string &apiKey) const
 Returns a copy of the settings with a new API key. More...
 
std::string apiKey () const
 Returns the API key. More...
 
API URL
SettingsapiUrl (const std::string &apiUrl)
 Sets a new URL to the API. More...
 
Settings withApiUrl (const std::string &apiUrl) const
 Returns a copy of the settings with a new URL to the API. More...
 
std::string apiUrl () const
 Returns the URL to the API. More...
 
User Agent
SettingsuserAgent (const std::string &userAgent)
 Sets a new user agent. More...
 
Settings withUserAgent (const std::string &userAgent) const
 Returns a copy of the settings with a new user agent. More...
 
std::string userAgent () const
 Returns the user agent. More...
 

Static Public Attributes

Default Values
static const std::string DefaultApiUrl = "https://retdec.com/service/api"
 Default URL to the API. More...
 
static const std::string DefaultApiKey = ""
 Default API key. More...
 
static const std::string DefaultUserAgent
 Default user agent. More...
 

Detailed Description

Library settings.

Constructor & Destructor Documentation

retdec::Settings::Settings ( )

Constructs a default settings.

retdec::Settings::Settings ( const Settings other)
default

Copy-constructs settings from the given settings.

retdec::Settings::Settings ( Settings &&  other)
default

Move-constructs settings from the given settings.

retdec::Settings::~Settings ( )
default

Destructs the settings.

Member Function Documentation

Settings & retdec::Settings::apiKey ( const std::string &  apiKey)

Sets a new API key.

Returns
Reference to the modified settings (i.e. *this).
std::string retdec::Settings::apiKey ( ) const

Returns the API key.

Settings & retdec::Settings::apiUrl ( const std::string &  apiUrl)

Sets a new URL to the API.

Returns
Reference to the modified settings (i.e. *this).
std::string retdec::Settings::apiUrl ( ) const

Returns the URL to the API.

Settings & retdec::Settings::operator= ( const Settings other)
default

Copy-assigns the given settings.

Settings & retdec::Settings::operator= ( Settings &&  other)
default

Move-assigns the given settings.

Settings & retdec::Settings::userAgent ( const std::string &  userAgent)

Sets a new user agent.

Returns
Reference to the modified settings (i.e. *this).
std::string retdec::Settings::userAgent ( ) const

Returns the user agent.

Settings retdec::Settings::withApiKey ( const std::string &  apiKey) const

Returns a copy of the settings with a new API key.

Settings retdec::Settings::withApiUrl ( const std::string &  apiUrl) const

Returns a copy of the settings with a new URL to the API.

Settings retdec::Settings::withUserAgent ( const std::string &  userAgent) const

Returns a copy of the settings with a new user agent.

Member Data Documentation

const std::string retdec::Settings::DefaultApiKey = ""
static

Default API key.

const std::string retdec::Settings::DefaultApiUrl = "https://retdec.com/service/api"
static

Default URL to the API.

const std::string retdec::Settings::DefaultUserAgent
static
Initial value:
= "retdec-cpp/" +
operatingSystemName()

Default user agent.


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