Skip to content

Commit

Permalink
Migrate Export.hh macros and update 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 6ebd9b9 commit 3a68528
Show file tree
Hide file tree
Showing 31 changed files with 67 additions and 65 deletions.
6 changes: 3 additions & 3 deletions include/gz/transport/AdvertiseOptions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace gz
/// \brief A class for customizing the publication options for a topic or
/// service advertised.
/// E.g.: Set the scope of a topic/service.
class IGNITION_TRANSPORT_VISIBLE AdvertiseOptions
class GZ_TRANSPORT_VISIBLE AdvertiseOptions
{
/// \brief Constructor.
public: AdvertiseOptions();
Expand Down Expand Up @@ -131,7 +131,7 @@ namespace gz
/// \brief A class for customizing the publication options for a topic
/// advertised.
/// E.g.: Set the rate of messages per second published.
class IGNITION_TRANSPORT_VISIBLE AdvertiseMessageOptions
class GZ_TRANSPORT_VISIBLE AdvertiseMessageOptions
: public AdvertiseOptions
{
/// \brief Constructor.
Expand Down Expand Up @@ -213,7 +213,7 @@ namespace gz

/// \brief A class for customizing the publication options for a service
/// advertised.
class IGNITION_TRANSPORT_VISIBLE AdvertiseServiceOptions
class GZ_TRANSPORT_VISIBLE AdvertiseServiceOptions
: public AdvertiseOptions
{
/// \brief Constructor.
Expand Down
18 changes: 9 additions & 9 deletions include/gz/transport/CIface.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ extern "C" {
/// IGN_PARTITION environment variable.
/// \return A pointer to a new transport node. Do not manually delete this
/// pointer, instead use ignTransportNodeDestroy.
IgnTransportNode IGNITION_TRANSPORT_VISIBLE *ignTransportNodeCreate(
IgnTransportNode GZ_TRANSPORT_VISIBLE *ignTransportNodeCreate(
const char *_partition);

/// \brief Destroy a transport node.
/// \param[in, out] _node The transport node to destroy.
void IGNITION_TRANSPORT_VISIBLE
void GZ_TRANSPORT_VISIBLE
ignTransportNodeDestroy(IgnTransportNode **_node);

/// \brief Advertise a topic.
/// \param[in] _node Pointer to a node.
/// \param[in] _topic Topic on which to publish the message.
/// \param[in] _msgType Name of the message type.
/// \return 0 on success.
int IGNITION_TRANSPORT_VISIBLE
int GZ_TRANSPORT_VISIBLE
ignTransportAdvertise(IgnTransportNode *_node,
const char *_topic,
const char *_msgType);
Expand All @@ -63,7 +63,7 @@ extern "C" {
/// \param[in] _data Byte array of serialized data to publish.
/// \param[in] _msgType Name of the message type.
/// \return 0 on success.
int IGNITION_TRANSPORT_VISIBLE
int GZ_TRANSPORT_VISIBLE
ignTransportPublish(IgnTransportNode *_node,
const char *_topic,
const void *_data,
Expand All @@ -75,7 +75,7 @@ extern "C" {
/// \param[in] _callback The function to call when a message is received.
/// \param[in] _userData Arbitrary user data pointer.
/// \return 0 on success.
int IGNITION_TRANSPORT_VISIBLE
int GZ_TRANSPORT_VISIBLE
ignTransportSubscribe(IgnTransportNode *_node,
const char *_topic,
void (*_callback)(const char *, size_t, const char *, void *),
Expand All @@ -88,7 +88,7 @@ extern "C" {
/// \param[in] _callback The function to call when a message is received.
/// \param[in] _userData Arbitrary user data pointer.
/// \return 0 on success.
int IGNITION_TRANSPORT_VISIBLE
int GZ_TRANSPORT_VISIBLE
ignTransportSubscribeOptions(IgnTransportNode *_node,
const char *_topic, SubscribeOpts _opts,
void (*_callback)(const char *, size_t, const char *, void *),
Expand All @@ -100,7 +100,7 @@ extern "C" {
/// \param[in] _callback The function to call when a message is received.
/// \param[in] _userData Arbitrary user data pointer.
/// \return 0 on success.
int IGNITION_TRANSPORT_VISIBLE
int GZ_TRANSPORT_VISIBLE
ignTransportSubscribeNonConst(IgnTransportNode *_node, char *_topic,
void (*_callback)(char *, size_t, char *, void *),
void *_userData);
Expand All @@ -109,13 +109,13 @@ extern "C" {
/// \param[in] _node Pointer to a node.
/// \param[in] _topic Name of the topic.
/// \return 0 on success.
int IGNITION_TRANSPORT_VISIBLE
int GZ_TRANSPORT_VISIBLE
ignTransportUnsubscribe(IgnTransportNode *_node, const char *_topic);

/// \brief Block the current thread until a SIGINT or SIGTERM is received.
/// Note that this function registers a signal handler. Do not use this
/// function if you want to manage yourself SIGINT/SIGTERM.
void IGNITION_TRANSPORT_VISIBLE ignTransportWaitForShutdown();
void GZ_TRANSPORT_VISIBLE ignTransportWaitForShutdown();

#ifdef __cplusplus
}
Expand Down
6 changes: 3 additions & 3 deletions include/gz/transport/Clock.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace gz
//
//////////////////////////////////////////////////
/// \brief A Clock interface for time tracking
class IGNITION_TRANSPORT_VISIBLE Clock
class GZ_TRANSPORT_VISIBLE Clock
{
/// \brief Gets clock time
/// \return Current clock time, in nanoseconds
Expand All @@ -53,7 +53,7 @@ namespace gz
/// \brief A Clock interface implementation that uses
/// gz::msgs::Clock messages distributed across
/// the network
class IGNITION_TRANSPORT_VISIBLE NetworkClock : public Clock
class GZ_TRANSPORT_VISIBLE NetworkClock : public Clock
{
/// \brief Network clock time bases
public: enum class TimeBase : int64_t
Expand Down Expand Up @@ -96,7 +96,7 @@ namespace gz

//////////////////////////////////////////////////
/// \brief A Clock implementation that leverages host OS time APIs
class IGNITION_TRANSPORT_VISIBLE WallClock : public Clock
class GZ_TRANSPORT_VISIBLE WallClock : public Clock
{
/// \brief Returns system wall clock interface
/// \return The sole wall clock instance (a singleton)
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/Discovery.hh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ namespace gz
/// \param[in] _sockets Sockets on which to listen.
/// \param[in] _timeout Length of time to poll (milliseconds).
/// \return True if the sockets received a reply.
bool IGNITION_TRANSPORT_VISIBLE pollSockets(
bool GZ_TRANSPORT_VISIBLE pollSockets(
const std::vector<int> &_sockets,
const int _timeout);

Expand Down
6 changes: 3 additions & 3 deletions include/gz/transport/Helpers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ namespace gz
/// \param[in] _name Name of the environment variable.
/// \param[out] _value Value if the variable was found.
/// \return True if the variable was found or false otherwise.
bool IGNITION_TRANSPORT_VISIBLE env(const std::string &_name,
bool GZ_TRANSPORT_VISIBLE env(const std::string &_name,
std::string &_value);

/// \brief split at a one character delimiter to get a vector of something
/// \param[in] _orig The string to split
/// \param[in] _delim a character to split the string at
/// \returns vector of split pieces of the string excluding the delimiter
std::vector<std::string> IGNITION_TRANSPORT_VISIBLE split(
std::vector<std::string> GZ_TRANSPORT_VISIBLE split(
const std::string &_orig,
char _delim);

/// \brief Portable function to get the id of the current process.
/// \returns id of current process
unsigned int IGNITION_TRANSPORT_VISIBLE getProcessId();
unsigned int GZ_TRANSPORT_VISIBLE getProcessId();

// Use safer functions on Windows
#ifdef _MSC_VER
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/MessageInfo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace gz
class MessageInfoPrivate;

/// \brief A class that provides information about the message received.
class IGNITION_TRANSPORT_VISIBLE MessageInfo
class GZ_TRANSPORT_VISIBLE MessageInfo
{
/// \brief Default constructor.
public: MessageInfo();
Expand Down
8 changes: 4 additions & 4 deletions include/gz/transport/NetUtils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,24 @@ namespace gz
/// Reference: https://github.com/ros/ros_comm/blob/hydro-devel/clients/
/// roscpp/src/libros/network.cpp
/// \return The IP or hostname of this host.
std::string IGNITION_TRANSPORT_VISIBLE determineHost();
std::string GZ_TRANSPORT_VISIBLE determineHost();

/// \brief Determine the list of network interfaces for this machine.
/// Reference: https://github.com/ros/ros_comm/blob/hydro-devel/clients/
/// roscpp/src/libros/network.cpp
/// \return The list of network interfaces.
std::vector<std::string> IGNITION_TRANSPORT_VISIBLE determineInterfaces();
std::vector<std::string> GZ_TRANSPORT_VISIBLE determineInterfaces();

/// \brief Determine the computer's hostname.
/// \return The computer's hostname.
std::string IGNITION_TRANSPORT_VISIBLE hostname();
std::string GZ_TRANSPORT_VISIBLE hostname();

/// \brief Determine your login name.
/// \return Name used to gain access to the computer.
/// On linux and Mac only, if determination
/// of your login name failes then a string of the form "error-UUID"
/// is returned where UUID is a universally unique identifier.
std::string IGNITION_TRANSPORT_VISIBLE username();
std::string GZ_TRANSPORT_VISIBLE username();
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions include/gz/transport/Node.hh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace gz
/// If the buffer is set to unlimited, then your buffer will grow until
/// you run out of memory (and probably crash).
/// If your buffer reaches the maximum capacity data will be dropped.
int IGNITION_TRANSPORT_VISIBLE rcvHwm();
int GZ_TRANSPORT_VISIBLE rcvHwm();

/// \brief Get the capacity of the buffer (High Water Mark)
/// that stores outgoing Ignition Transport messages. Note that this is a
Expand All @@ -81,18 +81,18 @@ namespace gz
/// If the buffer is set to unlimited, then your buffer will grow until
/// you run out of memory (and probably crash).
/// If your buffer reaches the maximum capacity data will be dropped.
int IGNITION_TRANSPORT_VISIBLE sndHwm();
int GZ_TRANSPORT_VISIBLE sndHwm();

/// \brief Block the current thread until a SIGINT or SIGTERM is received.
/// Note that this function registers a signal handler. Do not use this
/// function if you want to manage yourself SIGINT/SIGTERM.
void IGNITION_TRANSPORT_VISIBLE waitForShutdown();
void GZ_TRANSPORT_VISIBLE waitForShutdown();

/// \class Node Node.hh gz/transport/Node.hh
/// \brief A class that allows a client to communicate with other peers.
/// There are two main communication modes: pub/sub messages and service
/// calls.
class IGNITION_TRANSPORT_VISIBLE Node
class GZ_TRANSPORT_VISIBLE Node
{
class PublisherPrivate;

Expand All @@ -112,7 +112,7 @@ namespace gz
/// // when publishing to interprocess subscribers.
/// pub.Publish(msg);
/// }
public: class IGNITION_TRANSPORT_VISIBLE Publisher
public: class GZ_TRANSPORT_VISIBLE Publisher
{
/// \brief Default constructor.
public: Publisher();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/NodeOptions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace gz
/// \class NodeOptions NodeOptions.hh gz/transport/NodeOptions.hh
/// \brief A class for customizing the behavior of the Node.
/// E.g.: Set a custom namespace or a partition name.
class IGNITION_TRANSPORT_VISIBLE NodeOptions
class GZ_TRANSPORT_VISIBLE NodeOptions
{
/// \brief Constructor.
public: NodeOptions();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/NodeShared.hh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace gz
/// \class NodeShared NodeShared.hh gz/transport/NodeShared.hh
/// \brief Private data for the Node class. This class should not be
/// directly used. You should use the Node class.
class IGNITION_TRANSPORT_VISIBLE NodeShared
class GZ_TRANSPORT_VISIBLE NodeShared
{
/// \brief NodeShared is a singleton. This method gets the
/// NodeShared instance shared between all the nodes.
Expand Down
6 changes: 3 additions & 3 deletions include/gz/transport/Publisher.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace gz
/// gz/transport/Publisher.hh
/// \brief This class stores all the information about a publisher.
/// It stores the topic name that publishes, addresses, UUIDs, scope, etc.
class IGNITION_TRANSPORT_VISIBLE Publisher
class GZ_TRANSPORT_VISIBLE Publisher
{
/// \brief Default constructor.
public: Publisher() = default;
Expand Down Expand Up @@ -178,7 +178,7 @@ namespace gz
/// \class MessagePublisher Publisher.hh
/// gz/transport/Publisher.hh
/// \brief This class stores all the information about a message publisher.
class IGNITION_TRANSPORT_VISIBLE MessagePublisher : public Publisher
class GZ_TRANSPORT_VISIBLE MessagePublisher : public Publisher
{
/// \brief Default constructor.
public: MessagePublisher() = default;
Expand Down Expand Up @@ -293,7 +293,7 @@ namespace gz
/// \class ServicePublisher Publisher.hh
/// gz/transport/Publisher.hh
/// \brief This class stores all the information about a service publisher.
class IGNITION_TRANSPORT_VISIBLE ServicePublisher : public Publisher
class GZ_TRANSPORT_VISIBLE ServicePublisher : public Publisher
{
/// \brief Default constructor.
public: ServicePublisher() = default;
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/RepHandler.hh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace gz
//
/// \class IRepHandler RepHandler.hh gz/transport/RepHandler.hh
/// \brief Interface class used to manage a replier handler.
class IGNITION_TRANSPORT_VISIBLE IRepHandler
class GZ_TRANSPORT_VISIBLE IRepHandler
{
/// \brief Constructor.
public: IRepHandler()
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/ReqHandler.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace gz
//
/// \class IReqHandler ReqHandler.hh gz/transport/ReqHandler.hh
/// \brief Interface class used to manage a request handler.
class IGNITION_TRANSPORT_VISIBLE IReqHandler
class GZ_TRANSPORT_VISIBLE IReqHandler
{
/// \brief Constructor.
/// \param[in] _nUuid UUID of the node registering the request handler.
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/SubscribeOptions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace gz
/// \class SubscribeOptions SubscribeOptions.hh
/// gz/transport/SubscribeOptions.hh
/// \brief A class to provide different options for a subscription.
class IGNITION_TRANSPORT_VISIBLE SubscribeOptions
class GZ_TRANSPORT_VISIBLE SubscribeOptions
{
/// \brief Constructor.
public: SubscribeOptions();
Expand Down
4 changes: 2 additions & 2 deletions include/gz/transport/SubscriptionHandler.hh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace gz
//
/// \brief SubscriptionHandlerBase contains functions and data which are
/// common to all SubscriptionHandler types.
class IGNITION_TRANSPORT_VISIBLE SubscriptionHandlerBase
class GZ_TRANSPORT_VISIBLE SubscriptionHandlerBase
{
/// \brief Constructor.
/// \param[in] _nUuid UUID of the node registering the handler.
Expand Down Expand Up @@ -120,7 +120,7 @@ namespace gz
/// deserializing protobuf message data, and for receiving deserialized
/// messages. Those functions are not needed by the RawSubscriptionHandler
/// class.
class IGNITION_TRANSPORT_VISIBLE ISubscriptionHandler
class GZ_TRANSPORT_VISIBLE ISubscriptionHandler
: public SubscriptionHandlerBase
{
/// \brief Constructor.
Expand Down
4 changes: 2 additions & 2 deletions include/gz/transport/TopicStatistics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace gz

/// \brief Computes the rolling average, min, max, and standard
/// deviation for a set of samples.
class IGNITION_TRANSPORT_VISIBLE Statistics
class GZ_TRANSPORT_VISIBLE Statistics
{
/// \brief Default constructor.
public: Statistics() = default;
Expand Down Expand Up @@ -110,7 +110,7 @@ namespace gz
/// Publication statistics utilize time stamps generated by the
/// publisher. Receive statistics use time stamps generated by the
/// subscriber.
class IGNITION_TRANSPORT_VISIBLE TopicStatistics
class GZ_TRANSPORT_VISIBLE TopicStatistics
{
/// \brief Default constructor.
public: TopicStatistics();
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/TopicUtils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace gz
//
/// \class TopicUtils TopicUtils.hh gz/transport/TopicUtils.hh
/// \brief This class provides different utilities related with topics.
class IGNITION_TRANSPORT_VISIBLE TopicUtils
class GZ_TRANSPORT_VISIBLE TopicUtils
{
/// \brief Determines if a namespace is valid. A namespace's length must
/// not exceed kMaxNameLength.
Expand Down
2 changes: 1 addition & 1 deletion include/gz/transport/Uuid.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace gz
//
/// \class Uuid Uuid.hh gz/transport/Uuid.hh
/// \brief A portable class for representing a Universally Unique Identifier
class IGNITION_TRANSPORT_VISIBLE Uuid
class GZ_TRANSPORT_VISIBLE Uuid
{
/// \brief Constructor.
public: Uuid();
Expand Down
2 changes: 1 addition & 1 deletion log/include/gz/transport/log/Batch.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace gz
class Log;

/// \brief Holds the result of a query for messages
class IGNITION_TRANSPORT_LOG_VISIBLE Batch
class GZ_TRANSPORT_LOG_VISIBLE Batch
{
/// \brief Default constructor
public: Batch();
Expand Down
2 changes: 1 addition & 1 deletion log/include/gz/transport/log/Descriptor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace gz
/// \brief The Descriptor class provides meta-information about what a log
/// contains. This may be useful for determining QueryOptions or for
/// generating a high-level overview of a Log's contents.
class IGNITION_TRANSPORT_LOG_VISIBLE Descriptor
class GZ_TRANSPORT_LOG_VISIBLE Descriptor
{
/// \brief A map from a name (e.g. topic name or message type name) to
/// the id of a row in one of the database tables. (name -> id)
Expand Down
2 changes: 1 addition & 1 deletion log/include/gz/transport/log/Log.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace gz
const std::string SchemaLocationEnvVar = "IGN_TRANSPORT_LOG_SQL_PATH";

/// \brief Interface to a log file
class IGNITION_TRANSPORT_LOG_VISIBLE Log
class GZ_TRANSPORT_LOG_VISIBLE Log
{
/// \brief constructor
public: Log();
Expand Down
Loading

0 comments on commit 3a68528

Please sign in to comment.