classgrpc_1_1_serialization_traits.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.6"/>
  7. <title>GRPC C++: grpc::SerializationTraits&lt; Message, UnusedButHereForPartialTemplateSpecialization &gt; Class Template Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/search.js"></script>
  13. <script type="text/javascript">
  14. $(document).ready(function() { searchBox.OnSelectItem(0); });
  15. </script>
  16. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  17. </head>
  18. <body>
  19. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  20. <div id="titlearea">
  21. <table cellspacing="0" cellpadding="0">
  22. <tbody>
  23. <tr style="height: 56px;">
  24. <td style="padding-left: 0.5em;">
  25. <div id="projectname">GRPC C++
  26. &#160;<span id="projectnumber">0.11.0.0</span>
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.6 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  42. <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  43. <li><a href="files.html"><span>Files</span></a></li>
  44. <li>
  45. <div id="MSearchBox" class="MSearchBoxInactive">
  46. <span class="left">
  47. <img id="MSearchSelect" src="search/mag_sel.png"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. alt=""/>
  51. <input type="text" id="MSearchField" value="Search" accesskey="S"
  52. onfocus="searchBox.OnSearchFieldFocus(true)"
  53. onblur="searchBox.OnSearchFieldFocus(false)"
  54. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  55. </span><span class="right">
  56. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  57. </span>
  58. </div>
  59. </li>
  60. </ul>
  61. </div>
  62. <div id="navrow2" class="tabs2">
  63. <ul class="tablist">
  64. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  65. <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
  66. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  67. <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
  68. </ul>
  69. </div>
  70. <!-- window showing the filter options -->
  71. <div id="MSearchSelectWindow"
  72. onmouseover="return searchBox.OnSearchSelectShow()"
  73. onmouseout="return searchBox.OnSearchSelectHide()"
  74. onkeydown="return searchBox.OnSearchSelectKey(event)">
  75. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  76. <!-- iframe showing the search results (closed by default) -->
  77. <div id="MSearchResultsWindow">
  78. <iframe src="javascript:void(0)" frameborder="0"
  79. name="MSearchResults" id="MSearchResults">
  80. </iframe>
  81. </div>
  82. <div id="nav-path" class="navpath">
  83. <ul>
  84. <li class="navelem"><a class="el" href="namespacegrpc.html">grpc</a></li><li class="navelem"><a class="el" href="classgrpc_1_1_serialization_traits.html">SerializationTraits</a></li> </ul>
  85. </div>
  86. </div><!-- top -->
  87. <div class="header">
  88. <div class="headertitle">
  89. <div class="title">grpc::SerializationTraits&lt; Message, UnusedButHereForPartialTemplateSpecialization &gt; Class Template Reference</div> </div>
  90. </div><!--header-->
  91. <div class="contents">
  92. <p>Defines how to serialize and deserialize some type.
  93. <a href="classgrpc_1_1_serialization_traits.html#details">More...</a></p>
  94. <p><code>#include &lt;<a class="el" href="serialization__traits_8h_source.html">serialization_traits.h</a>&gt;</code></p>
  95. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  96. <div class="textblock"><h3>template&lt;class Message, class UnusedButHereForPartialTemplateSpecialization = void&gt;<br/>
  97. class grpc::SerializationTraits&lt; Message, UnusedButHereForPartialTemplateSpecialization &gt;</h3>
  98. <p>Defines how to serialize and deserialize some type. </p>
  99. <p>Used for hooking different message serialization API's into GRPC. Each <a class="el" href="classgrpc_1_1_serialization_traits.html" title="Defines how to serialize and deserialize some type. ">SerializationTraits</a> implementation must provide the following functions: static <a class="el" href="classgrpc_1_1_status.html" title="Did it work? If it didn&#39;t, why? ">Status</a> Serialize(const Message&amp; msg, grpc_byte_buffer** buffer, static <a class="el" href="classgrpc_1_1_status.html" title="Did it work? If it didn&#39;t, why? ">Status</a> Deserialize(grpc_byte_buffer* buffer, Message* msg, int max_message_size);</p>
  100. <p>Serialize is required to convert message to a grpc_byte_buffer, and to store a pointer to that byte buffer at *buffer. *own_buffer should be set to true if the caller owns said byte buffer, or false if ownership is retained elsewhere.</p>
  101. <p>Deserialize is required to convert buffer into the message stored at msg. max_message_size is passed in as a bound on the maximum number of message bytes Deserialize should accept.</p>
  102. <p>Both functions return a <a class="el" href="classgrpc_1_1_status.html" title="Did it work? If it didn&#39;t, why? ">Status</a>, allowing them to explain what went wrong if required. </p>
  103. </div><hr/>The documentation for this class was generated from the following file:<ul>
  104. <li>include/grpc++/impl/<a class="el" href="serialization__traits_8h_source.html">serialization_traits.h</a></li>
  105. </ul>
  106. </div><!-- contents -->
  107. <!-- start footer part -->
  108. <hr class="footer"/><address class="footer"><small>
  109. Generated on Tue Oct 27 2015 21:07:30 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  110. <img class="footer" src="doxygen.png" alt="doxygen"/>
  111. </a> 1.8.6
  112. </small></address>
  113. </body>
  114. </html>