Files
hasherezade-bearparser/_exe_element_wrapper_8cpp_source.html
T
2022-09-16 04:03:49 +00:00

233 lines
40 KiB
HTML

<!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.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BearParser: parser/ExeElementWrapper.cpp 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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.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">BearParser
</div>
<div id="projectbrief">Portable Executable parsing library (from PE-bear)</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_572890c148f68441e050f6560d78312b.html">parser</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">ExeElementWrapper.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="_exe_element_wrapper_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include &quot;<a class="code" href="_exe_element_wrapper_8h.html">ExeElementWrapper.h</a>&quot;</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#a7764c345edef03df4f974f7f09a70a3b"> 3</a></span><a class="code hl_function" href="class_exe_element_wrapper.html#a7764c345edef03df4f974f7f09a70a3b">ExeElementWrapper::ExeElementWrapper</a>(<a class="code hl_class" href="class_executable.html">Executable</a> *v_exe)</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span>{</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> <span class="keywordflow">if</span> (v_exe == NULL) {</div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> <a class="code hl_function" href="namespace_logger.html#a36e3deee152da96a491b670a00d224c9">Logger::append</a>(<a class="code hl_enumvalue" href="namespace_logger.html#ac865c986e93dc9338b084620d59c6e97a7a600e2a74793434c9cdb5a03c87a48c">Logger::D_ERROR</a>, <span class="stringliteral">&quot;Cannot initialize with Exe == NULL!&quot;</span>);</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> <span class="keywordflow">throw</span> <a class="code hl_class" href="class_custom_exception.html">CustomException</a>(<span class="stringliteral">&quot;Cannot initialize with Exe == NULL!&quot;</span>);</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> }</div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a> = v_exe;</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</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"><a class="line" href="class_exe_element_wrapper.html#a10ef93fdda6cf93c5db02b696a81b7c7"> 12</a></span><a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#a9067dc831274514d508e98df05bf015d">bufsize_t</a> <a class="code hl_function" href="class_exe_element_wrapper.html#a10ef93fdda6cf93c5db02b696a81b7c7">ExeElementWrapper::getFieldSize</a>(<span class="keywordtype">size_t</span> fieldId, <span class="keywordtype">size_t</span> subField)</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span>{</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> <span class="keywordtype">size_t</span> fieldsCount = <a class="code hl_function" href="class_exe_element_wrapper.html#a561b2d35521c1f6cb5f07a183989dc83">getFieldsCount</a>();</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> <span class="keywordflow">if</span> (fieldId &gt;= fieldsCount) <span class="keywordflow">return</span> this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a087ecf5a983c1ef1e8de95b16c487616">getSize</a>();</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> <span class="keywordtype">void</span> *ptr = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a43f0978ee5667e5dd34293f155d3d3cf">getFieldPtr</a>(fieldId, subField);</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keywordflow">if</span> (ptr == NULL) <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordtype">void</span> *nextPtr = NULL;</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keywordtype">size_t</span> nextFID = fieldId + 1;</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keywordflow">if</span> (nextFID &lt; fieldsCount ) nextPtr = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a43f0978ee5667e5dd34293f155d3d3cf">getFieldPtr</a>(nextFID, subField);</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordflow">if</span> (nextPtr != NULL) {</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> int64_t dif = <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> (nextPtr) - <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> (ptr);</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">if</span> (dif &lt; 0) <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordflow">return</span> (<a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#a9067dc831274514d508e98df05bf015d">bufsize_t</a>) dif;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> }</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> fullSize = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a087ecf5a983c1ef1e8de95b16c487616">getSize</a>();</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> BYTE *bgnPtr = (BYTE*) <a class="code hl_function" href="class_exe_element_wrapper.html#a227c20e3780b42bc18822e992bf4d116">getPtr</a>();</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> BYTE *endPtr = bgnPtr + fullSize;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> dif = <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> (endPtr) - <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> (ptr);</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">return</span> (<a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#a9067dc831274514d508e98df05bf015d">bufsize_t</a>) dif;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>}</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#a98ca205ec6f2d2deacd32327409a3539"> 39</a></span><a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> <a class="code hl_function" href="class_exe_element_wrapper.html#a98ca205ec6f2d2deacd32327409a3539">ExeElementWrapper::getOffset</a>()</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>{</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> BYTE *ptr = (BYTE*)this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a227c20e3780b42bc18822e992bf4d116">getPtr</a>();</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_exe_element_wrapper.html#a98ca205ec6f2d2deacd32327409a3539">getOffset</a>(ptr);</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#af6fdb98a1dff9810143d6677b99ff4dd"> 45</a></span><a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> <a class="code hl_function" href="class_exe_element_wrapper.html#a98ca205ec6f2d2deacd32327409a3539">ExeElementWrapper::getOffset</a>(<span class="keywordtype">void</span> *ptr, <span class="keywordtype">bool</span> allowExceptions)</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>{</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a>) <span class="keywordflow">return</span> <a class="code hl_variable" href="_abstract_byte_buffer_8h.html#ab99058386f4a8bc4e8cd07fad8198178">INVALID_ADDR</a>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">return</span> <a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a>-&gt;<a class="code hl_function" href="class_abstract_byte_buffer.html#adb10018e327d14ac29d842aee3ab5465">getOffset</a>(ptr, allowExceptions);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>}</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#a4a1afe592b11191cab1d74432f759b41"> 51</a></span><a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> <a class="code hl_function" href="class_exe_element_wrapper.html#a4a1afe592b11191cab1d74432f759b41">ExeElementWrapper::getFieldOffset</a>(<span class="keywordtype">size_t</span> fieldId, <span class="keywordtype">size_t</span> subField)</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span>{</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordtype">void</span>* ptr = <a class="code hl_function" href="class_exe_element_wrapper.html#a43f0978ee5667e5dd34293f155d3d3cf">getFieldPtr</a>(fieldId, subField);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">return</span> <a class="code hl_function" href="class_exe_element_wrapper.html#a98ca205ec6f2d2deacd32327409a3539">getOffset</a>(ptr);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span>}</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#a5f05db52fcfdf132740fa6f0923055cd"> 57</a></span><a class="code hl_class" href="class_wrapped_value.html">WrappedValue</a> <a class="code hl_function" href="class_exe_element_wrapper.html#a5f05db52fcfdf132740fa6f0923055cd">ExeElementWrapper::getWrappedValue</a>(<span class="keywordtype">size_t</span> fieldId, <span class="keywordtype">size_t</span> subFieldId)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>{</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">if</span> (fieldId == -1) <span class="keywordflow">return</span> <a class="code hl_class" href="class_wrapped_value.html">WrappedValue</a>(); <span class="comment">//EMPTY</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordtype">void</span>* ptr = <a class="code hl_function" href="class_exe_element_wrapper.html#a43f0978ee5667e5dd34293f155d3d3cf">getFieldPtr</a>(fieldId, subFieldId);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">if</span> (ptr == NULL) <span class="keywordflow">return</span> <a class="code hl_class" href="class_wrapped_value.html">WrappedValue</a>(); <span class="comment">//EMPTY</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#a9067dc831274514d508e98df05bf015d">bufsize_t</a> fieldSize = <a class="code hl_function" href="class_exe_element_wrapper.html#a10ef93fdda6cf93c5db02b696a81b7c7">getFieldSize</a>(fieldId, subFieldId);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">if</span> (fieldSize == <a class="code hl_variable" href="_abstract_byte_buffer_8h.html#a06eeddcfd3f26853ac1210c897f8a003">BUFSIZE_MAX</a> || fieldSize == 0) <span class="keywordflow">return</span> <a class="code hl_class" href="class_wrapped_value.html">WrappedValue</a>(); <span class="comment">//EMPTY</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> offset = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a98ca205ec6f2d2deacd32327409a3539">getOffset</a>(ptr);</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">if</span> (offset == <a class="code hl_variable" href="_abstract_byte_buffer_8h.html#ab99058386f4a8bc4e8cd07fad8198178">INVALID_ADDR</a>) <span class="keywordflow">return</span> <a class="code hl_class" href="class_wrapped_value.html">WrappedValue</a>(); <span class="comment">//EMPTY</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_enumeration" href="class_wrapped_value.html#a70fcd4afb963d228e1f84fc422d13e0a">WrappedValue::data_type</a> dataType = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a86cc36cd7ea4808d93c0ac59ffb12e60">containsDataType</a>(fieldId, subFieldId);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">return</span> <a class="code hl_class" href="class_wrapped_value.html">WrappedValue</a>(this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a>, offset, fieldSize, dataType);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>}</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#af742979e13e19e532cc42ab72b2a0f80"> 73</a></span>uint64_t <a class="code hl_function" href="class_exe_element_wrapper.html#af742979e13e19e532cc42ab72b2a0f80">ExeElementWrapper::getNumValue</a>(<span class="keywordtype">size_t</span> fId, <span class="keywordtype">size_t</span> subField, <span class="keywordtype">bool</span>* isOk)</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>{</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">if</span> (isOk) (*isOk) = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">if</span> (this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a> == NULL) <span class="keywordflow">return</span> (-1);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> offset = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a4a1afe592b11191cab1d74432f759b41">getFieldOffset</a>(fId, subField);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#a9067dc831274514d508e98df05bf015d">bufsize_t</a> size = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a10ef93fdda6cf93c5db02b696a81b7c7">getFieldSize</a>(fId, subField);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">return</span> this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a>-&gt;<a class="code hl_function" href="class_abstract_byte_buffer.html#a9476fc334d491f3882852b0048a76b77">getNumValue</a>(offset, size, isOk);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span>}</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#a1e74b95ca63396ca3f720b05a54f2b62"> 83</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="class_exe_element_wrapper.html#a1e74b95ca63396ca3f720b05a54f2b62">ExeElementWrapper::setNumValue</a>(<span class="keywordtype">size_t</span> fId, <span class="keywordtype">size_t</span> subField, uint64_t newVal)</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>{</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">if</span> (this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a> == NULL) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> offset = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a4a1afe592b11191cab1d74432f759b41">getFieldOffset</a>(fId, subField);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#a9067dc831274514d508e98df05bf015d">bufsize_t</a> size = this-&gt;<a class="code hl_function" href="class_exe_element_wrapper.html#a10ef93fdda6cf93c5db02b696a81b7c7">getFieldSize</a>(fId, subField);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">return</span> this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a>-&gt;<a class="code hl_function" href="class_abstract_byte_buffer.html#a5e4be1e74690ad6517c3d19ed946b857">setNumValue</a>(offset, size, newVal);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#a1f58acc525be97f70b60d8a3ab1df6da"> 92</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="class_exe_element_wrapper.html#a1f58acc525be97f70b60d8a3ab1df6da">ExeElementWrapper::canCopyToOffset</a>(<a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> rawOffset)</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span>{</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">if</span> (this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a> == NULL) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">if</span> (this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a>-&gt;<a class="code hl_function" href="class_abstract_byte_buffer.html#ad6e51045cafb47ed7d4467b55ad74d4f">isAreaEmpty</a>(rawOffset, <a class="code hl_function" href="class_exe_element_wrapper.html#a087ecf5a983c1ef1e8de95b16c487616">getSize</a>()) == <span class="keyword">false</span>) {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</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="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span>}</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="class_exe_element_wrapper.html#aae7b512e4a6302259348e4f9ce817c36"> 102</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="class_exe_element_wrapper.html#aae7b512e4a6302259348e4f9ce817c36">ExeElementWrapper::copyToOffset</a>(<a class="code hl_typedef" href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a> rawOffset)</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span>{</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">if</span> (this-&gt;<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a> == NULL) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="class_exe_element_wrapper.html#a1f58acc525be97f70b60d8a3ab1df6da">canCopyToOffset</a>(rawOffset) == <span class="keyword">false</span>) {</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_function" href="namespace_logger.html#a36e3deee152da96a491b670a00d224c9">Logger::append</a>(<a class="code hl_enumvalue" href="namespace_logger.html#ac865c986e93dc9338b084620d59c6e97a7a600e2a74793434c9cdb5a03c87a48c">Logger::D_ERROR</a>,<span class="stringliteral">&quot;The area is not empty!&quot;</span>);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> }</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">m_Exe</a>-&gt;<a class="code hl_function" href="class_abstract_byte_buffer.html#a879558945e14b82e6345dd47f25140c1">pasteBuffer</a>(rawOffset, <span class="keyword">this</span>, <span class="keyword">false</span>) == <span class="keyword">false</span>) {</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_function" href="namespace_logger.html#a36e3deee152da96a491b670a00d224c9">Logger::append</a>(<a class="code hl_enumvalue" href="namespace_logger.html#ac865c986e93dc9338b084620d59c6e97a7a600e2a74793434c9cdb5a03c87a48c">Logger::D_ERROR</a>,<span class="stringliteral">&quot;Cannot paste the buffer!&quot;</span>);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> }</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span>}</div>
<div class="ttc" id="a_abstract_byte_buffer_8h_html_a06eeddcfd3f26853ac1210c897f8a003"><div class="ttname"><a href="_abstract_byte_buffer_8h.html#a06eeddcfd3f26853ac1210c897f8a003">BUFSIZE_MAX</a></div><div class="ttdeci">const bufsize_t BUFSIZE_MAX</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8h_source.html#l00015">AbstractByteBuffer.h:15</a></div></div>
<div class="ttc" id="a_abstract_byte_buffer_8h_html_a9067dc831274514d508e98df05bf015d"><div class="ttname"><a href="_abstract_byte_buffer_8h.html#a9067dc831274514d508e98df05bf015d">bufsize_t</a></div><div class="ttdeci">uint32_t bufsize_t</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8h_source.html#l00014">AbstractByteBuffer.h:14</a></div></div>
<div class="ttc" id="a_abstract_byte_buffer_8h_html_ab99058386f4a8bc4e8cd07fad8198178"><div class="ttname"><a href="_abstract_byte_buffer_8h.html#ab99058386f4a8bc4e8cd07fad8198178">INVALID_ADDR</a></div><div class="ttdeci">const offset_t INVALID_ADDR</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8h_source.html#l00018">AbstractByteBuffer.h:18</a></div></div>
<div class="ttc" id="a_abstract_byte_buffer_8h_html_aea96e09e4ebfca2845a36a4d9882f7f6"><div class="ttname"><a href="_abstract_byte_buffer_8h.html#aea96e09e4ebfca2845a36a4d9882f7f6">offset_t</a></div><div class="ttdeci">uint64_t offset_t</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8h_source.html#l00017">AbstractByteBuffer.h:17</a></div></div>
<div class="ttc" id="a_exe_element_wrapper_8h_html"><div class="ttname"><a href="_exe_element_wrapper_8h.html">ExeElementWrapper.h</a></div></div>
<div class="ttc" id="aclass_abstract_byte_buffer_html_a5e4be1e74690ad6517c3d19ed946b857"><div class="ttname"><a href="class_abstract_byte_buffer.html#a5e4be1e74690ad6517c3d19ed946b857">AbstractByteBuffer::setNumValue</a></div><div class="ttdeci">bool setNumValue(offset_t offset, bufsize_t size, uint64_t newVal)</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8cpp_source.html#l00327">AbstractByteBuffer.cpp:327</a></div></div>
<div class="ttc" id="aclass_abstract_byte_buffer_html_a879558945e14b82e6345dd47f25140c1"><div class="ttname"><a href="class_abstract_byte_buffer.html#a879558945e14b82e6345dd47f25140c1">AbstractByteBuffer::pasteBuffer</a></div><div class="ttdeci">bool pasteBuffer(offset_t rawOffset, AbstractByteBuffer *buf, bool allowTrunc)</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8cpp_source.html#l00210">AbstractByteBuffer.cpp:210</a></div></div>
<div class="ttc" id="aclass_abstract_byte_buffer_html_a9476fc334d491f3882852b0048a76b77"><div class="ttname"><a href="class_abstract_byte_buffer.html#a9476fc334d491f3882852b0048a76b77">AbstractByteBuffer::getNumValue</a></div><div class="ttdeci">uint64_t getNumValue(offset_t offset, bufsize_t size, bool *isOk)</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8cpp_source.html#l00297">AbstractByteBuffer.cpp:297</a></div></div>
<div class="ttc" id="aclass_abstract_byte_buffer_html_ad6e51045cafb47ed7d4467b55ad74d4f"><div class="ttname"><a href="class_abstract_byte_buffer.html#ad6e51045cafb47ed7d4467b55ad74d4f">AbstractByteBuffer::isAreaEmpty</a></div><div class="ttdeci">bool isAreaEmpty(offset_t rawOffset, bufsize_t size)</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8cpp_source.html#l00188">AbstractByteBuffer.cpp:188</a></div></div>
<div class="ttc" id="aclass_abstract_byte_buffer_html_adb10018e327d14ac29d842aee3ab5465"><div class="ttname"><a href="class_abstract_byte_buffer.html#adb10018e327d14ac29d842aee3ab5465">AbstractByteBuffer::getOffset</a></div><div class="ttdeci">virtual offset_t getOffset(void *ptr, bool allowExceptions=false)</div><div class="ttdef"><b>Definition:</b> <a href="_abstract_byte_buffer_8cpp_source.html#l00035">AbstractByteBuffer.cpp:35</a></div></div>
<div class="ttc" id="aclass_custom_exception_html"><div class="ttname"><a href="class_custom_exception.html">CustomException</a></div><div class="ttdef"><b>Definition:</b> <a href="_custom_exception_8h_source.html#l00011">CustomException.h:12</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a087ecf5a983c1ef1e8de95b16c487616"><div class="ttname"><a href="class_exe_element_wrapper.html#a087ecf5a983c1ef1e8de95b16c487616">ExeElementWrapper::getSize</a></div><div class="ttdeci">virtual bufsize_t getSize()=0</div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a10ef93fdda6cf93c5db02b696a81b7c7"><div class="ttname"><a href="class_exe_element_wrapper.html#a10ef93fdda6cf93c5db02b696a81b7c7">ExeElementWrapper::getFieldSize</a></div><div class="ttdeci">virtual bufsize_t getFieldSize(size_t fieldId, size_t subField=FIELD_NONE)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00012">ExeElementWrapper.cpp:12</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a1e74b95ca63396ca3f720b05a54f2b62"><div class="ttname"><a href="class_exe_element_wrapper.html#a1e74b95ca63396ca3f720b05a54f2b62">ExeElementWrapper::setNumValue</a></div><div class="ttdeci">virtual bool setNumValue(size_t fieldId, size_t subField, uint64_t val)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00083">ExeElementWrapper.cpp:83</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a1f58acc525be97f70b60d8a3ab1df6da"><div class="ttname"><a href="class_exe_element_wrapper.html#a1f58acc525be97f70b60d8a3ab1df6da">ExeElementWrapper::canCopyToOffset</a></div><div class="ttdeci">virtual bool canCopyToOffset(offset_t rawOffset)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00092">ExeElementWrapper.cpp:92</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a227c20e3780b42bc18822e992bf4d116"><div class="ttname"><a href="class_exe_element_wrapper.html#a227c20e3780b42bc18822e992bf4d116">ExeElementWrapper::getPtr</a></div><div class="ttdeci">virtual void * getPtr()=0</div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a43f0978ee5667e5dd34293f155d3d3cf"><div class="ttname"><a href="class_exe_element_wrapper.html#a43f0978ee5667e5dd34293f155d3d3cf">ExeElementWrapper::getFieldPtr</a></div><div class="ttdeci">virtual void * getFieldPtr(size_t fieldId, size_t subField)=0</div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a4a1afe592b11191cab1d74432f759b41"><div class="ttname"><a href="class_exe_element_wrapper.html#a4a1afe592b11191cab1d74432f759b41">ExeElementWrapper::getFieldOffset</a></div><div class="ttdeci">virtual offset_t getFieldOffset(size_t fieldId, size_t subField=FIELD_NONE)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00051">ExeElementWrapper.cpp:51</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a561b2d35521c1f6cb5f07a183989dc83"><div class="ttname"><a href="class_exe_element_wrapper.html#a561b2d35521c1f6cb5f07a183989dc83">ExeElementWrapper::getFieldsCount</a></div><div class="ttdeci">virtual size_t getFieldsCount()=0</div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a5f05db52fcfdf132740fa6f0923055cd"><div class="ttname"><a href="class_exe_element_wrapper.html#a5f05db52fcfdf132740fa6f0923055cd">ExeElementWrapper::getWrappedValue</a></div><div class="ttdeci">virtual WrappedValue getWrappedValue(size_t fieldId, size_t subField)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00057">ExeElementWrapper.cpp:57</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a7764c345edef03df4f974f7f09a70a3b"><div class="ttname"><a href="class_exe_element_wrapper.html#a7764c345edef03df4f974f7f09a70a3b">ExeElementWrapper::ExeElementWrapper</a></div><div class="ttdeci">ExeElementWrapper(Executable *exe)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00003">ExeElementWrapper.cpp:3</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a86cc36cd7ea4808d93c0ac59ffb12e60"><div class="ttname"><a href="class_exe_element_wrapper.html#a86cc36cd7ea4808d93c0ac59ffb12e60">ExeElementWrapper::containsDataType</a></div><div class="ttdeci">virtual WrappedValue::data_type containsDataType(size_t fieldId, size_t subField=FIELD_NONE)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8h_source.html#l00048">ExeElementWrapper.h:48</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_a98ca205ec6f2d2deacd32327409a3539"><div class="ttname"><a href="class_exe_element_wrapper.html#a98ca205ec6f2d2deacd32327409a3539">ExeElementWrapper::getOffset</a></div><div class="ttdeci">virtual offset_t getOffset()</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00039">ExeElementWrapper.cpp:39</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_aae7b512e4a6302259348e4f9ce817c36"><div class="ttname"><a href="class_exe_element_wrapper.html#aae7b512e4a6302259348e4f9ce817c36">ExeElementWrapper::copyToOffset</a></div><div class="ttdeci">bool copyToOffset(offset_t rawOffset)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00102">ExeElementWrapper.cpp:102</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_ad5100967cd4bb4831c0e96de7659d53e"><div class="ttname"><a href="class_exe_element_wrapper.html#ad5100967cd4bb4831c0e96de7659d53e">ExeElementWrapper::m_Exe</a></div><div class="ttdeci">Executable * m_Exe</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8h_source.html#l00065">ExeElementWrapper.h:65</a></div></div>
<div class="ttc" id="aclass_exe_element_wrapper_html_af742979e13e19e532cc42ab72b2a0f80"><div class="ttname"><a href="class_exe_element_wrapper.html#af742979e13e19e532cc42ab72b2a0f80">ExeElementWrapper::getNumValue</a></div><div class="ttdeci">virtual uint64_t getNumValue(size_t fieldId, size_t subField, bool *isOk)</div><div class="ttdef"><b>Definition:</b> <a href="_exe_element_wrapper_8cpp_source.html#l00073">ExeElementWrapper.cpp:73</a></div></div>
<div class="ttc" id="aclass_executable_html"><div class="ttname"><a href="class_executable.html">Executable</a></div><div class="ttdef"><b>Definition:</b> <a href="_executable_8h_source.html#l00026">Executable.h:26</a></div></div>
<div class="ttc" id="aclass_wrapped_value_html"><div class="ttname"><a href="class_wrapped_value.html">WrappedValue</a></div><div class="ttdef"><b>Definition:</b> <a href="_wrapped_value_8h_source.html#l00012">WrappedValue.h:12</a></div></div>
<div class="ttc" id="aclass_wrapped_value_html_a70fcd4afb963d228e1f84fc422d13e0a"><div class="ttname"><a href="class_wrapped_value.html#a70fcd4afb963d228e1f84fc422d13e0a">WrappedValue::data_type</a></div><div class="ttdeci">data_type</div><div class="ttdef"><b>Definition:</b> <a href="_wrapped_value_8h_source.html#l00015">WrappedValue.h:15</a></div></div>
<div class="ttc" id="anamespace_logger_html_a36e3deee152da96a491b670a00d224c9"><div class="ttname"><a href="namespace_logger.html#a36e3deee152da96a491b670a00d224c9">Logger::append</a></div><div class="ttdeci">bool append(dbg_level lvl, const char *format,...)</div><div class="ttdef"><b>Definition:</b> <a href="_util_8cpp_source.html#l00008">Util.cpp:8</a></div></div>
<div class="ttc" id="anamespace_logger_html_ac865c986e93dc9338b084620d59c6e97a7a600e2a74793434c9cdb5a03c87a48c"><div class="ttname"><a href="namespace_logger.html#ac865c986e93dc9338b084620d59c6e97a7a600e2a74793434c9cdb5a03c87a48c">Logger::D_ERROR</a></div><div class="ttdeci">@ D_ERROR</div><div class="ttdef"><b>Definition:</b> <a href="_util_8h_source.html#l00026">Util.h:26</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>