RTI Connext Modern C++ API Version 7.3.0
dds::pub::qos::PublisherQos Class Reference

<<value-type>> Container of the QoS policies that a dds::pub::Publisher supports More...

#include <dds/pub/qos/PublisherQos.hpp>

Public Member Functions

template<typename POLICY >
const POLICY & policy () const
 Gets a QoS policy by const reference. More...
 
template<typename POLICY >
POLICY & policy ()
 Gets a QoS policy by reference. More...
 
template<typename Policy >
PublisherQospolicy (const Policy &p)
 Sets a policy. More...
 
template<typename Policy >
PublisherQosoperator<< (const Policy &p)
 Sets a policy. More...
 
template<typename Policy >
const PublisherQosoperator>> (Policy &p) const
 Copies the values of a policy. More...
 

Related Functions

(Note that these are not member functions.)

void swap (PublisherQosImpl &left, PublisherQosImpl &right) OMG_NOEXCEPT
 Swap the contents of two PublisherQos objects. More...
 
std::string to_string (const PublisherQos &qos, const rti::core::QosPrintFormat &format=rti::core::QosPrintFormat())
 <<extension>> Obtains a string representation of the dds::pub::qos::PublisherQos More...
 
std::string to_string (const PublisherQos &qos, const PublisherQos &base, const rti::core::QosPrintFormat &format=rti::core::QosPrintFormat())
 <<extension>> Obtains a string representation of the dds::pub::qos::PublisherQos More...
 
std::string to_string (const PublisherQos &qos, const rti::core::qos_print_all_t &qos_print_all, const rti::core::QosPrintFormat &format=rti::core::QosPrintFormat())
 <<extension>> Obtains a string representation of the dds::pub::qos::PublisherQos More...
 
std::ostream & operator<< (std::ostream &out, const rti::pub::qos::PublisherQos &qos)
 <<extension>> Prints a dds::pub::qos::PublisherQos to an output stream. More...
 

Detailed Description

Member Function Documentation

◆ policy() [1/3]

template<typename POLICY >
const POLICY & dds::pub::qos::PublisherQos::policy ( ) const

Gets a QoS policy by const reference.

Template Parameters
PolicyOne of the PublisherQos Policies
See also
Setting Qos Values

◆ policy() [2/3]

template<typename POLICY >
POLICY & dds::pub::qos::PublisherQos::policy ( )

Gets a QoS policy by reference.

Template Parameters
PolicyOne of the PublisherQos Policies
See also
Setting Qos Values

◆ policy() [3/3]

template<typename Policy >
PublisherQos & dds::pub::qos::PublisherQos::policy ( const Policy &  p)
inline

Sets a policy.

See also
policy()
Setting Qos Values

◆ operator<<()

template<typename Policy >
PublisherQos & dds::pub::qos::PublisherQos::operator<< ( const Policy &  p)
inline

Sets a policy.

See also
policy()
Setting Qos Values

◆ operator>>()

template<typename Policy >
const PublisherQos & dds::pub::qos::PublisherQos::operator>> ( Policy &  p) const
inline

Copies the values of a policy.

Parameters
pThe destination where to copy the current value of the Policy
See also
policy()
Setting Qos Values

Friends And Related Function Documentation

◆ swap()

void swap ( PublisherQosImpl &  left,
PublisherQosImpl &  right 
)
related

Swap the contents of two PublisherQos objects.

Parameters
leftA PublisherQos
rightThe other PublisherQos

◆ to_string() [1/3]

std::string to_string ( const PublisherQos qos,
const rti::core::QosPrintFormat format = rti::core::QosPrintFormat() 
)
related

<<extension>> Obtains a string representation of the dds::pub::qos::PublisherQos

Parameters
qosThe qos object to convert to a string
formatThe optional print format used to format the output string.

The several to_string overloads allow formatting the output and printing only the differences with respect to another Qos object.

PublisherQos qos;
// When no QosPrintFormat is supplied, the default is used. Similarly, since
// no base profile has been specified we will only print the differences
// with respect to the documented default for PublisherQos
// In this overload we are specifying the print format used to format the output
// string.
QosPrintFormat format; // ...;
str = to_string(qos, format);
// Here, the differences between qos and base will be included in the output
// string. If the two qos objects are the same, the resulting string will
// be empty.
PublisherQos base; // ...;
str = to_string(qos, base);
// We could also specify the format at this point
str = to_string(qos, base, format);
// Instead of supplying a base profile, the sentinel value qos_print_all can
// be supplied. This will result in the entire Qos object being printed (as
// opposed to only the differences with respect to a base qos).
std::string to_string(const PublisherQos &qos, const rti::core::QosPrintFormat &format=rti::core::QosPrintFormat())
<<extension>> Obtains a string representation of the dds::pub::qos::PublisherQos
const qos_print_all_t qos_print_all
Sentinel value that selects the to_string overload that prints all of the values of a Qos object.
basic_string< char, rti::core::memory::OsapiAllocator< char > > string
A string convertible to std::string and with similar functionality.
Definition: String.hpp:266

This overload uses the default print format and only prints the differences between qos and the documented default.

Returns
The string representation of the qos

◆ to_string() [2/3]

std::string to_string ( const PublisherQos qos,
const PublisherQos base,
const rti::core::QosPrintFormat format = rti::core::QosPrintFormat() 
)
related

<<extension>> Obtains a string representation of the dds::pub::qos::PublisherQos

Parameters
qosThe qos object to convert to a string
baseThe base qos. Only the differences between base and qos are included in the output string. If you want to print everything within the QoS, use the overload that accepts a rti::core::qos_print_all_t.
formatThe optional print format used to format the output string.

This overload prints the differences between qos and base. If no print format is specified, the default will be used.

Returns
The string representation of the qos

◆ to_string() [3/3]

std::string to_string ( const PublisherQos qos,
const rti::core::qos_print_all_t qos_print_all,
const rti::core::QosPrintFormat format = rti::core::QosPrintFormat() 
)
related

<<extension>> Obtains a string representation of the dds::pub::qos::PublisherQos

Parameters
qosThe qos object to convert to a string
qos_print_allThe sentinel value indicating that the entire QoS should be converted to a string. The other overloads of this API only print the differences with respect to a base profile, or to the documented default.
formatThe optional print format used to format the output string.

This overload prints all of the policies within qos. If no print format is specified, the default will be used.

The only valid value for the qos_print_all argument is rti::core::qos_print_all

For example:

Returns
The string representation of the qos

◆ operator<<()

std::ostream & operator<< ( std::ostream &  out,
const rti::pub::qos::PublisherQos &  qos 
)
related

<<extension>> Prints a dds::pub::qos::PublisherQos to an output stream.