-
Notifications
You must be signed in to change notification settings - Fork 0
/
ByteOrder_8h_source.html
275 lines (275 loc) · 57.8 KB
/
ByteOrder_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ROSE: ByteOrder.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link rel="search" href="search_opensearch.php?v=opensearch.xml" type="application/opensearchdescription+xml" title="ROSE"/>
<link href="roseDoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">ROSE<span id="projectnumber"> 0.11.145.141</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,true,'search.html','Search');
$(document).ready(function() {
if ($('.searchresults').length > 0) { searchBox.DOMSearchField().focus(); }
});
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9e62d0ec1b5e35066c963e582c20357f.html">Rose</a></li><li class="navelem"><a class="el" href="dir_b6b36e208517412b6f28695766cc080b.html">BinaryAnalysis</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">ByteOrder.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef ROSE_BinaryAnalysis_ByteOrder_H</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define ROSE_BinaryAnalysis_ByteOrder_H</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include <featureTests.h></span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#ifdef ROSE_ENABLE_BINARY_ANALYSIS</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include <Rose/BinaryAnalysis/RelativeVirtualAddress.h></span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include <Rose/BitOps.h></span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include <ROSE_DEPRECATED.h></span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include <boost/numeric/conversion/cast.hpp></span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceRose.html">Rose</a> {</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">namespace </span>BinaryAnalysis {</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="foldopen" id="foldopen00016" data-start="{" data-end="}">
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html"> 16</a></span><span class="keyword">namespace </span>ByteOrder {</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="foldopen" id="foldopen00019" data-start="{" data-end="};">
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58"> 19</a></span><span class="keyword">enum</span> <a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> {</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="comment">// Caution: the symbols LITTLE_ENDIAN and BIG_ENDIAN are already defined on some systems, so we use other names in ROSE.</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a8459548c6f70379963bc23ac28ae09af"> 21</a></span> <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a8459548c6f70379963bc23ac28ae09af">ORDER_UNSPECIFIED</a>=0, </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58abe94a5c69f196fe96f4fd33518c71917"> 22</a></span> <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58abe94a5c69f196fe96f4fd33518c71917">ORDER_LSB</a>, </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a112d8da63b261381373a2f9cbd96aa2a"> 23</a></span> <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a112d8da63b261381373a2f9cbd96aa2a">ORDER_MSB</a>, </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a537acc108df1136aa2d8e99d343d532f"> 24</a></span> <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a537acc108df1136aa2d8e99d343d532f">BE</a> = <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a112d8da63b261381373a2f9cbd96aa2a">ORDER_MSB</a>, </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a4b6a5243e4ed9d51064af223c6f9f47d"> 25</a></span> <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a4b6a5243e4ed9d51064af223c6f9f47d">EL</a> = <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58abe94a5c69f196fe96f4fd33518c71917">ORDER_LSB</a>, </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>};</div>
</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#ad4b9bf5b149ac6dfd0e0bd07c9a49d5b"> 29</a></span><a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#ad4b9bf5b149ac6dfd0e0bd07c9a49d5b">hostOrder</a>();</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9d57d0cb52b7534503ece57a239fb803"> 32</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9d57d0cb52b7534503ece57a239fb803">convert</a>(<span class="keywordtype">void</span> *bytes, <span class="keywordtype">size_t</span> nbytes, <a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> from, <a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> to);</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">template</span><<span class="keyword">class</span> T></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="keyword">typename</span> std::enable_if<std::is_integral<T>::value, T>::type</div>
<div class="foldopen" id="foldopen00037" data-start="{" data-end="}">
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952"> 37</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>(<span class="keyword">const</span> T &x) {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceRose_1_1BitOps.html#a34346c192a42cc45f288575e05158dd6">BitOps::reverseBytes</a>(x);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>}</div>
</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="keyword">template</span><<span class="keyword">class</span> T></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="keyword">typename</span> std::enable_if<std::is_integral<T>::value, T>::type</div>
<div class="foldopen" id="foldopen00044" data-start="{" data-end="}">
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#ac15d5c015ba75d4fad2fdd2c2cdca3ce"> 44</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#ac15d5c015ba75d4fad2fdd2c2cdca3ce">leToHost</a>(<span class="keyword">const</span> T &x) {</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceRose_1_1BitOps.html#a907ceb8f70ab5ea56b4b0abb85c53861">BitOps::fromLittleEndian</a>(x);</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>}</div>
</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="keyword">template</span><<span class="keyword">class</span> T></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="keyword">typename</span> std::enable_if<std::is_integral<T>::value, T>::type</div>
<div class="foldopen" id="foldopen00051" data-start="{" data-end="}">
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8"> 51</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>(<span class="keyword">const</span> T &x) {</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceRose_1_1BitOps.html#a55ccb8f40ef732686e0f299d34049710">BitOps::fromBigEndian</a>(x);</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>}</div>
</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="keyword">template</span><<span class="keyword">class</span> T></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="keyword">typename</span> std::enable_if<std::is_integral<T>::value, T>::type</div>
<div class="foldopen" id="foldopen00058" data-start="{" data-end="}">
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476"> 58</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <span class="keyword">const</span> T &x) {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">return</span> <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58abe94a5c69f196fe96f4fd33518c71917">ORDER_LSB</a> == sex ? <a class="code hl_function" href="namespaceRose_1_1BitOps.html#a907ceb8f70ab5ea56b4b0abb85c53861">BitOps::fromLittleEndian</a>(x) : <a class="code hl_function" href="namespaceRose_1_1BitOps.html#a55ccb8f40ef732686e0f299d34049710">BitOps::fromBigEndian</a>(x);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>}</div>
</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="keyword">template</span><<span class="keyword">class</span> Source, <span class="keyword">class</span> Destination></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00071" data-start="{" data-end="}">
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c"> 71</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>(<span class="keyword">const</span> Source &src, Destination *dst <span class="comment">/*out*/</span>,</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keyword">typename</span> std::enable_if<std::is_integral<Source>::value && std::is_integral<Destination>::value>::type* = <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> ASSERT_not_null(dst);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> *dst = <a class="code hl_function" href="namespaceRose_1_1BitOps.html#ac3d8579e017a1f95f9e74de7c2b3e8b9">BitOps::toLittleEndian</a>(boost::numeric_cast<Destination>(src));</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>}</div>
</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="keyword">template</span><<span class="keyword">class</span> T></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00079" data-start="{" data-end="}">
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#ab4c4a3ce963d0942bec0c9b0d1c493bc"> 79</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>(<span class="keyword">const</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html">RelativeVirtualAddress</a> &in, T *out) {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>(in.<a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html#ad6e7ba667df1998ce7a48043bdace2eb">rva</a>(), out);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span>}</div>
</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="keyword">template</span><<span class="keyword">class</span> Source, <span class="keyword">class</span> Destination></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00093" data-start="{" data-end="}">
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c"> 93</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>(<span class="keyword">const</span> Source &src, Destination *dst,</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keyword">typename</span> std::enable_if<std::is_integral<Source>::value && std::is_integral<Destination>::value>::type* = <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> ASSERT_not_null(dst);</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> *dst = <a class="code hl_function" href="namespaceRose_1_1BitOps.html#a537c2ba834589058812b2be8c49ca4b9">BitOps::toBigEndian</a>(boost::numeric_cast<Destination>(src));</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span>}</div>
</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="keyword">template</span><<span class="keyword">class</span> T></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00101" data-start="{" data-end="}">
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#acddcacb549b7d0ce4948cbb872fac032"> 101</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>(<span class="keyword">const</span> <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html">RelativeVirtualAddress</a> &in, T *out) {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>(in.<a class="code hl_function" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html#ad6e7ba667df1998ce7a48043bdace2eb">rva</a>(), out);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span>}</div>
</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="keyword">template</span><<span class="keyword">class</span> Source, <span class="keyword">class</span> Destination></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="keywordtype">void</span></div>
<div class="foldopen" id="foldopen00113" data-start="{" data-end="}">
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306"> 113</a></span><a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <span class="keyword">const</span> Source &src, Destination *dst,</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keyword">typename</span> std::enable_if<std::is_integral<Source>::value && std::is_integral<Destination>::value>::type* = <span class="keyword">nullptr</span>) {</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> ASSERT_not_null(dst);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> *dst = <a class="code hl_enumvalue" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58abe94a5c69f196fe96f4fd33518c71917">ORDER_LSB</a> == sex ?</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_function" href="namespaceRose_1_1BitOps.html#ac3d8579e017a1f95f9e74de7c2b3e8b9">BitOps::toLittleEndian</a>(boost::numeric_cast<Destination>(src)) :</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_function" href="namespaceRose_1_1BitOps.html#a537c2ba834589058812b2be8c49ca4b9">BitOps::toBigEndian</a>(boost::numeric_cast<Destination>(src));</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span>}</div>
</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment">// [Robb Matzke 2023-06-09]: deprecated</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> host_order() ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#ad4b9bf5b149ac6dfd0e0bd07c9a49d5b">hostOrder</a>");</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span>int8_t swap_bytes(int8_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>");</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span>uint8_t swap_bytes(uint8_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>");</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>int16_t swap_bytes(int16_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>");</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>uint16_t swap_bytes(uint16_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>");</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span>int32_t swap_bytes(int32_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>");</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>uint32_t swap_bytes(uint32_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>");</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span>int64_t swap_bytes(int64_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>");</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span>uint64_t swap_bytes(uint64_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">swapBytes</a>");</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>int8_t le_to_host(int8_t n) ROSE_DEPRECATED("use leToHost");</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span>uint8_t le_to_host(uint8_t n) ROSE_DEPRECATED("use leToHost");</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span>int16_t le_to_host(int16_t n) ROSE_DEPRECATED("use leToHost");</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span>uint16_t le_to_host(uint16_t n) ROSE_DEPRECATED("use leToHost");</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span>int32_t le_to_host(int32_t n) ROSE_DEPRECATED("use leToHost");</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span>uint32_t le_to_host(uint32_t n) ROSE_DEPRECATED("use leToHost");</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span>int64_t le_to_host(int64_t n) ROSE_DEPRECATED("use leToHost");</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span>uint64_t le_to_host(uint64_t n) ROSE_DEPRECATED("use leToHost");</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="keywordtype">void</span> host_to_le(<span class="keywordtype">unsigned</span> h, uint8_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="keywordtype">void</span> host_to_le(<span class="keywordtype">unsigned</span> h, uint16_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="keywordtype">void</span> host_to_le(<span class="keywordtype">unsigned</span> h, uint32_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="keywordtype">void</span> host_to_le(rose_addr_t h, uint64_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="keywordtype">void</span> host_to_le(<span class="keywordtype">int</span> h, int8_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="keywordtype">void</span> host_to_le(<span class="keywordtype">int</span> h, int16_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="keywordtype">void</span> host_to_le(<span class="keywordtype">int</span> h, int32_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="keywordtype">void</span> host_to_le(int64_t h, int64_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span><span class="keywordtype">void</span> host_to_le(<a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html">RelativeVirtualAddress</a> h, uint32_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span><span class="keywordtype">void</span> host_to_le(<a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html">RelativeVirtualAddress</a> h, uint64_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">hostToLe</a>");</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span>uint8_t be_to_host(uint8_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>");</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span>uint16_t be_to_host(uint16_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>");</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span>uint32_t be_to_host(uint32_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>");</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span>uint64_t be_to_host(uint64_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>");</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span>int8_t be_to_host(int8_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>");</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span>int16_t be_to_host(int16_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>");</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span>int32_t be_to_host(int32_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>");</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span>int64_t be_to_host(int64_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">beToHost</a>");</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><span class="keywordtype">void</span> host_to_be(<span class="keywordtype">unsigned</span> h, uint8_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="keywordtype">void</span> host_to_be(<span class="keywordtype">unsigned</span> h, uint16_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="keywordtype">void</span> host_to_be(<span class="keywordtype">unsigned</span> h, uint32_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span><span class="keywordtype">void</span> host_to_be(rose_addr_t h, uint64_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="keywordtype">void</span> host_to_be(<span class="keywordtype">int</span> h, int8_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span><span class="keywordtype">void</span> host_to_be(<span class="keywordtype">int</span> h, int16_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="keywordtype">void</span> host_to_be(<span class="keywordtype">int</span> h, int32_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span><span class="keywordtype">void</span> host_to_be(int64_t h, int64_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="keywordtype">void</span> host_to_be(<a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html">RelativeVirtualAddress</a> h, uint32_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span><span class="keywordtype">void</span> host_to_be(<a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html">RelativeVirtualAddress</a> h, uint64_t *n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">hostToBe</a>");</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span>uint8_t disk_to_host(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, uint8_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>");</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span>uint16_t disk_to_host(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, uint16_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>");</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span>uint32_t disk_to_host(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, uint32_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>");</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span>uint64_t disk_to_host(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, uint64_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>");</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span>int8_t disk_to_host(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, int8_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>");</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span>int16_t disk_to_host(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, int16_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>");</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span>int32_t disk_to_host(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, int32_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>");</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span>int64_t disk_to_host(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, int64_t n) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">diskToHost</a>");</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <span class="keywordtype">unsigned</span> h, uint8_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <span class="keywordtype">unsigned</span> h, uint16_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <span class="keywordtype">unsigned</span> h, uint32_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, rose_addr_t h, uint64_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <a class="code hl_class" href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html">RelativeVirtualAddress</a> h, uint64_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <span class="keywordtype">int</span> h, int8_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <span class="keywordtype">int</span> h, int16_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, <span class="keywordtype">int</span> h, int32_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span><span class="keywordtype">void</span> host_to_disk(<a class="code hl_enumeration" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Endianness</a> sex, int64_t h, int64_t *np) ROSE_DEPRECATED("use <a class="code hl_function" href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">hostToDisk</a>");</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span>} <span class="comment">// namespace</span></div>
</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span>} <span class="comment">// namespace</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span>} <span class="comment">// namespace</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> </div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress_html"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html">Rose::BinaryAnalysis::RelativeVirtualAddress</a></div><div class="ttdoc">Optionally bound relative virtual address.</div><div class="ttdef"><b>Definition</b> <a href="RelativeVirtualAddress_8h_source.html#l00022">RelativeVirtualAddress.h:22</a></div></div>
<div class="ttc" id="aclassRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress_html_ad6e7ba667df1998ce7a48043bdace2eb"><div class="ttname"><a href="classRose_1_1BinaryAnalysis_1_1RelativeVirtualAddress.html#ad6e7ba667df1998ce7a48043bdace2eb">Rose::BinaryAnalysis::RelativeVirtualAddress::rva</a></div><div class="ttdeci">rose_addr_t rva() const</div><div class="ttdoc">Returns the offset.</div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a542292810a93732fc7d10dc363ac5476"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a542292810a93732fc7d10dc363ac5476">Rose::BinaryAnalysis::ByteOrder::diskToHost</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type diskToHost(Endianness sex, const T &x)</div><div class="ttdoc">Convert specified order to host order.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00058">ByteOrder.h:58</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a67bbe4b9c7645737bfb09a0c907e4e4c"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a67bbe4b9c7645737bfb09a0c907e4e4c">Rose::BinaryAnalysis::ByteOrder::hostToBe</a></div><div class="ttdeci">void hostToBe(const Source &src, Destination *dst, typename std::enable_if< std::is_integral< Source >::value &&std::is_integral< Destination >::value >::type *=nullptr)</div><div class="ttdoc">Convert host order to big-endian.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00093">ByteOrder.h:93</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a80a569bc228bd346d154bc36724ad30c"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a80a569bc228bd346d154bc36724ad30c">Rose::BinaryAnalysis::ByteOrder::hostToLe</a></div><div class="ttdeci">void hostToLe(const Source &src, Destination *dst, typename std::enable_if< std::is_integral< Source >::value &&std::is_integral< Destination >::value >::type *=nullptr)</div><div class="ttdoc">Convert host order to little-endian.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00071">ByteOrder.h:71</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a936870e39bbf2fe6afa377992b9eea58"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58">Rose::BinaryAnalysis::ByteOrder::Endianness</a></div><div class="ttdeci">Endianness</div><div class="ttdoc">Byte order.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00019">ByteOrder.h:19</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a936870e39bbf2fe6afa377992b9eea58a112d8da63b261381373a2f9cbd96aa2a"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a112d8da63b261381373a2f9cbd96aa2a">Rose::BinaryAnalysis::ByteOrder::ORDER_MSB</a></div><div class="ttdeci">@ ORDER_MSB</div><div class="ttdoc">Most significant byte first, i.e., big-endian.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00023">ByteOrder.h:23</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a936870e39bbf2fe6afa377992b9eea58a4b6a5243e4ed9d51064af223c6f9f47d"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a4b6a5243e4ed9d51064af223c6f9f47d">Rose::BinaryAnalysis::ByteOrder::EL</a></div><div class="ttdeci">@ EL</div><div class="ttdoc">Little-endian.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00025">ByteOrder.h:25</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a936870e39bbf2fe6afa377992b9eea58a537acc108df1136aa2d8e99d343d532f"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a537acc108df1136aa2d8e99d343d532f">Rose::BinaryAnalysis::ByteOrder::BE</a></div><div class="ttdeci">@ BE</div><div class="ttdoc">Big-endian.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00024">ByteOrder.h:24</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a936870e39bbf2fe6afa377992b9eea58a8459548c6f70379963bc23ac28ae09af"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58a8459548c6f70379963bc23ac28ae09af">Rose::BinaryAnalysis::ByteOrder::ORDER_UNSPECIFIED</a></div><div class="ttdeci">@ ORDER_UNSPECIFIED</div><div class="ttdoc">Endianness is unspecified and unknown.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00021">ByteOrder.h:21</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a936870e39bbf2fe6afa377992b9eea58abe94a5c69f196fe96f4fd33518c71917"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a936870e39bbf2fe6afa377992b9eea58abe94a5c69f196fe96f4fd33518c71917">Rose::BinaryAnalysis::ByteOrder::ORDER_LSB</a></div><div class="ttdeci">@ ORDER_LSB</div><div class="ttdoc">Least significant byte first, i.e., little-endian.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00022">ByteOrder.h:22</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a9b72d4013aaf466458a9542526f353a8"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9b72d4013aaf466458a9542526f353a8">Rose::BinaryAnalysis::ByteOrder::beToHost</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type beToHost(const T &x)</div><div class="ttdoc">Convert a big-endian integer to host order.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00051">ByteOrder.h:51</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_a9d57d0cb52b7534503ece57a239fb803"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#a9d57d0cb52b7534503ece57a239fb803">Rose::BinaryAnalysis::ByteOrder::convert</a></div><div class="ttdeci">void convert(void *bytes, size_t nbytes, Endianness from, Endianness to)</div><div class="ttdoc">Convert data from one byte order to another in place.</div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_ac15d5c015ba75d4fad2fdd2c2cdca3ce"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#ac15d5c015ba75d4fad2fdd2c2cdca3ce">Rose::BinaryAnalysis::ByteOrder::leToHost</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type leToHost(const T &x)</div><div class="ttdoc">Convert a little-endian integer to host order.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00044">ByteOrder.h:44</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_ad4b9bf5b149ac6dfd0e0bd07c9a49d5b"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#ad4b9bf5b149ac6dfd0e0bd07c9a49d5b">Rose::BinaryAnalysis::ByteOrder::hostOrder</a></div><div class="ttdeci">Endianness hostOrder()</div><div class="ttdoc">Byte order of host machine.</div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_addb233e607dd142591effd1f00b31952"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#addb233e607dd142591effd1f00b31952">Rose::BinaryAnalysis::ByteOrder::swapBytes</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type swapBytes(const T &x)</div><div class="ttdoc">Reverse bytes.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00037">ByteOrder.h:37</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BinaryAnalysis_1_1ByteOrder_html_adea5b400468f6bf230dd05424d2c8306"><div class="ttname"><a href="namespaceRose_1_1BinaryAnalysis_1_1ByteOrder.html#adea5b400468f6bf230dd05424d2c8306">Rose::BinaryAnalysis::ByteOrder::hostToDisk</a></div><div class="ttdeci">void hostToDisk(Endianness sex, const Source &src, Destination *dst, typename std::enable_if< std::is_integral< Source >::value &&std::is_integral< Destination >::value >::type *=nullptr)</div><div class="ttdoc">Convert host value to specified endianness.</div><div class="ttdef"><b>Definition</b> <a href="ByteOrder_8h_source.html#l00113">ByteOrder.h:113</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BitOps_html_a34346c192a42cc45f288575e05158dd6"><div class="ttname"><a href="namespaceRose_1_1BitOps.html#a34346c192a42cc45f288575e05158dd6">Rose::BitOps::reverseBytes</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type reverseBytes(const T &x)</div><div class="ttdoc">Reverse the bytes.</div><div class="ttdef"><b>Definition</b> <a href="BitOps_8h_source.html#l00481">BitOps.h:481</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BitOps_html_a537c2ba834589058812b2be8c49ca4b9"><div class="ttname"><a href="namespaceRose_1_1BitOps.html#a537c2ba834589058812b2be8c49ca4b9">Rose::BitOps::toBigEndian</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type toBigEndian(const T x)</div><div class="ttdoc">Convert integral value from host order to big endian.</div><div class="ttdef"><b>Definition</b> <a href="BitOps_8h_source.html#l00524">BitOps.h:524</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BitOps_html_a55ccb8f40ef732686e0f299d34049710"><div class="ttname"><a href="namespaceRose_1_1BitOps.html#a55ccb8f40ef732686e0f299d34049710">Rose::BitOps::fromBigEndian</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type fromBigEndian(const T x)</div><div class="ttdoc">Convert integral value from big endian to host order.</div><div class="ttdef"><b>Definition</b> <a href="BitOps_8h_source.html#l00544">BitOps.h:544</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BitOps_html_a907ceb8f70ab5ea56b4b0abb85c53861"><div class="ttname"><a href="namespaceRose_1_1BitOps.html#a907ceb8f70ab5ea56b4b0abb85c53861">Rose::BitOps::fromLittleEndian</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type fromLittleEndian(const T x)</div><div class="ttdoc">Convert integral value from little endian to host order.</div><div class="ttdef"><b>Definition</b> <a href="BitOps_8h_source.html#l00554">BitOps.h:554</a></div></div>
<div class="ttc" id="anamespaceRose_1_1BitOps_html_ac3d8579e017a1f95f9e74de7c2b3e8b9"><div class="ttname"><a href="namespaceRose_1_1BitOps.html#ac3d8579e017a1f95f9e74de7c2b3e8b9">Rose::BitOps::toLittleEndian</a></div><div class="ttdeci">std::enable_if< std::is_integral< T >::value, T >::type toLittleEndian(const T x)</div><div class="ttdoc">Convert integral value from host order to little endian.</div><div class="ttdef"><b>Definition</b> <a href="BitOps_8h_source.html#l00534">BitOps.h:534</a></div></div>
<div class="ttc" id="anamespaceRose_html"><div class="ttname"><a href="namespaceRose.html">Rose</a></div><div class="ttdoc">The ROSE library.</div><div class="ttdef"><b>Definition</b> <a href="BinaryTutorial_8dox_source.html#l00003">BinaryTutorial.dox:3</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 2 2024 00:08:24 for ROSE by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>