RTI Connext Modern C++ API
Version 5.2.0
|
<<reference-type>> This class provides an non-template holder for representing a DataWriter of any type More...
#include "dds/pub/AnyDataWriter.hpp"
Public Member Functions | |
template<typename T > | |
AnyDataWriter (const dds::pub::DataWriter< T > &dw) | |
Create an AnyDataWriter that represents a generic, untyped DataWriter. | |
dds::pub::qos::DataWriterQos | qos () const |
Get the QoS for this AnyDataWriter. | |
void | qos (const dds::pub::qos::DataWriterQos &the_qos) |
Set the QoS for this AnyDataWriter. | |
const std::string & | topic_name () const |
Get the topic name for this AnyDataWriter. | |
const std::string & | type_name () const |
Get the type name for this AnyDataWriter. | |
const dds::pub::Publisher & | publisher () const |
Get the publisher for this AnyDataWriter. | |
void | wait_for_acknowledgments (const dds::core::Duration &timeout) |
void | close () |
Close the DataWriter. | |
void | retain () |
Retain this AnyDataWriter. | |
template<typename T > | |
AnyDataWriter & | operator= (const dds::pub::DataWriter< T > &other) |
Assign a different DataWriter. | |
template<typename T > | |
DataWriter< T > | get () |
Gets the typed DataWriter from this AnyDataWriter. | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
DataWriter< T > | get (const AnyDataWriter &any_writer) |
Same as AnyDataWriter::get() | |
<<reference-type>> This class provides an non-template holder for representing a DataWriter of any type
This class is useful for code that uses DataWriters of different types. It provides access to type-independent DataWriter functions.
An AnyDataWriter is always created from a typed DataWriter, increasing its reference count. The member function get() allows getting the typed DataWriter back.
|
inline |
Create an AnyDataWriter that represents a generic, untyped DataWriter.
T | The type of the DataWriter that this AnyDataWriter is being created from |
dw | The typed DataWriter that this AnyDataWriter will represent |
|
inline |
Get the QoS for this AnyDataWriter.
|
inline |
Set the QoS for this AnyDataWriter.
the_qos | The QoS to set |
|
inline |
Get the topic name for this AnyDataWriter.
|
inline |
Get the type name for this AnyDataWriter.
|
inline |
Get the publisher for this AnyDataWriter.
|
inline |
|
inline |
Close the DataWriter.
|
inline |
Retain this AnyDataWriter.
|
inline |
Assign a different DataWriter.
Replaces the reference to the current writer with a new one, whose type T
can be different.
|
inline |
Gets the typed DataWriter from this AnyDataWriter.
T | The type of the DataWriter to extract |
dds::core::InvalidDowncastError | If this AnyDataWriter doesn't represent a DataWriter<T>. |
|
related |
Same as AnyDataWriter::get()