1157 lines
79 KiB
HTML
1157 lines
79 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>SFML - Simple and Fast Multimedia Library</title>
|
|
<meta http-equiv="Content-Type" content="text/html;"/>
|
|
<meta charset="utf-8"/>
|
|
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
|
|
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="banner-container">
|
|
<div id="banner">
|
|
<span id="sfml">SFML 2.5.1</span>
|
|
</div>
|
|
</div>
|
|
<div id="content">
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1Packet.html">Packet</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pro-methods">Protected Member Functions</a> |
|
|
<a href="#friends">Friends</a> |
|
|
<a href="classsf_1_1Packet-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">sf::Packet Class Reference<div class="ingroups"><a class="el" href="group__network.html">Network module</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Utility class to build blocks of data to transfer over the network.
|
|
<a href="classsf_1_1Packet.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="Packet_8hpp_source.html">Packet.hpp</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a786e5d4ced83992ceefa1799963ea858"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a786e5d4ced83992ceefa1799963ea858">Packet</a> ()</td></tr>
|
|
<tr class="memdesc:a786e5d4ced83992ceefa1799963ea858"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a786e5d4ced83992ceefa1799963ea858">More...</a><br /></td></tr>
|
|
<tr class="separator:a786e5d4ced83992ceefa1799963ea858"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adc0490ca3c7c3d1e321bd742e5213913"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#adc0490ca3c7c3d1e321bd742e5213913">~Packet</a> ()</td></tr>
|
|
<tr class="memdesc:adc0490ca3c7c3d1e321bd742e5213913"><td class="mdescLeft"> </td><td class="mdescRight">Virtual destructor. <a href="#adc0490ca3c7c3d1e321bd742e5213913">More...</a><br /></td></tr>
|
|
<tr class="separator:adc0490ca3c7c3d1e321bd742e5213913"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7dd6e429b87520008326c4d71f1cf011"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a7dd6e429b87520008326c4d71f1cf011">append</a> (const void *data, std::size_t sizeInBytes)</td></tr>
|
|
<tr class="memdesc:a7dd6e429b87520008326c4d71f1cf011"><td class="mdescLeft"> </td><td class="mdescRight">Append data to the end of the packet. <a href="#a7dd6e429b87520008326c4d71f1cf011">More...</a><br /></td></tr>
|
|
<tr class="separator:a7dd6e429b87520008326c4d71f1cf011"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a133ea8b8fe6e93c230f0d79f19a3bf0d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a133ea8b8fe6e93c230f0d79f19a3bf0d">clear</a> ()</td></tr>
|
|
<tr class="memdesc:a133ea8b8fe6e93c230f0d79f19a3bf0d"><td class="mdescLeft"> </td><td class="mdescRight">Clear the packet. <a href="#a133ea8b8fe6e93c230f0d79f19a3bf0d">More...</a><br /></td></tr>
|
|
<tr class="separator:a133ea8b8fe6e93c230f0d79f19a3bf0d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abfd771803c822f89f187e1fcc2af5afc"><td class="memItemLeft" align="right" valign="top">const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#abfd771803c822f89f187e1fcc2af5afc">getData</a> () const</td></tr>
|
|
<tr class="memdesc:abfd771803c822f89f187e1fcc2af5afc"><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to the data contained in the packet. <a href="#abfd771803c822f89f187e1fcc2af5afc">More...</a><br /></td></tr>
|
|
<tr class="separator:abfd771803c822f89f187e1fcc2af5afc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0fae6eccf2ca704fc5099cd90a9f56f7"><td class="memItemLeft" align="right" valign="top">std::size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a0fae6eccf2ca704fc5099cd90a9f56f7">getDataSize</a> () const</td></tr>
|
|
<tr class="memdesc:a0fae6eccf2ca704fc5099cd90a9f56f7"><td class="mdescLeft"> </td><td class="mdescRight">Get the size of the data contained in the packet. <a href="#a0fae6eccf2ca704fc5099cd90a9f56f7">More...</a><br /></td></tr>
|
|
<tr class="separator:a0fae6eccf2ca704fc5099cd90a9f56f7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a61e354fa670da053907c14b738839560"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a61e354fa670da053907c14b738839560">endOfPacket</a> () const</td></tr>
|
|
<tr class="memdesc:a61e354fa670da053907c14b738839560"><td class="mdescLeft"> </td><td class="mdescRight">Tell if the reading position has reached the end of the packet. <a href="#a61e354fa670da053907c14b738839560">More...</a><br /></td></tr>
|
|
<tr class="separator:a61e354fa670da053907c14b738839560"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8ab20be4a63921b7cb1a4d8ca5c30f75"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a8ab20be4a63921b7cb1a4d8ca5c30f75">operator BoolType</a> () const</td></tr>
|
|
<tr class="memdesc:a8ab20be4a63921b7cb1a4d8ca5c30f75"><td class="mdescLeft"> </td><td class="mdescRight">Test the validity of the packet, for reading. <a href="#a8ab20be4a63921b7cb1a4d8ca5c30f75">More...</a><br /></td></tr>
|
|
<tr class="separator:a8ab20be4a63921b7cb1a4d8ca5c30f75"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af8e26c63ba9bdccd262565ff0d3eeba2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#af8e26c63ba9bdccd262565ff0d3eeba2">operator>></a> (bool &data)</td></tr>
|
|
<tr class="memdesc:af8e26c63ba9bdccd262565ff0d3eeba2"><td class="mdescLeft"> </td><td class="mdescRight">Overload of operator >> to read data from the packet. <a href="#af8e26c63ba9bdccd262565ff0d3eeba2">More...</a><br /></td></tr>
|
|
<tr class="separator:af8e26c63ba9bdccd262565ff0d3eeba2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a70fd5abb9095b5335b79c0cefd17b222"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a70fd5abb9095b5335b79c0cefd17b222">operator>></a> (Int8 &data)</td></tr>
|
|
<tr class="memdesc:a70fd5abb9095b5335b79c0cefd17b222"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a70fd5abb9095b5335b79c0cefd17b222">More...</a><br /></td></tr>
|
|
<tr class="separator:a70fd5abb9095b5335b79c0cefd17b222"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa67738284a7efc16c7594b358ef35510"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#aa67738284a7efc16c7594b358ef35510">operator>></a> (Uint8 &data)</td></tr>
|
|
<tr class="memdesc:aa67738284a7efc16c7594b358ef35510"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#aa67738284a7efc16c7594b358ef35510">More...</a><br /></td></tr>
|
|
<tr class="separator:aa67738284a7efc16c7594b358ef35510"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af82d6c4e6d74f2ca39732c1e29f30781"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#af82d6c4e6d74f2ca39732c1e29f30781">operator>></a> (Int16 &data)</td></tr>
|
|
<tr class="memdesc:af82d6c4e6d74f2ca39732c1e29f30781"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#af82d6c4e6d74f2ca39732c1e29f30781">More...</a><br /></td></tr>
|
|
<tr class="separator:af82d6c4e6d74f2ca39732c1e29f30781"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afd8706f092bc830ebb438aeee9271647"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#afd8706f092bc830ebb438aeee9271647">operator>></a> (Uint16 &data)</td></tr>
|
|
<tr class="memdesc:afd8706f092bc830ebb438aeee9271647"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#afd8706f092bc830ebb438aeee9271647">More...</a><br /></td></tr>
|
|
<tr class="separator:afd8706f092bc830ebb438aeee9271647"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae7b44e79f12d500b63f5dc2a10d78d8c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#ae7b44e79f12d500b63f5dc2a10d78d8c">operator>></a> (Int32 &data)</td></tr>
|
|
<tr class="memdesc:ae7b44e79f12d500b63f5dc2a10d78d8c"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#ae7b44e79f12d500b63f5dc2a10d78d8c">More...</a><br /></td></tr>
|
|
<tr class="separator:ae7b44e79f12d500b63f5dc2a10d78d8c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4b57e1953db5bec39a851929df9a339a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a4b57e1953db5bec39a851929df9a339a">operator>></a> (Uint32 &data)</td></tr>
|
|
<tr class="memdesc:a4b57e1953db5bec39a851929df9a339a"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a4b57e1953db5bec39a851929df9a339a">More...</a><br /></td></tr>
|
|
<tr class="separator:a4b57e1953db5bec39a851929df9a339a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8409de6477e17ca48225a835451261c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a8409de6477e17ca48225a835451261c1">operator>></a> (Int64 &data)</td></tr>
|
|
<tr class="memdesc:a8409de6477e17ca48225a835451261c1"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a8409de6477e17ca48225a835451261c1">More...</a><br /></td></tr>
|
|
<tr class="separator:a8409de6477e17ca48225a835451261c1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8fa9c970062753b03e43db4999fc7743"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a8fa9c970062753b03e43db4999fc7743">operator>></a> (Uint64 &data)</td></tr>
|
|
<tr class="memdesc:a8fa9c970062753b03e43db4999fc7743"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a8fa9c970062753b03e43db4999fc7743">More...</a><br /></td></tr>
|
|
<tr class="separator:a8fa9c970062753b03e43db4999fc7743"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6704b4d13d6f798efe6fa836a8b5fa24"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a6704b4d13d6f798efe6fa836a8b5fa24">operator>></a> (float &data)</td></tr>
|
|
<tr class="memdesc:a6704b4d13d6f798efe6fa836a8b5fa24"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a6704b4d13d6f798efe6fa836a8b5fa24">More...</a><br /></td></tr>
|
|
<tr class="separator:a6704b4d13d6f798efe6fa836a8b5fa24"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac84239a8ba0a165394805c17b35a88cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#ac84239a8ba0a165394805c17b35a88cf">operator>></a> (double &data)</td></tr>
|
|
<tr class="memdesc:ac84239a8ba0a165394805c17b35a88cf"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#ac84239a8ba0a165394805c17b35a88cf">More...</a><br /></td></tr>
|
|
<tr class="separator:ac84239a8ba0a165394805c17b35a88cf"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae9f8d8b0c776204f79f615b1e58bccec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#ae9f8d8b0c776204f79f615b1e58bccec">operator>></a> (char *data)</td></tr>
|
|
<tr class="memdesc:ae9f8d8b0c776204f79f615b1e58bccec"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#ae9f8d8b0c776204f79f615b1e58bccec">More...</a><br /></td></tr>
|
|
<tr class="separator:ae9f8d8b0c776204f79f615b1e58bccec"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aabace32063c44e1a5cc54af6267c1fab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#aabace32063c44e1a5cc54af6267c1fab">operator>></a> (std::string &data)</td></tr>
|
|
<tr class="memdesc:aabace32063c44e1a5cc54af6267c1fab"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#aabace32063c44e1a5cc54af6267c1fab">More...</a><br /></td></tr>
|
|
<tr class="separator:aabace32063c44e1a5cc54af6267c1fab"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1444500d29df0991e630ac78933c6282"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a1444500d29df0991e630ac78933c6282">operator>></a> (wchar_t *data)</td></tr>
|
|
<tr class="memdesc:a1444500d29df0991e630ac78933c6282"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a1444500d29df0991e630ac78933c6282">More...</a><br /></td></tr>
|
|
<tr class="separator:a1444500d29df0991e630ac78933c6282"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab74c37a290385fd7b1f962bf954a2005"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#ab74c37a290385fd7b1f962bf954a2005">operator>></a> (std::wstring &data)</td></tr>
|
|
<tr class="memdesc:ab74c37a290385fd7b1f962bf954a2005"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#ab74c37a290385fd7b1f962bf954a2005">More...</a><br /></td></tr>
|
|
<tr class="separator:ab74c37a290385fd7b1f962bf954a2005"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a081233e0cab2182a219b129a1383dc0b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a081233e0cab2182a219b129a1383dc0b">operator>></a> (<a class="el" href="classsf_1_1String.html">String</a> &data)</td></tr>
|
|
<tr class="memdesc:a081233e0cab2182a219b129a1383dc0b"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a081233e0cab2182a219b129a1383dc0b">More...</a><br /></td></tr>
|
|
<tr class="separator:a081233e0cab2182a219b129a1383dc0b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa5a465ed02ba29d83ecdafb0ac3fff21"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#aa5a465ed02ba29d83ecdafb0ac3fff21">operator<<</a> (bool data)</td></tr>
|
|
<tr class="memdesc:aa5a465ed02ba29d83ecdafb0ac3fff21"><td class="mdescLeft"> </td><td class="mdescRight">Overload of operator << to write data into the packet. <a href="#aa5a465ed02ba29d83ecdafb0ac3fff21">More...</a><br /></td></tr>
|
|
<tr class="separator:aa5a465ed02ba29d83ecdafb0ac3fff21"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a034b68a4281cae0b53a43af7aa4172f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a034b68a4281cae0b53a43af7aa4172f6">operator<<</a> (Int8 data)</td></tr>
|
|
<tr class="memdesc:a034b68a4281cae0b53a43af7aa4172f6"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a034b68a4281cae0b53a43af7aa4172f6">More...</a><br /></td></tr>
|
|
<tr class="separator:a034b68a4281cae0b53a43af7aa4172f6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af27e4498bf83151b0591d5f04a8b30e1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#af27e4498bf83151b0591d5f04a8b30e1">operator<<</a> (Uint8 data)</td></tr>
|
|
<tr class="memdesc:af27e4498bf83151b0591d5f04a8b30e1"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#af27e4498bf83151b0591d5f04a8b30e1">More...</a><br /></td></tr>
|
|
<tr class="separator:af27e4498bf83151b0591d5f04a8b30e1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afda8754ab4f2a34600f0153ba9ff24fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#afda8754ab4f2a34600f0153ba9ff24fa">operator<<</a> (Int16 data)</td></tr>
|
|
<tr class="memdesc:afda8754ab4f2a34600f0153ba9ff24fa"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#afda8754ab4f2a34600f0153ba9ff24fa">More...</a><br /></td></tr>
|
|
<tr class="separator:afda8754ab4f2a34600f0153ba9ff24fa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a557cbc0289135209248aca1aa2117c40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a557cbc0289135209248aca1aa2117c40">operator<<</a> (Uint16 data)</td></tr>
|
|
<tr class="memdesc:a557cbc0289135209248aca1aa2117c40"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a557cbc0289135209248aca1aa2117c40">More...</a><br /></td></tr>
|
|
<tr class="separator:a557cbc0289135209248aca1aa2117c40"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad60c9ad6e4e92399e2a36938ad122d05"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#ad60c9ad6e4e92399e2a36938ad122d05">operator<<</a> (Int32 data)</td></tr>
|
|
<tr class="memdesc:ad60c9ad6e4e92399e2a36938ad122d05"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#ad60c9ad6e4e92399e2a36938ad122d05">More...</a><br /></td></tr>
|
|
<tr class="separator:ad60c9ad6e4e92399e2a36938ad122d05"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afb113b73749efb662a75deb98257ad34"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#afb113b73749efb662a75deb98257ad34">operator<<</a> (Uint32 data)</td></tr>
|
|
<tr class="memdesc:afb113b73749efb662a75deb98257ad34"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#afb113b73749efb662a75deb98257ad34">More...</a><br /></td></tr>
|
|
<tr class="separator:afb113b73749efb662a75deb98257ad34"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abba83b3c98af99190886d20d7595a94c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#abba83b3c98af99190886d20d7595a94c">operator<<</a> (Int64 data)</td></tr>
|
|
<tr class="memdesc:abba83b3c98af99190886d20d7595a94c"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#abba83b3c98af99190886d20d7595a94c">More...</a><br /></td></tr>
|
|
<tr class="separator:abba83b3c98af99190886d20d7595a94c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a60df5a35a3fb6416131d77232737c68b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a60df5a35a3fb6416131d77232737c68b">operator<<</a> (Uint64 data)</td></tr>
|
|
<tr class="memdesc:a60df5a35a3fb6416131d77232737c68b"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a60df5a35a3fb6416131d77232737c68b">More...</a><br /></td></tr>
|
|
<tr class="separator:a60df5a35a3fb6416131d77232737c68b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a76d31c4f864253a7e9b53701b4660fe5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a76d31c4f864253a7e9b53701b4660fe5">operator<<</a> (float data)</td></tr>
|
|
<tr class="memdesc:a76d31c4f864253a7e9b53701b4660fe5"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a76d31c4f864253a7e9b53701b4660fe5">More...</a><br /></td></tr>
|
|
<tr class="separator:a76d31c4f864253a7e9b53701b4660fe5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3b3077720a486b569ac8e7dec638a3f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a3b3077720a486b569ac8e7dec638a3f0">operator<<</a> (double data)</td></tr>
|
|
<tr class="memdesc:a3b3077720a486b569ac8e7dec638a3f0"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a3b3077720a486b569ac8e7dec638a3f0">More...</a><br /></td></tr>
|
|
<tr class="separator:a3b3077720a486b569ac8e7dec638a3f0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a67c9985f7b3d6e90886e56e309280a9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a67c9985f7b3d6e90886e56e309280a9d">operator<<</a> (const char *data)</td></tr>
|
|
<tr class="memdesc:a67c9985f7b3d6e90886e56e309280a9d"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a67c9985f7b3d6e90886e56e309280a9d">More...</a><br /></td></tr>
|
|
<tr class="separator:a67c9985f7b3d6e90886e56e309280a9d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a59a21671caaa69da5d47c54b50e1eb54"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a59a21671caaa69da5d47c54b50e1eb54">operator<<</a> (const std::string &data)</td></tr>
|
|
<tr class="memdesc:a59a21671caaa69da5d47c54b50e1eb54"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a59a21671caaa69da5d47c54b50e1eb54">More...</a><br /></td></tr>
|
|
<tr class="separator:a59a21671caaa69da5d47c54b50e1eb54"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6f7c6a9ce795fac342ea937896d98016"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a6f7c6a9ce795fac342ea937896d98016">operator<<</a> (const wchar_t *data)</td></tr>
|
|
<tr class="memdesc:a6f7c6a9ce795fac342ea937896d98016"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a6f7c6a9ce795fac342ea937896d98016">More...</a><br /></td></tr>
|
|
<tr class="separator:a6f7c6a9ce795fac342ea937896d98016"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9f3401d038470f629d0c2c6be928a14b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a9f3401d038470f629d0c2c6be928a14b">operator<<</a> (const std::wstring &data)</td></tr>
|
|
<tr class="memdesc:a9f3401d038470f629d0c2c6be928a14b"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#a9f3401d038470f629d0c2c6be928a14b">More...</a><br /></td></tr>
|
|
<tr class="separator:a9f3401d038470f629d0c2c6be928a14b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abc17272df082a36b202e10045bd9e220"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Packet.html">Packet</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#abc17272df082a36b202e10045bd9e220">operator<<</a> (const <a class="el" href="classsf_1_1String.html">String</a> &data)</td></tr>
|
|
<tr class="memdesc:abc17272df082a36b202e10045bd9e220"><td class="mdescLeft"> </td><td class="mdescRight">This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. <a href="#abc17272df082a36b202e10045bd9e220">More...</a><br /></td></tr>
|
|
<tr class="separator:abc17272df082a36b202e10045bd9e220"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
|
|
Protected Member Functions</h2></td></tr>
|
|
<tr class="memitem:a052e955906c9bfd671622cb625380edc"><td class="memItemLeft" align="right" valign="top">virtual const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#a052e955906c9bfd671622cb625380edc">onSend</a> (std::size_t &size)</td></tr>
|
|
<tr class="memdesc:a052e955906c9bfd671622cb625380edc"><td class="mdescLeft"> </td><td class="mdescRight">Called before the packet is sent over the network. <a href="#a052e955906c9bfd671622cb625380edc">More...</a><br /></td></tr>
|
|
<tr class="separator:a052e955906c9bfd671622cb625380edc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab71a31ef0f1d5d856de6f9fc75434128"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Packet.html#ab71a31ef0f1d5d856de6f9fc75434128">onReceive</a> (const void *data, std::size_t size)</td></tr>
|
|
<tr class="memdesc:ab71a31ef0f1d5d856de6f9fc75434128"><td class="mdescLeft"> </td><td class="mdescRight">Called after the packet is received over the network. <a href="#ab71a31ef0f1d5d856de6f9fc75434128">More...</a><br /></td></tr>
|
|
<tr class="separator:ab71a31ef0f1d5d856de6f9fc75434128"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
|
|
Friends</h2></td></tr>
|
|
<tr class="memitem:aa8b32310b01d4bb702d6bcb969d5f130"><td class="memItemLeft" align="right" valign="top"><a id="aa8b32310b01d4bb702d6bcb969d5f130"></a>
|
|
class </td><td class="memItemRight" valign="bottom"><b>TcpSocket</b></td></tr>
|
|
<tr class="separator:aa8b32310b01d4bb702d6bcb969d5f130"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae128c6687ced82c6157c5f865f8dec5c"><td class="memItemLeft" align="right" valign="top"><a id="ae128c6687ced82c6157c5f865f8dec5c"></a>
|
|
class </td><td class="memItemRight" valign="bottom"><b>UdpSocket</b></td></tr>
|
|
<tr class="separator:ae128c6687ced82c6157c5f865f8dec5c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Utility class to build blocks of data to transfer over the network. </p>
|
|
<p>Packets provide a safe and easy way to serialize data, in order to send it over the network using sockets (<a class="el" href="classsf_1_1TcpSocket.html" title="Specialized socket using the TCP protocol. ">sf::TcpSocket</a>, <a class="el" href="classsf_1_1UdpSocket.html" title="Specialized socket using the UDP protocol. ">sf::UdpSocket</a>).</p>
|
|
<p>Packets solve 2 fundamental problems that arise when transferring data over the network: </p><ul>
|
|
<li>data is interpreted correctly according to the endianness </li>
|
|
<li>the bounds of the packet are preserved (one send == one receive)</li>
|
|
</ul>
|
|
<p>The <a class="el" href="classsf_1_1Packet.html" title="Utility class to build blocks of data to transfer over the network. ">sf::Packet</a> class provides both input and output modes. It is designed to follow the behavior of standard C++ streams, using operators >> and << to extract and insert data.</p>
|
|
<p>It is recommended to use only fixed-size types (like sf::Int32, etc.), to avoid possible differences between the sender and the receiver. Indeed, the native C++ types may have different sizes on two platforms and your data may be corrupted if that happens.</p>
|
|
<p>Usage example: </p><div class="fragment"><div class="line">sf::Uint32 x = 24;</div><div class="line">std::string s = <span class="stringliteral">"hello"</span>;</div><div class="line"><span class="keywordtype">double</span> d = 5.89;</div><div class="line"></div><div class="line"><span class="comment">// Group the variables to send into a packet</span></div><div class="line"><a class="code" href="classsf_1_1Packet.html">sf::Packet</a> packet;</div><div class="line">packet << x << s << d;</div><div class="line"></div><div class="line"><span class="comment">// Send it over the network (socket is a valid sf::TcpSocket)</span></div><div class="line">socket.send(packet);</div><div class="line"></div><div class="line">-----------------------------------------------------------------</div><div class="line"></div><div class="line"><span class="comment">// Receive the packet at the other end</span></div><div class="line"><a class="code" href="classsf_1_1Packet.html">sf::Packet</a> packet;</div><div class="line">socket.receive(packet);</div><div class="line"></div><div class="line"><span class="comment">// Extract the variables contained in the packet</span></div><div class="line">sf::Uint32 x;</div><div class="line">std::string s;</div><div class="line"><span class="keywordtype">double</span> d;</div><div class="line"><span class="keywordflow">if</span> (packet >> x >> s >> d)</div><div class="line">{</div><div class="line"> <span class="comment">// Data extracted successfully...</span></div><div class="line">}</div></div><!-- fragment --><p>Packets have built-in operator >> and << overloads for standard types: </p><ul>
|
|
<li>bool </li>
|
|
<li>fixed-size integer types (sf::Int8/16/32, sf::Uint8/16/32) </li>
|
|
<li>floating point numbers (float, double) </li>
|
|
<li>string types (char*, wchar_t*, std::string, std::wstring, <a class="el" href="classsf_1_1String.html" title="Utility string class that automatically handles conversions between types and encodings. ">sf::String</a>)</li>
|
|
</ul>
|
|
<p>Like standard streams, it is also possible to define your own overloads of operators >> and << in order to handle your custom types.</p>
|
|
<div class="fragment"><div class="line"><span class="keyword">struct </span>MyStruct</div><div class="line">{</div><div class="line"> <span class="keywordtype">float</span> number;</div><div class="line"> sf::Int8 integer;</div><div class="line"> std::string str;</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="classsf_1_1Packet.html">sf::Packet</a>& <a class="code" href="classsf_1_1Packet.html#aa5a465ed02ba29d83ecdafb0ac3fff21">operator <<</a>(<a class="code" href="classsf_1_1Packet.html">sf::Packet</a>& packet, <span class="keyword">const</span> MyStruct& m)</div><div class="line">{</div><div class="line"> <span class="keywordflow">return</span> packet << m.number << m.integer << m.str;</div><div class="line">}</div><div class="line"></div><div class="line"><a class="code" href="classsf_1_1Packet.html">sf::Packet</a>& <a class="code" href="classsf_1_1Packet.html#af8e26c63ba9bdccd262565ff0d3eeba2">operator >></a>(<a class="code" href="classsf_1_1Packet.html">sf::Packet</a>& packet, MyStruct& m)</div><div class="line">{</div><div class="line"> <span class="keywordflow">return</span> packet >> m.number >> m.integer >> m.str;</div><div class="line">}</div></div><!-- fragment --><p>Packets also provide an extra feature that allows to apply custom transformations to the data before it is sent, and after it is received. This is typically used to handle automatic compression or encryption of the data. This is achieved by inheriting from <a class="el" href="classsf_1_1Packet.html" title="Utility class to build blocks of data to transfer over the network. ">sf::Packet</a>, and overriding the onSend and onReceive functions.</p>
|
|
<p>Here is an example: </p><div class="fragment"><div class="line"><span class="keyword">class </span>ZipPacket : <span class="keyword">public</span> <a class="code" href="classsf_1_1Packet.html">sf::Packet</a></div><div class="line">{</div><div class="line"> <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* <a class="code" href="classsf_1_1Packet.html#a052e955906c9bfd671622cb625380edc">onSend</a>(std::size_t& size)</div><div class="line"> {</div><div class="line"> <span class="keyword">const</span> <span class="keywordtype">void</span>* srcData = <a class="code" href="classsf_1_1Packet.html#abfd771803c822f89f187e1fcc2af5afc">getData</a>();</div><div class="line"> std::size_t srcSize = <a class="code" href="classsf_1_1Packet.html#a0fae6eccf2ca704fc5099cd90a9f56f7">getDataSize</a>();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> MySuperZipFunction(srcData, srcSize, &size);</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsf_1_1Packet.html#ab71a31ef0f1d5d856de6f9fc75434128">onReceive</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* data, std::size_t size)</div><div class="line"> {</div><div class="line"> std::size_t dstSize;</div><div class="line"> <span class="keyword">const</span> <span class="keywordtype">void</span>* dstData = MySuperUnzipFunction(data, size, &dstSize);</div><div class="line"></div><div class="line"> <a class="code" href="classsf_1_1Packet.html#a7dd6e429b87520008326c4d71f1cf011">append</a>(dstData, dstSize);</div><div class="line"> }</div><div class="line">};</div><div class="line"></div><div class="line"><span class="comment">// Use like regular packets:</span></div><div class="line">ZipPacket packet;</div><div class="line">packet << x << s << d;</div><div class="line">...</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1TcpSocket.html" title="Specialized socket using the TCP protocol. ">sf::TcpSocket</a>, <a class="el" href="classsf_1_1UdpSocket.html" title="Specialized socket using the UDP protocol. ">sf::UdpSocket</a> </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="Packet_8hpp_source.html#l00047">47</a> of file <a class="el" href="Packet_8hpp_source.html">Packet.hpp</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a786e5d4ced83992ceefa1799963ea858"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a786e5d4ced83992ceefa1799963ea858">◆ </a></span>Packet()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::Packet::Packet </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Default constructor. </p>
|
|
<p>Creates an empty packet. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adc0490ca3c7c3d1e321bd742e5213913"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adc0490ca3c7c3d1e321bd742e5213913">◆ </a></span>~Packet()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual sf::Packet::~Packet </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Virtual destructor. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a7dd6e429b87520008326c4d71f1cf011"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7dd6e429b87520008326c4d71f1cf011">◆ </a></span>append()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::Packet::append </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const void * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::size_t </td>
|
|
<td class="paramname"><em>sizeInBytes</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Append data to the end of the packet. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">data</td><td>Pointer to the sequence of bytes to append </td></tr>
|
|
<tr><td class="paramname">sizeInBytes</td><td>Number of bytes to append</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Packet.html#a133ea8b8fe6e93c230f0d79f19a3bf0d" title="Clear the packet. ">clear</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a133ea8b8fe6e93c230f0d79f19a3bf0d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a133ea8b8fe6e93c230f0d79f19a3bf0d">◆ </a></span>clear()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::Packet::clear </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Clear the packet. </p>
|
|
<p>After calling Clear, the packet is empty.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Packet.html#a7dd6e429b87520008326c4d71f1cf011" title="Append data to the end of the packet. ">append</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a61e354fa670da053907c14b738839560"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a61e354fa670da053907c14b738839560">◆ </a></span>endOfPacket()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool sf::Packet::endOfPacket </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Tell if the reading position has reached the end of the packet. </p>
|
|
<p>This function is useful to know if there is some data left to be read, without actually reading it.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if all data was read, false otherwise</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>operator bool </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abfd771803c822f89f187e1fcc2af5afc"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abfd771803c822f89f187e1fcc2af5afc">◆ </a></span>getData()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const void* sf::Packet::getData </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get a pointer to the data contained in the packet. </p>
|
|
<p>Warning: the returned pointer may become invalid after you append data to the packet, therefore it should never be stored. The return pointer is NULL if the packet is empty.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Pointer to the data</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Packet.html#a0fae6eccf2ca704fc5099cd90a9f56f7" title="Get the size of the data contained in the packet. ">getDataSize</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a0fae6eccf2ca704fc5099cd90a9f56f7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0fae6eccf2ca704fc5099cd90a9f56f7">◆ </a></span>getDataSize()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::size_t sf::Packet::getDataSize </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the size of the data contained in the packet. </p>
|
|
<p>This function returns the number of bytes pointed to by what getData returns.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Data size, in bytes</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Packet.html#abfd771803c822f89f187e1fcc2af5afc" title="Get a pointer to the data contained in the packet. ">getData</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab71a31ef0f1d5d856de6f9fc75434128"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab71a31ef0f1d5d856de6f9fc75434128">◆ </a></span>onReceive()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void sf::Packet::onReceive </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const void * </td>
|
|
<td class="paramname"><em>data</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::size_t </td>
|
|
<td class="paramname"><em>size</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Called after the packet is received over the network. </p>
|
|
<p>This function can be defined by derived classes to transform the data after it is received; this can be used for decompression, decryption, etc. The function receives a pointer to the received data, and must fill the packet with the transformed bytes. The default implementation fills the packet directly without transforming the data.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">data</td><td>Pointer to the received bytes </td></tr>
|
|
<tr><td class="paramname">size</td><td>Number of bytes</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Packet.html#a052e955906c9bfd671622cb625380edc" title="Called before the packet is sent over the network. ">onSend</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a052e955906c9bfd671622cb625380edc"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a052e955906c9bfd671622cb625380edc">◆ </a></span>onSend()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual const void* sf::Packet::onSend </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::size_t & </td>
|
|
<td class="paramname"><em>size</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Called before the packet is sent over the network. </p>
|
|
<p>This function can be defined by derived classes to transform the data before it is sent; this can be used for compression, encryption, etc. The function must return a pointer to the modified data, as well as the number of bytes pointed. The default implementation provides the packet's data without transforming it.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">size</td><td>Variable to fill with the size of data to send</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Pointer to the array of bytes to send</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Packet.html#ab71a31ef0f1d5d856de6f9fc75434128" title="Called after the packet is received over the network. ">onReceive</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8ab20be4a63921b7cb1a4d8ca5c30f75"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8ab20be4a63921b7cb1a4d8ca5c30f75">◆ </a></span>operator BoolType()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::Packet::operator BoolType </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Test the validity of the packet, for reading. </p>
|
|
<p>This operator allows to test the packet as a boolean variable, to check if a reading operation was successful.</p>
|
|
<p>A packet will be in an invalid state if it has no more data to read.</p>
|
|
<p>This behavior is the same as standard C++ streams.</p>
|
|
<p>Usage example: </p><div class="fragment"><div class="line"><span class="keywordtype">float</span> x;</div><div class="line">packet >> x;</div><div class="line"><span class="keywordflow">if</span> (packet)</div><div class="line">{</div><div class="line"> <span class="comment">// ok, x was extracted successfully</span></div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// -- or --</span></div><div class="line"></div><div class="line"><span class="keywordtype">float</span> x;</div><div class="line"><span class="keywordflow">if</span> (packet >> x)</div><div class="line">{</div><div class="line"> <span class="comment">// ok, x was extracted successfully</span></div><div class="line">}</div></div><!-- fragment --><p>Don't focus on the return type, it's equivalent to bool but it disallows unwanted implicit conversions to integer or pointer types.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>True if last data extraction from packet was successful</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Packet.html#a61e354fa670da053907c14b738839560" title="Tell if the reading position has reached the end of the packet. ">endOfPacket</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa5a465ed02ba29d83ecdafb0ac3fff21"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa5a465ed02ba29d83ecdafb0ac3fff21">◆ </a></span>operator<<() <span class="overload">[1/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of operator << to write data into the packet. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a034b68a4281cae0b53a43af7aa4172f6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a034b68a4281cae0b53a43af7aa4172f6">◆ </a></span>operator<<() <span class="overload">[2/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Int8 </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af27e4498bf83151b0591d5f04a8b30e1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af27e4498bf83151b0591d5f04a8b30e1">◆ </a></span>operator<<() <span class="overload">[3/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Uint8 </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afda8754ab4f2a34600f0153ba9ff24fa"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afda8754ab4f2a34600f0153ba9ff24fa">◆ </a></span>operator<<() <span class="overload">[4/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Int16 </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a557cbc0289135209248aca1aa2117c40"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a557cbc0289135209248aca1aa2117c40">◆ </a></span>operator<<() <span class="overload">[5/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Uint16 </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad60c9ad6e4e92399e2a36938ad122d05"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad60c9ad6e4e92399e2a36938ad122d05">◆ </a></span>operator<<() <span class="overload">[6/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Int32 </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afb113b73749efb662a75deb98257ad34"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afb113b73749efb662a75deb98257ad34">◆ </a></span>operator<<() <span class="overload">[7/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Uint32 </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abba83b3c98af99190886d20d7595a94c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abba83b3c98af99190886d20d7595a94c">◆ </a></span>operator<<() <span class="overload">[8/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Int64 </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a60df5a35a3fb6416131d77232737c68b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a60df5a35a3fb6416131d77232737c68b">◆ </a></span>operator<<() <span class="overload">[9/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Uint64 </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a76d31c4f864253a7e9b53701b4660fe5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a76d31c4f864253a7e9b53701b4660fe5">◆ </a></span>operator<<() <span class="overload">[10/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a3b3077720a486b569ac8e7dec638a3f0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3b3077720a486b569ac8e7dec638a3f0">◆ </a></span>operator<<() <span class="overload">[11/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">double </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a67c9985f7b3d6e90886e56e309280a9d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a67c9985f7b3d6e90886e56e309280a9d">◆ </a></span>operator<<() <span class="overload">[12/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a59a21671caaa69da5d47c54b50e1eb54"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a59a21671caaa69da5d47c54b50e1eb54">◆ </a></span>operator<<() <span class="overload">[13/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::string & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6f7c6a9ce795fac342ea937896d98016"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6f7c6a9ce795fac342ea937896d98016">◆ </a></span>operator<<() <span class="overload">[14/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const wchar_t * </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9f3401d038470f629d0c2c6be928a14b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9f3401d038470f629d0c2c6be928a14b">◆ </a></span>operator<<() <span class="overload">[15/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const std::wstring & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abc17272df082a36b202e10045bd9e220"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abc17272df082a36b202e10045bd9e220">◆ </a></span>operator<<() <span class="overload">[16/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator<< </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1String.html">String</a> & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af8e26c63ba9bdccd262565ff0d3eeba2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af8e26c63ba9bdccd262565ff0d3eeba2">◆ </a></span>operator>>() <span class="overload">[1/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of operator >> to read data from the packet. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a70fd5abb9095b5335b79c0cefd17b222"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a70fd5abb9095b5335b79c0cefd17b222">◆ </a></span>operator>>() <span class="overload">[2/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Int8 & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa67738284a7efc16c7594b358ef35510"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa67738284a7efc16c7594b358ef35510">◆ </a></span>operator>>() <span class="overload">[3/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Uint8 & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af82d6c4e6d74f2ca39732c1e29f30781"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af82d6c4e6d74f2ca39732c1e29f30781">◆ </a></span>operator>>() <span class="overload">[4/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Int16 & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afd8706f092bc830ebb438aeee9271647"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afd8706f092bc830ebb438aeee9271647">◆ </a></span>operator>>() <span class="overload">[5/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Uint16 & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae7b44e79f12d500b63f5dc2a10d78d8c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae7b44e79f12d500b63f5dc2a10d78d8c">◆ </a></span>operator>>() <span class="overload">[6/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Int32 & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4b57e1953db5bec39a851929df9a339a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4b57e1953db5bec39a851929df9a339a">◆ </a></span>operator>>() <span class="overload">[7/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Uint32 & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8409de6477e17ca48225a835451261c1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8409de6477e17ca48225a835451261c1">◆ </a></span>operator>>() <span class="overload">[8/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Int64 & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8fa9c970062753b03e43db4999fc7743"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8fa9c970062753b03e43db4999fc7743">◆ </a></span>operator>>() <span class="overload">[9/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">Uint64 & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6704b4d13d6f798efe6fa836a8b5fa24"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6704b4d13d6f798efe6fa836a8b5fa24">◆ </a></span>operator>>() <span class="overload">[10/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac84239a8ba0a165394805c17b35a88cf"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac84239a8ba0a165394805c17b35a88cf">◆ </a></span>operator>>() <span class="overload">[11/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">double & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae9f8d8b0c776204f79f615b1e58bccec"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae9f8d8b0c776204f79f615b1e58bccec">◆ </a></span>operator>>() <span class="overload">[12/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">char * </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aabace32063c44e1a5cc54af6267c1fab"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aabace32063c44e1a5cc54af6267c1fab">◆ </a></span>operator>>() <span class="overload">[13/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::string & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1444500d29df0991e630ac78933c6282"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1444500d29df0991e630ac78933c6282">◆ </a></span>operator>>() <span class="overload">[14/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">wchar_t * </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab74c37a290385fd7b1f962bf954a2005"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab74c37a290385fd7b1f962bf954a2005">◆ </a></span>operator>>() <span class="overload">[15/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">std::wstring & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a081233e0cab2182a219b129a1383dc0b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a081233e0cab2182a219b129a1383dc0b">◆ </a></span>operator>>() <span class="overload">[16/16]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Packet.html">Packet</a>& sf::Packet::operator>> </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1String.html">String</a> & </td>
|
|
<td class="paramname"><em>data</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="Packet_8hpp_source.html">Packet.hpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div>
|
|
<div id="footer-container">
|
|
<div id="footer">
|
|
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
|
|
Copyright © Laurent Gomila ::
|
|
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> ::
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|