RTI Connext Modern C++ API
Version 6.1.1
|
<<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. More... | |
const dds::pub::qos::DataWriterQos | qos () const |
Get the QoS for this AnyDataWriter. More... | |
void | qos (const dds::pub::qos::DataWriterQos &the_qos) |
Set the QoS for this AnyDataWriter. More... | |
const std::string & | topic_name () const |
Get the topic name for this AnyDataWriter. More... | |
const std::string & | type_name () const |
Get the type name for this AnyDataWriter. More... | |
const dds::pub::Publisher & | publisher () const |
Get the publisher for this AnyDataWriter. More... | |
void | wait_for_acknowledgments (const dds::core::Duration &timeout) |
void | close () |
Close the DataWriter. More... | |
void | retain () |
Retain this AnyDataWriter. More... | |
template<typename T > | |
AnyDataWriter & | operator= (const dds::pub::DataWriter< T > &other) |
Assign a different DataWriter. More... | |
template<typename T > | |
DataWriter< T > | get () |
Gets the typed DataWriter from this AnyDataWriter. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename T > | |
DataWriter< T > | get (const AnyDataWriter &any_writer) |
Same as AnyDataWriter::get() More... | |
<<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 |
Referenced by operator=().
|
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.
References AnyDataWriter().
|
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()