Skip to content

Commit

Permalink
Migrate Export.hh macros and deprecated test
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed May 20, 2022
1 parent 22dbbac commit b1fd67a
Show file tree
Hide file tree
Showing 21 changed files with 53 additions and 51 deletions.
4 changes: 2 additions & 2 deletions include/gz/fuel_tools/ClientConfig.hh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace gz
class ClientConfigPrivate;

/// \brief Describes options needed for a server.
class IGNITION_FUEL_TOOLS_VISIBLE ServerConfig
class GZ_FUEL_TOOLS_VISIBLE ServerConfig
{
/// \brief Constructor.
public: ServerConfig();
Expand Down Expand Up @@ -106,7 +106,7 @@ namespace gz

/// \brief High level interface to ignition fuel.
///
class IGNITION_FUEL_TOOLS_VISIBLE ClientConfig
class GZ_FUEL_TOOLS_VISIBLE ClientConfig
{
/// \brief Constructor.
public: ClientConfig();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/CollectionIdentifier.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace gz
class ServerConfig;

/// \brief Defines how to identify a collection
class IGNITION_FUEL_TOOLS_VISIBLE CollectionIdentifier
class GZ_FUEL_TOOLS_VISIBLE CollectionIdentifier
{
/// \brief Constructor.
public: CollectionIdentifier();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/FuelClient.hh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace gz
class ServerConfig;

/// \brief High level interface to ignition fuel
class IGNITION_FUEL_TOOLS_VISIBLE FuelClient
class GZ_FUEL_TOOLS_VISIBLE FuelClient
{
/// \brief Default constructor.
public: FuelClient();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/Helpers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace fuel_tools
/// It strips the scheme and authority's `//` prefix.
/// \param[in] _uri URI to convert.
/// \return String suitable to use in file paths
IGNITION_FUEL_TOOLS_VISIBLE
GZ_FUEL_TOOLS_VISIBLE
std::string uriToPath(const gz::common::URI &_uri);
}
}
Expand Down
6 changes: 3 additions & 3 deletions include/gz/fuel_tools/Interface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ namespace gz
/// fuel tools. This will place the asset in ~/.ignition/fuel.
/// \param[in] _uri URI to the asset.
/// \return Path to the downloaded asset. Empty on error.
IGNITION_FUEL_TOOLS_VISIBLE std::string fetchResource(
GZ_FUEL_TOOLS_VISIBLE std::string fetchResource(
const std::string &_uri);

/// \brief Download the specified resource using the ClientConfig
/// contained in the FuelClient parameter.
/// \param[in] _uri URI to the asset.
/// \param[in] _client Custom FuelClient configuration.
/// \return Path to the downloaded asset. Empty on error.
IGNITION_FUEL_TOOLS_VISIBLE std::string fetchResourceWithClient(
GZ_FUEL_TOOLS_VISIBLE std::string fetchResourceWithClient(
const std::string &_uri, gz::fuel_tools::FuelClient &_client);

/// \brief Get the SDF file path for a model or world based on a directory
Expand All @@ -56,7 +56,7 @@ namespace gz
/// \param[in] _path Filesystem path to a Fuel model or world directory.
/// \return Full path to the model or world SDF file, or empty string if
/// the SDF file coult not be determined.
IGNITION_FUEL_TOOLS_VISIBLE std::string sdfFromPath(
GZ_FUEL_TOOLS_VISIBLE std::string sdfFromPath(
const std::string &_path);
}
}
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/JSONParser.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace gz
class ServerConfig;

/// \brief A helper class for making REST requests.
class IGNITION_FUEL_TOOLS_VISIBLE JSONParser
class GZ_FUEL_TOOLS_VISIBLE JSONParser
{
/// \brief Parse a model JSON string and return a model identifier
/// \param[in] _json JSON string containing a model.
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/Model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace gz
class ModelIterTest;

/// \brief Defines how to identify a model.
class IGNITION_FUEL_TOOLS_VISIBLE Model
class GZ_FUEL_TOOLS_VISIBLE Model
{
friend IterIds;
friend IterRESTIds;
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/ModelIdentifier.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace gz
class ServerConfig;

/// \brief Defines how to identify a model
class IGNITION_FUEL_TOOLS_VISIBLE ModelIdentifier
class GZ_FUEL_TOOLS_VISIBLE ModelIdentifier
{
/// \brief Constructor.
public: ModelIdentifier();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/ModelIter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace gz
class ModelIterFactory;

/// \brief class for iterating through models
class IGNITION_FUEL_TOOLS_VISIBLE ModelIter
class GZ_FUEL_TOOLS_VISIBLE ModelIter
{
friend ModelIterFactory;

Expand Down
4 changes: 2 additions & 2 deletions include/gz/fuel_tools/RestClient.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace gz
namespace fuel_tools
{
/// \brief Stores a response to a RESTful request
struct IGNITION_FUEL_TOOLS_VISIBLE RestResponse
struct GZ_FUEL_TOOLS_VISIBLE RestResponse
{
/// \brief The returned status code. E.g.: 200
// cppcheck-suppress unusedStructMember
Expand Down Expand Up @@ -79,7 +79,7 @@ namespace gz
};

/// \brief A helper class for making REST requests.
class IGNITION_FUEL_TOOLS_VISIBLE Rest
class GZ_FUEL_TOOLS_VISIBLE Rest
{
/// \brief Default constructor.
public: Rest() = default;
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/Result.hh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace gz
};

/// \brief Class describing a result of an operation.
class IGNITION_FUEL_TOOLS_VISIBLE Result
class GZ_FUEL_TOOLS_VISIBLE Result
{
/// \brief Default constructor
public: Result();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/WorldIdentifier.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace gz
class ServerConfig;

/// \brief Defines how to identify a world
class IGNITION_FUEL_TOOLS_VISIBLE WorldIdentifier
class GZ_FUEL_TOOLS_VISIBLE WorldIdentifier
{
/// \brief Constructor.
public: WorldIdentifier();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/WorldIter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace gz
class WorldIterFactory;

/// \brief class for iterating through worlds
class IGNITION_FUEL_TOOLS_VISIBLE WorldIter
class GZ_FUEL_TOOLS_VISIBLE WorldIter
{
friend WorldIterFactory;

Expand Down
2 changes: 1 addition & 1 deletion include/gz/fuel_tools/Zip.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace gz
namespace fuel_tools
{
/// \brief A helper class for making REST requests.
class IGNITION_FUEL_TOOLS_VISIBLE Zip
class GZ_FUEL_TOOLS_VISIBLE Zip
{
/// \brief Compress a file or directory
/// \param[in] _src Path to file or directory to compress
Expand Down
2 changes: 1 addition & 1 deletion src/LocalCache.hh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace gz
class ModelIdentifier;

/// \brief Class for managing stuff in the local cache
class IGNITION_FUEL_TOOLS_VISIBLE LocalCache
class GZ_FUEL_TOOLS_VISIBLE LocalCache
{
/// \brief Constructor
/// \param[in] _config The configuration for the client
Expand Down
10 changes: 5 additions & 5 deletions src/ModelIterPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace gz
class ModelIter;

/// \brief Private class, do not include or instantiate
class IGNITION_FUEL_TOOLS_VISIBLE ModelIterFactory
class GZ_FUEL_TOOLS_VISIBLE ModelIterFactory
{
/// \brief Create a model iterator from a vector of model identifiers
/// \param[in] _ids Model identifiers
Expand All @@ -67,7 +67,7 @@ namespace gz
};

/// \brief Private class, do not include or instantiate
class IGNITION_FUEL_TOOLS_VISIBLE ModelIterPrivate
class GZ_FUEL_TOOLS_VISIBLE ModelIterPrivate
{
/// \brief Destructor
public: virtual ~ModelIterPrivate();
Expand All @@ -85,7 +85,7 @@ namespace gz

/// \brief class for iterating through model ids where all are known
/// in advance
class IGNITION_FUEL_TOOLS_VISIBLE IterIds : public ModelIterPrivate
class GZ_FUEL_TOOLS_VISIBLE IterIds : public ModelIterPrivate
{
/// \brief Constructor
public: explicit IterIds(std::vector<ModelIdentifier> _ids);
Expand All @@ -108,7 +108,7 @@ namespace gz

/// \brief class for iterating through model ids where all are known
/// in advance
class IGNITION_FUEL_TOOLS_VISIBLE IterModels: public ModelIterPrivate
class GZ_FUEL_TOOLS_VISIBLE IterModels: public ModelIterPrivate
{
/// \brief Constructor
public: explicit IterModels(std::vector<Model> _models);
Expand All @@ -130,7 +130,7 @@ namespace gz
};

/// \brief class for iterating through model ids from a rest API
class IGNITION_FUEL_TOOLS_VISIBLE IterRestIds: public ModelIterPrivate
class GZ_FUEL_TOOLS_VISIBLE IterRestIds: public ModelIterPrivate
{
/// \brief constructor
public: IterRestIds(const Rest &_rest,
Expand Down
2 changes: 1 addition & 1 deletion src/ModelPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace gz
namespace fuel_tools
{
/// \brief Private class, do not use
class IGNITION_FUEL_TOOLS_VISIBLE ModelPrivate
class GZ_FUEL_TOOLS_VISIBLE ModelPrivate
{
/// \brief How this model is ID'd
public: ModelIdentifier id;
Expand Down
8 changes: 4 additions & 4 deletions src/WorldIterPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace gz
class WorldIter;

/// \brief Private class, do not include or instantiate
class IGNITION_FUEL_TOOLS_VISIBLE WorldIterFactory
class GZ_FUEL_TOOLS_VISIBLE WorldIterFactory
{
/// \brief Create a world iterator from a vector of world identifiers
/// \param[in] _ids World identifiers
Expand All @@ -62,7 +62,7 @@ namespace gz
};

/// \brief Private class, do not include or instantiate
class IGNITION_FUEL_TOOLS_VISIBLE WorldIterPrivate
class GZ_FUEL_TOOLS_VISIBLE WorldIterPrivate
{
/// \brief Destructor
public: virtual ~WorldIterPrivate();
Expand All @@ -79,7 +79,7 @@ namespace gz
};

/// \brief Class for iterating through world ids
class IGNITION_FUEL_TOOLS_VISIBLE WorldIterIds : public WorldIterPrivate
class GZ_FUEL_TOOLS_VISIBLE WorldIterIds : public WorldIterPrivate
{
/// \brief Constructor
/// \param[in] _ids Vector of ids
Expand All @@ -102,7 +102,7 @@ namespace gz
};

/// \brief class for iterating through world ids from a rest API
class IGNITION_FUEL_TOOLS_VISIBLE WorldIterRestIds: public WorldIterPrivate
class GZ_FUEL_TOOLS_VISIBLE WorldIterRestIds: public WorldIterPrivate
{
/// \brief Constructor
/// \param[in] _rest REST client
Expand Down
22 changes: 11 additions & 11 deletions src/ign.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,13 @@ extern "C" bool getOwnerWorlds(
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE char *ignitionVersion()
extern "C" GZ_FUEL_TOOLS_VISIBLE char *ignitionVersion()
{
return strdup(IGNITION_FUEL_TOOLS_VERSION_FULL);
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int listModels(const char *_url,
extern "C" GZ_FUEL_TOOLS_VISIBLE int listModels(const char *_url,
const char *_owner, const char *_raw, const char *_configFile)
{
std::string urlStr{_url};
Expand Down Expand Up @@ -381,7 +381,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int listModels(const char *_url,
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int listWorlds(const char *_url,
extern "C" GZ_FUEL_TOOLS_VISIBLE int listWorlds(const char *_url,
const char *_owner, const char *_raw, const char *_configFile)
{
std::string urlStr{_url};
Expand Down Expand Up @@ -471,7 +471,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int listWorlds(const char *_url,
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int downloadUrl(const char *_url,
extern "C" GZ_FUEL_TOOLS_VISIBLE int downloadUrl(const char *_url,
const char *_configFile, const char *_header, const char *_type, int _jobs)
{
// Add signal handler for SIGTERM and SIGINT. Ctrl-C doesn't work without this
Expand Down Expand Up @@ -655,13 +655,13 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int downloadUrl(const char *_url,
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE void cmdVerbosity(const char *_verbosity)
extern "C" GZ_FUEL_TOOLS_VISIBLE void cmdVerbosity(const char *_verbosity)
{
gz::common::Console::SetVerbosity(std::atoi(_verbosity));
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int upload(const char *_path,
extern "C" GZ_FUEL_TOOLS_VISIBLE int upload(const char *_path,
const char *_url, const char *_header, const char *_private,
const char *_owner)
{
Expand Down Expand Up @@ -737,7 +737,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int upload(const char *_path,
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int deleteUrl(
extern "C" GZ_FUEL_TOOLS_VISIBLE int deleteUrl(
const char *_url, const char *_header)
{
gz::fuel_tools::ClientConfig conf;
Expand Down Expand Up @@ -779,7 +779,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int deleteUrl(
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int config2Pbtxt(const char *_path)
extern "C" GZ_FUEL_TOOLS_VISIBLE int config2Pbtxt(const char *_path)
{
gz::msgs::FuelMetadata meta;

Expand All @@ -799,7 +799,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int config2Pbtxt(const char *_path)
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int pbtxt2Config(const char *_path)
extern "C" GZ_FUEL_TOOLS_VISIBLE int pbtxt2Config(const char *_path)
{
gz::msgs::FuelMetadata meta;

Expand All @@ -823,7 +823,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int pbtxt2Config(const char *_path)
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int editUrl(
extern "C" GZ_FUEL_TOOLS_VISIBLE int editUrl(
const char *_url, const char *_header, const char *_private,
const char *_path)
{
Expand Down Expand Up @@ -900,7 +900,7 @@ extern "C" IGNITION_FUEL_TOOLS_VISIBLE int editUrl(
}

//////////////////////////////////////////////////
extern "C" IGNITION_FUEL_TOOLS_VISIBLE int update(
extern "C" GZ_FUEL_TOOLS_VISIBLE int update(
const char *_onlyModels, const char *_onlyWorlds, const char *_header)
{
// Add signal handler for SIGTERM and SIGINT. Ctrl-C doesn't work without this
Expand Down
Loading

0 comments on commit b1fd67a

Please sign in to comment.