ClientConfig Class Reference
High level interface to Gazebo Fuel. More...
#include <ClientConfig.hh>
Public Member Functions | |
ClientConfig () | |
Constructor. | |
ClientConfig (const ClientConfig &_copy) | |
Copy constructor. | |
~ClientConfig () | |
Destructor. | |
void | AddServer (const ServerConfig &_srv) |
Add a server to the list. | |
std::string | AsString (const std::string &_prefix="") const |
Returns all the client information as a string. | |
std::string | CacheLocation () const |
Where are models and stuff stored locally? | |
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. | |
std::string | ConfigPath () const |
Get the location of the configuration file. | |
bool | LoadConfig (const std::string &_file) |
Load a YAML configuration file. | |
std::vector< ServerConfig > & | MutableServers () const |
List of servers the client will connect to. | |
ClientConfig & | operator= (const ClientConfig &_copy) |
Assignment operator overload. | |
std::vector< ServerConfig > | Servers () const |
List of servers the client will connect to. | |
void | SetCacheLocation (const std::string &_path) |
Set where models and stuff are saved. | |
void | SetUserAgent (const std::string &_agent) |
Set the user agent name. | |
const std::string & | UserAgent () const |
Get the user agent name. | |
Detailed Description
High level interface to Gazebo Fuel.
Constructor & Destructor Documentation
◆ ClientConfig() [1/2]
ClientConfig | ( | ) |
Constructor.
◆ ClientConfig() [2/2]
ClientConfig | ( | const ClientConfig & | _copy | ) |
Copy constructor.
- Parameters
-
[in] _copy ClientConfig to copy.
◆ ~ClientConfig()
~ClientConfig | ( | ) |
Destructor.
Member Function Documentation
◆ AddServer()
void AddServer | ( | const ServerConfig & | _srv | ) |
Add a server to the list.
- Parameters
-
[in] _srv The server config.
◆ AsString()
std::string AsString | ( | const std::string & | _prefix = "" | ) | const |
Returns all the client information as a string.
- Parameters
-
[in] _prefix Optional 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] _file Config 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] _copy ClientConfig 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] _path path on disk where models are saved.
◆ SetUserAgent()
void SetUserAgent | ( | const std::string & | _agent | ) |
Set the user agent name.
- Parameters
-
[in] _agent User 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: