Skip to content

Commit

Permalink
Refs #21745. Apply suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Lopez Fernandez <[email protected]>
  • Loading branch information
juanlofer-eprosima committed Oct 8, 2024
1 parent 2f91fc0 commit c5fbb7a
Show file tree
Hide file tree
Showing 20 changed files with 1,279 additions and 108 deletions.
176 changes: 158 additions & 18 deletions include/fastdds/dds/domain/DomainParticipant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,17 +548,39 @@ class DomainParticipant : public Entity
PublisherQos& qos) const;

/**
* Fills the PublisherQos with the first publisher profile found in the given XML (or the one specified).
* Fills the PublisherQos with the first publisher profile found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos PublisherQos object where the qos is returned.
* @param profile_name Publisher profile name. Empty by default (first one found).
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_publisher_qos_from_xml(
const std::string& xml,
PublisherQos& qos) const;

/**
* Fills the PublisherQos with the publisher profile with \c profile_name to be found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos PublisherQos object where the qos is returned.
* @param profile_name Publisher profile name.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_publisher_qos_from_xml(
const std::string& xml,
PublisherQos& qos,
const std::string& profile_name = "") const;
const std::string& profile_name) const;

/**
* Fills the PublisherQos with the default publisher profile found in the provided XML (if there is).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos PublisherQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_default_publisher_qos_from_xml(
const std::string& xml,
PublisherQos& qos) const;

/**
* This operation sets a default value of the Subscriber QoS policies that will be used for newly created
Expand Down Expand Up @@ -615,17 +637,39 @@ class DomainParticipant : public Entity
SubscriberQos& qos) const;

/**
* Fills the SubscriberQos with the first subscriber profile found in the given XML (or the one specified).
* Fills the SubscriberQos with the first subscriber profile found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos SubscriberQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_subscriber_qos_from_xml(
const std::string& xml,
SubscriberQos& qos) const;

/**
* Fills the SubscriberQos with the subscriber profile with \c profile_name to be found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos SubscriberQos object where the qos is returned.
* @param profile_name Subscriber profile name. Empty by default (first one found).
* @param profile_name Subscriber profile name.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_subscriber_qos_from_xml(
const std::string& xml,
SubscriberQos& qos,
const std::string& profile_name = "") const;
const std::string& profile_name) const;

/**
* Fills the SubscriberQos with the default subscriber profile found in the provided XML (if there is).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos SubscriberQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_default_subscriber_qos_from_xml(
const std::string& xml,
SubscriberQos& qos) const;

/**
* This operation sets a default value of the Topic QoS policies which will be used for newly created
Expand Down Expand Up @@ -697,34 +741,86 @@ class DomainParticipant : public Entity
std::string& topic_data_type) const;

/**
* Fills the TopicQos with the first topic profile found in the given XML (or the one specified).
* Fills the TopicQos with the first topic profile found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos TopicQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_topic_qos_from_xml(
const std::string& xml,
TopicQos& qos) const;

/**
* Fills the TopicQos with the first topic profile found in the provided XML, and also its corresponding topic and data type names (if specified).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos TopicQos object where the qos is returned.
* @param topic_name String where the name of the topic associated to this profile is returned (if specified).
* @param topic_data_type String where the name of the topic data type associated to this profile is returned (if specified).
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_topic_qos_from_xml(
const std::string& xml,
TopicQos& qos,
std::string& topic_name,
std::string& topic_data_type) const;

/**
* Fills the TopicQos with the topic profile with \c profile_name to be found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos TopicQos object where the qos is returned.
* @param profile_name Topic profile name. Empty by default (first one found).
* @param profile_name Topic profile name.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_topic_qos_from_xml(
const std::string& xml,
TopicQos& qos,
const std::string& profile_name = "") const;
const std::string& profile_name) const;

/**
* Fills the TopicQos with the first topic profile found in the given XML (or the one specified), and also its corresponding topic and data type names (if specified).
* Fills the TopicQos with the topic profile with \c profile_name to be found in the provided XML, and also its corresponding topic and data type names (if specified).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos TopicQos object where the qos is returned.
* @param topic_name String where the name of the topic associated to this profile is returned (if specified).
* @param topic_data_type String where the name of the topic data type associated to this profile is returned (if specified).
* @param profile_name Topic profile name. Empty by default (first one found).
* @param profile_name Topic profile name.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_topic_qos_from_xml(
const std::string& xml,
TopicQos& qos,
std::string& topic_name,
std::string& topic_data_type,
const std::string& profile_name = "") const;
const std::string& profile_name) const;

/**
* Fills the TopicQos with the default topic profile found in the provided XML (if there is).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos TopicQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_default_topic_qos_from_xml(
const std::string& xml,
TopicQos& qos) const;

/**
* Fills the TopicQos with the default topic profile found in the provided XML (if there is), and also its corresponding topic and data type names (if specified).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos TopicQos object where the qos is returned.
* @param topic_name String where the name of the topic associated to this profile is returned (if specified).
* @param topic_data_type String where the name of the topic data type associated to this profile is returned (if specified).
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_default_topic_qos_from_xml(
const std::string& xml,
TopicQos& qos,
std::string& topic_name,
std::string& topic_data_type) const;

/**
* Fills the ReplierQos with the values of the XML profile.
Expand All @@ -738,17 +834,39 @@ class DomainParticipant : public Entity
ReplierQos& qos) const;

/**
* Fills the ReplierQos with the first replier profile found in the given XML (or the one specified).
* Fills the ReplierQos with the first replier profile found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos ReplierQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_replier_qos_from_xml(
const std::string& xml,
ReplierQos& qos) const;

/**
* Fills the ReplierQos with the replier profile with \c profile_name to be found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos ReplierQos object where the qos is returned.
* @param profile_name Replier profile name. Empty by default (first one found).
* @param profile_name Replier profile name.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_replier_qos_from_xml(
const std::string& xml,
ReplierQos& qos,
const std::string& profile_name = "") const;
const std::string& profile_name) const;

/**
* Fills the ReplierQos with the default replier profile found in the provided XML (if there is).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos ReplierQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_default_replier_qos_from_xml(
const std::string& xml,
ReplierQos& qos) const;

/**
* Fills the RequesterQos with the values of the XML profile.
Expand All @@ -762,17 +880,39 @@ class DomainParticipant : public Entity
RequesterQos& qos) const;

/**
* Fills the RequesterQos with the first requester profile found in the given XML (or the one specified).
* Fills the RequesterQos with the first requester profile found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos RequesterQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_requester_qos_from_xml(
const std::string& xml,
RequesterQos& qos) const;

/**
* Fills the RequesterQos with the requester profile with \c profile_name to be found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos RequesterQos object where the qos is returned.
* @param profile_name Requester profile name. Empty by default (first one found).
* @param profile_name Requester profile name.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_requester_qos_from_xml(
const std::string& xml,
RequesterQos& qos,
const std::string& profile_name = "") const;
const std::string& profile_name) const;

/**
* Fills the RequesterQos with the default requester profile found in the provided XML (if there is).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos RequesterQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_default_requester_qos_from_xml(
const std::string& xml,
RequesterQos& qos) const;

/**
* Retrieves the list of DomainParticipants that have been discovered in the domain and are not "ignored".
Expand Down
58 changes: 51 additions & 7 deletions include/fastdds/dds/domain/DomainParticipantFactory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,39 @@ class DomainParticipantFactory
DomainParticipantQos& qos) const;

/**
* Fills the DomainParticipantQos with the first DomainParticipant profile found in the given XML (or the one specified).
* Fills the DomainParticipantQos with the first DomainParticipant profile found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos DomainParticipantQos object where the qos is returned.
* @param profile_name DomainParticipant profile name. Empty by default (first one found).
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_participant_qos_from_xml(
const std::string& xml,
DomainParticipantQos& qos) const;

/**
* Fills the DomainParticipantQos with the DomainParticipant profile with \c profile_name to be found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos DomainParticipantQos object where the qos is returned.
* @param profile_name DomainParticipant profile name.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_participant_qos_from_xml(
const std::string& xml,
DomainParticipantQos& qos,
const std::string& profile_name = "") const;
const std::string& profile_name) const;

/**
* Fills the DomainParticipantQos with the default DomainParticipant profile found in the provided XML (if there is).
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param qos DomainParticipantQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_default_participant_qos_from_xml(
const std::string& xml,
DomainParticipantQos& qos) const;

/**
* Fills the DomainParticipantExtendedQos with the values of the XML profile.
Expand All @@ -254,17 +276,39 @@ class DomainParticipantFactory
DomainParticipantExtendedQos& extended_qos) const;

/**
* Fills the DomainParticipantExtendedQos with the first DomainParticipant profile found in the given XML (or the one specified).
* Fills the DomainParticipantExtendedQos with the first DomainParticipant profile found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c qos structure.
* @param xml Raw XML string containing the profile to be used to fill the \c extended_qos structure.
* @param extended_qos DomainParticipantExtendedQos object where the qos is returned.
* @param profile_name DomainParticipant profile name. Empty by default (first one found).
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_participant_extended_qos_from_xml(
const std::string& xml,
DomainParticipantExtendedQos& extended_qos) const;

/**
* Fills the DomainParticipantExtendedQos with the DomainParticipant profile with \c profile_name to be found in the provided XML.
*
* @param xml Raw XML string containing the profile to be used to fill the \c extended_qos structure.
* @param extended_qos DomainParticipantExtendedQos object where the qos is returned.
* @param profile_name DomainParticipant profile name.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_participant_extended_qos_from_xml(
const std::string& xml,
DomainParticipantExtendedQos& extended_qos,
const std::string& profile_name = "") const;
const std::string& profile_name) const;

/**
* Fills the DomainParticipantExtendedQos with the default DomainParticipant profile found in the provided XML (if there is).
*
* @param xml Raw XML string containing the profile to be used to fill the \c extended_qos structure.
* @param qos DomainParticipantExtendedQos object where the qos is returned.
* @return RETCODE_OK on success. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_default_participant_extended_qos_from_xml(
const std::string& xml,
DomainParticipantExtendedQos& extended_qos) const;

/**
* Fills the DomainParticipantExtendedQos with the values of the default XML profile.
Expand Down
Loading

0 comments on commit c5fbb7a

Please sign in to comment.