Skip to content

Commit 1019108

Browse files
mjcarrollcaguero
authored andcommitted
Tidy nested namespaces (#396)
Signed-off-by: Michael Carroll <[email protected]>
1 parent 35a8caa commit 1019108

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2366
-2202
lines changed

.github/workflows/ci.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
name: Ubuntu CI
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'ign-fuel-tools[0-9]'
8+
- 'gz-fuel-tools[0-9]?'
9+
- 'main'
410

511
jobs:
612
jammy-ci:
713
runs-on: ubuntu-latest
814
name: Ubuntu Jammy CI
915
steps:
1016
- name: Checkout
11-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1218
- name: Compile and test
1319
id: ci
1420
uses: gazebo-tooling/action-gz-ci@jammy

.github/workflows/triage.yml

-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ jobs:
1414
with:
1515
project-url: https://github.com/orgs/gazebosim/projects/7
1616
github-token: ${{ secrets.TRIAGE_TOKEN }}
17-

Changelog.md

+11
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,17 @@
370370
1. Support link referral download
371371
* [Pull request #333](https://github.com/gazebosim/gz-fuel-tools/pull/333)
372372

373+
### Gazebo Fuel Tools 4.9.1 (2024-01-05)
374+
375+
1. Create directories and more output on fail
376+
* [Pull request #392](https://github.com/gazebosim/gz-fuel-tools/pull/392)
377+
378+
1. Update github action workflows
379+
* [Pull request #388](https://github.com/gazebosim/gz-fuel-tools/pull/388)
380+
381+
1. Zip: use non-deprecated methods
382+
* [Pull request #360](https://github.com/gazebosim/gz-fuel-tools/pull/360)
383+
373384
### Gazebo Fuel Tools 4.9.0 (2023-05-03)
374385

375386
1. Add bash completion

include/gz/fuel_tools/ClientConfig.hh

+77-143
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <gz/common/URI.hh>
2626

2727
#include "gz/fuel_tools/Export.hh"
28+
#include "gz/fuel_tools/ServerConfig.hh"
2829

2930
#ifdef _WIN32
3031
// Disable warning C4251 which is triggered by
@@ -33,153 +34,86 @@
3334
#pragma warning(disable: 4251)
3435
#endif
3536

36-
namespace gz
37+
namespace gz::fuel_tools
3738
{
38-
namespace fuel_tools
39+
/// \brief Forward Declaration
40+
class ClientConfigPrivate;
41+
42+
/// \brief High level interface to Gazebo Fuel.
43+
///
44+
class GZ_FUEL_TOOLS_VISIBLE ClientConfig
3945
{
40-
/// \brief forward declaration
41-
class ServerConfigPrivate;
42-
43-
/// \brief Forward Declaration
44-
class ClientConfigPrivate;
45-
46-
/// \brief Describes options needed for a server.
47-
class GZ_FUEL_TOOLS_VISIBLE ServerConfig
48-
{
49-
/// \brief Constructor.
50-
public: ServerConfig();
51-
52-
/// \brief Copy constructor.
53-
/// \param[in] _orig The server config to copy.
54-
public: ServerConfig(const ServerConfig &_orig);
55-
56-
/// \brief Assignment operator overload.
57-
/// \param[in] _orig The server config to copy.
58-
public: ServerConfig &operator=(const ServerConfig &_orig);
59-
60-
/// \brief Destructor.
61-
public: ~ServerConfig();
62-
63-
/// \brief Clear the server config. This will set all values to empty
64-
/// strings, except the version string which will be set to its default
65-
/// value.
66-
public: void Clear();
67-
68-
/// \brief Get the URL to access the server.
69-
/// \return The URL of this server.
70-
public: common::URI Url() const;
71-
72-
/// \brief Set the URL of this server.
73-
/// \param[in] _url URL of this server.
74-
public: void SetUrl(const common::URI &_url);
75-
76-
/// \brief Get the API key to auth with the server.
77-
/// \return The API key.
78-
public: std::string ApiKey() const;
79-
80-
/// \brief Set the API key to auth with the server.
81-
/// \param[in] _key The API key.
82-
public: void SetApiKey(const std::string &_key);
83-
84-
/// \brief Get the protocol version used with this server.
85-
/// \return The version. E.g.: "1.0".
86-
public: std::string Version() const;
87-
88-
/// \brief Set the protocol version used with this server.
89-
/// \param[in] _version The version. E.g.: "1.0".
90-
public: void SetVersion(const std::string &_version);
91-
92-
/// \brief Returns all the server information as a string.
93-
/// \param[in] _prefix Optional prefix for every line of the string.
94-
/// \return Server information string
95-
public: std::string AsString(const std::string &_prefix = "") const;
96-
97-
/// \brief Returns all the available model information as a string using
98-
/// colors for better human parsing.
99-
/// \param[in] _prefix Optional prefix for every line of the string.
100-
/// \return Model information string
101-
public: std::string AsPrettyString(const std::string &_prefix = "") const;
102-
103-
/// \brief PIMPL
104-
private: std::unique_ptr<ServerConfigPrivate> dataPtr;
105-
};
106-
107-
/// \brief High level interface to Gazebo Fuel.
108-
///
109-
class GZ_FUEL_TOOLS_VISIBLE ClientConfig
110-
{
111-
/// \brief Constructor.
112-
public: ClientConfig();
113-
114-
/// \brief Copy constructor.
115-
/// \param[in] _copy ClientConfig to copy.
116-
public: ClientConfig(const ClientConfig &_copy);
117-
118-
/// \brief Assignment operator overload.
119-
/// \param[in] _copy ClientConfig to copy.
120-
public: ClientConfig &operator=(const ClientConfig &_copy);
121-
122-
/// \brief Destructor.
123-
public: ~ClientConfig();
124-
125-
/// \brief Clear the client config. This will set all values to empty
126-
/// strings, except the user agent which will be set to its default
127-
/// value.
128-
public: void Clear();
129-
130-
/// \brief Set the user agent name.
131-
/// \param[in] _agent User agent name.
132-
public: void SetUserAgent(const std::string &_agent);
133-
134-
/// \brief Get the user agent name.
135-
/// \return Name of the user agent.
136-
public: const std::string &UserAgent() const;
137-
138-
/// \brief Load a YAML configuration file.
139-
/// \param[in] _file Config file to load.
140-
/// \return True if the configuration was loaded correctly.
141-
/// \sa ConfigPath
142-
public: bool LoadConfig(const std::string &_file);
143-
144-
/// \brief Get the location of the configuration file.
145-
/// \return Path to the configuration file, which is set via
146-
/// LoadConfig. The default return value is an empty string.
147-
/// \sa LoadConfig
148-
public: std::string ConfigPath() const;
149-
150-
/// \brief List of servers the client will connect to.
151-
/// \return The list of servers.
152-
public: std::vector<ServerConfig> Servers() const;
153-
154-
/// \brief List of servers the client will connect to.
155-
/// \return The list of servers.
156-
public: std::vector<ServerConfig> & MutableServers() const;
157-
158-
/// \brief Add a server to the list.
159-
/// \param[in] _srv The server config.
160-
public: void AddServer(const ServerConfig &_srv);
161-
162-
/// \brief Where are models and stuff stored locally?
163-
/// \return The location where assets are stored locally.
164-
public: std::string CacheLocation() const;
165-
166-
/// \brief Set where models and stuff are saved.
167-
/// \param[in] _path path on disk where models are saved.
168-
public: void SetCacheLocation(const std::string &_path);
169-
170-
/// \brief Returns all the client information as a string.
171-
/// \param[in] _prefix Optional prefix for every line of the string.
172-
/// \return Client information string
173-
public: std::string AsString(const std::string &_prefix = "") const;
174-
175-
/// \brief PIMPL
176-
private: std::unique_ptr<ClientConfigPrivate> dataPtr;
177-
};
178-
}
179-
}
46+
/// \brief Constructor.
47+
public: ClientConfig();
48+
49+
/// \brief Copy constructor.
50+
/// \param[in] _copy ClientConfig to copy.
51+
public: ClientConfig(const ClientConfig &_copy);
52+
53+
/// \brief Assignment operator overload.
54+
/// \param[in] _copy ClientConfig to copy.
55+
public: ClientConfig &operator=(const ClientConfig &_copy);
56+
57+
/// \brief Destructor.
58+
public: ~ClientConfig();
59+
60+
/// \brief Clear the client config. This will set all values to empty
61+
/// strings, except the user agent which will be set to its default
62+
/// value.
63+
public: void Clear();
64+
65+
/// \brief Set the user agent name.
66+
/// \param[in] _agent User agent name.
67+
public: void SetUserAgent(const std::string &_agent);
68+
69+
/// \brief Get the user agent name.
70+
/// \return Name of the user agent.
71+
public: const std::string &UserAgent() const;
72+
73+
/// \brief Load a YAML configuration file.
74+
/// \param[in] _file Config file to load.
75+
/// \return True if the configuration was loaded correctly.
76+
/// \sa ConfigPath
77+
public: bool LoadConfig(const std::string &_file);
78+
79+
/// \brief Get the location of the configuration file.
80+
/// \return Path to the configuration file, which is set via
81+
/// LoadConfig. The default return value is an empty string.
82+
/// \sa LoadConfig
83+
public: std::string ConfigPath() const;
84+
85+
/// \brief List of servers the client will connect to.
86+
/// \return The list of servers.
87+
public: std::vector<ServerConfig> Servers() const;
88+
89+
/// \brief List of servers the client will connect to.
90+
/// \return The list of servers.
91+
public: std::vector<ServerConfig> & MutableServers() const;
92+
93+
/// \brief Add a server to the list.
94+
/// \param[in] _srv The server config.
95+
public: void AddServer(const ServerConfig &_srv);
96+
97+
/// \brief Where are models and stuff stored locally?
98+
/// \return The location where assets are stored locally.
99+
public: std::string CacheLocation() const;
100+
101+
/// \brief Set where models and stuff are saved.
102+
/// \param[in] _path path on disk where models are saved.
103+
public: void SetCacheLocation(const std::string &_path);
104+
105+
/// \brief Returns all the client information as a string.
106+
/// \param[in] _prefix Optional prefix for every line of the string.
107+
/// \return Client information string
108+
public: std::string AsString(const std::string &_prefix = "") const;
109+
110+
/// \brief PIMPL
111+
private: std::unique_ptr<ClientConfigPrivate> dataPtr;
112+
};
113+
} // namespace gz::fuel_tools
180114

181115
#ifdef _MSC_VER
182116
#pragma warning(pop)
183117
#endif
184118

185-
#endif
119+
#endif // GZ_FUEL_TOOLS_CLIENTCONFIG_HH_

0 commit comments

Comments
 (0)