Gazebo Fuel_tools

API Reference

7.3.1
ClientConfig Class Reference

High level interface to ignition fuel. More...

#include <ClientConfig.hh>

Public Member Functions

 ClientConfig ()
 Constructor. More...
 
 ClientConfig (const ClientConfig &_copy)
 Copy constructor. More...
 
 ~ClientConfig ()
 Destructor. More...
 
void AddServer (const ServerConfig &_srv)
 Add a server to the list. More...
 
std::string AsString (const std::string &_prefix="") const
 Returns all the client information as a string. More...
 
std::string CacheLocation () const
 Where are models and stuff stored locally? More...
 
void Clear ()
 Clear the client config. This will set all values to empty strings, except the user agent which will be set to its default value. More...
 
std::string ConfigPath () const
 Get the location of the configuration file. More...
 
bool LoadConfig (const std::string &_file)
 Load a YAML configuration file. More...
 
std::vector< ServerConfig > & MutableServers () const
 List of servers the client will connect to. More...
 
ClientConfigoperator= (const ClientConfig &_copy)
 Assignment operator overload. More...
 
std::vector< ServerConfigServers () const
 List of servers the client will connect to. More...
 
void SetCacheLocation (const std::string &_path)
 Set where models and stuff are saved. More...
 
void SetUserAgent (const std::string &_agent)
 Set the user agent name. More...
 
const std::stringUserAgent () const
 Get the user agent name. More...
 

Detailed Description

High level interface to ignition fuel.

Constructor & Destructor Documentation

◆ ClientConfig() [1/2]

Constructor.

◆ ClientConfig() [2/2]

ClientConfig ( const ClientConfig _copy)

Copy constructor.

Parameters
[in]_copyClientConfig to copy.

◆ ~ClientConfig()

Destructor.

Member Function Documentation

◆ AddServer()

void AddServer ( const ServerConfig _srv)

Add a server to the list.

Parameters
[in]_srvThe server config.

◆ AsString()

std::string AsString ( const std::string _prefix = "") const

Returns all the client information as a string.

Parameters
[in]_prefixOptional prefix for every line of the string.
Returns
Client information string

◆ CacheLocation()

std::string CacheLocation ( ) const

Where are models and stuff stored locally?

Returns
The location where assets are stored locally.

◆ Clear()

void Clear ( )

Clear the client config. This will set all values to empty strings, except the user agent which will be set to its default value.

◆ ConfigPath()

std::string ConfigPath ( ) const

Get the location of the configuration file.

Returns
Path to the configuration file, which is set via LoadConfig. The default return value is an empty string.
See also
LoadConfig

◆ LoadConfig()

bool LoadConfig ( const std::string _file)

Load a YAML configuration file.

Parameters
[in]_fileConfig file to load.
Returns
True if the configuration was loaded correctly.
See also
ConfigPath

◆ MutableServers()

std::vector<ServerConfig>& MutableServers ( ) const

List of servers the client will connect to.

Returns
The list of servers.

◆ operator=()

ClientConfig& operator= ( const ClientConfig _copy)

Assignment operator overload.

Parameters
[in]_copyClientConfig to copy.

◆ Servers()

std::vector<ServerConfig> Servers ( ) const

List of servers the client will connect to.

Returns
The list of servers.

◆ SetCacheLocation()

void SetCacheLocation ( const std::string _path)

Set where models and stuff are saved.

Parameters
[in]_pathpath on disk where models are saved.

◆ SetUserAgent()

void SetUserAgent ( const std::string _agent)

Set the user agent name.

Parameters
[in]_agentUser agent name.

◆ UserAgent()

const std::string& UserAgent ( ) const

Get the user agent name.

Returns
Name of the user agent.

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