Header allowing use of a output stream-style method of sending text messages from devices. More...
Go to the source code of this file.
Classes | |
class | vrpn_SendTextMessageStreamProxy |
Functions | |
template<typename T> | |
vrpn_SendTextMessageStreamProxy | operator<< (vrpn_BaseClassUnique::SendTextMessageBoundCall const &call, T const &firstData) |
Templated operator << that takes a vrpn_BaseClassUnique::SendTextMessageBoundCall on the left, and some data on the right, and uses that to initialize and return a temporary vrpn_SendTextMessageStreamProxy who will be able to accept additional streamed data before making the send_text_message call in its destructor at the end of the statement. | |
Header allowing use of a output stream-style method of sending text messages from devices.
Contains the operator<< overload needed to stream into a vrpn_BaseClassUnique::SendTextMessageBoundCall, and the proxy object containing an ostringstream that executes the bound call when it's done having data streamed in to it.
This is a separate header to avoid including <sstream> in vrpn_BaseClass.h since the functionality is only used by device implementations themselves, and not even all of them. Further, since we create the stream proxy only once we've seen an operator<< (rather than as a part of the bound call), we know that if a stream proxy exists, it has a message to send.
Definition in file vrpn_SendTextMessageStreamProxy.h.
vrpn_SendTextMessageStreamProxy operator<< | ( | vrpn_BaseClassUnique::SendTextMessageBoundCall const & | call, |
T const & | firstData ) |
Templated operator << that takes a vrpn_BaseClassUnique::SendTextMessageBoundCall on the left, and some data on the right, and uses that to initialize and return a temporary vrpn_SendTextMessageStreamProxy who will be able to accept additional streamed data before making the send_text_message call in its destructor at the end of the statement.
Definition at line 109 of file vrpn_SendTextMessageStreamProxy.h.