vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_SendTextMessageStreamProxy.h File Reference

Header allowing use of a output stream-style method of sending text messages from devices. More...

#include "vrpn_BaseClass.h"
#include <sstream>
Include dependency graph for vrpn_SendTextMessageStreamProxy.h:
This graph shows which files directly or indirectly include this file:

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.
 

Detailed Description

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.

Date
2011
Author
Ryan Pavlik rpavl.nosp@m.ik@i.nosp@m.astat.nosp@m.e.ed.nosp@m.u and abiry.nosp@m.an@r.nosp@m.yand..nosp@m.net http://academic.cleardefinition.com/ Iowa State University Virtual Reality Applications Center Human-Computer Interaction Graduate Program

Definition in file vrpn_SendTextMessageStreamProxy.h.

Function Documentation

◆ operator<<()

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.

Definition at line 109 of file vrpn_SendTextMessageStreamProxy.h.