<ahref="pearl-tools_8ipf.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aid="l00001"name="l00001"></a><spanclass="lineno"> 1</span><spanclass="preprocessor">#pragma TextEncoding = "UTF-8"</span></div>
<divclass="line"><aid="l00002"name="l00002"></a><spanclass="lineno"> 2</span><spanclass="preprocessor">#pragma rtGlobals=3 </span><spanclass="comment">// Use modern global access method and strict wave access.</span></div>
<divclass="line"><aid="l00003"name="l00003"></a><spanclass="lineno"> 3</span><spanclass="preprocessor">#pragma version = 1.00</span></div>
<divclass="line"><aid="l00014"name="l00014"></a><spanclass="lineno"> 14</span><spanclass="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
<divclass="line"><aid="l00015"name="l00015"></a><spanclass="lineno"> 15</span><spanclass="comment">// you may not use this file except in compliance with the License.</span></div>
<divclass="line"><aid="l00016"name="l00016"></a><spanclass="lineno"> 16</span><spanclass="comment">// You may obtain a copy of the License at</span></div>
<divclass="line"><aid="l00020"name="l00020"></a><spanclass="lineno"> 20</span><spanclass="comment">// function prototype for IterateWaves</span></div>
<divclass="line"><aid="l00021"name="l00021"></a><spanclass="lineno"> 21</span> wave w <spanclass="comment">// wave which the iterator is supposed to work on</span></div>
<divclass="line"><aid="l00022"name="l00022"></a><spanclass="lineno"> 22</span><spanclass="keywordtype">string</span>&sdata <spanclass="comment">// string with additional data, shared between calls</span></div>
<divclass="line"><aid="l00023"name="l00023"></a><spanclass="lineno"> 23</span><spanclass="comment">// this is a pass-by-reference argument,</span></div>
<divclass="line"><aid="l00024"name="l00024"></a><spanclass="lineno"> 24</span><spanclass="comment">// the function may modify the string</span></div>
<divclass="line"><aid="l00028"name="l00028"></a><spanclass="lineno"> 28</span><spanclass="comment">// append iterated waves to the current graph</span></div>
<divclass="line"><aid="l00029"name="l00029"></a><spanclass="lineno"> 29</span> wave w <spanclass="comment">// wave to be displayed</span></div>
<divclass="line"><aid="l00030"name="l00030"></a><spanclass="lineno"> 30</span><spanclass="keywordtype">string</span>&sdata <spanclass="comment">// not used</span></div>
<divclass="line"><aid="l00036"name="l00036"></a><spanclass="lineno"> 36</span><spanclass="comment">// sum waves into one result wave</span></div>
<divclass="line"><aid="l00037"name="l00037"></a><spanclass="lineno"> 37</span> wave w <spanclass="comment">// wave which the iterator is supposed to work on</span></div>
<divclass="line"><aid="l00038"name="l00038"></a><spanclass="lineno"> 38</span><spanclass="keywordtype">string</span>&sdata <spanclass="comment">// name of the result wave, can include absolute path</span></div>
<divclass="line"><aid="l00039"name="l00039"></a><spanclass="lineno"> 39</span><spanclass="comment">// the wave must exist and compatible with the summands</span></div>
<divclass="line"><aid="l00040"name="l00040"></a><spanclass="lineno"> 40</span><spanclass="comment">// the caller is responsible for initialization of the wave</span></div>
<divclass="line"><aid="l00047"name="l00047"></a><spanclass="lineno"> 47</span><spanclass="comment">// iterate over all waves matching a specified pattern (see built-in WaveList function),</span></div>
<divclass="line"><aid="l00048"name="l00048"></a><spanclass="lineno"> 48</span><spanclass="comment">// passing each wave to a user-defined iterator function</span></div>
<divclass="line"><aid="l00049"name="l00049"></a><spanclass="lineno"> 49</span><spanclass="keywordtype">string</span> matchStr <spanclass="comment">// matchStr as for WaveList</span></div>
<divclass="line"><aid="l00051"name="l00051"></a><spanclass="lineno"> 51</span><spanclass="comment">// use the DefaultWaveIterator function as a template</span></div>
<divclass="line"><aid="l00052"name="l00052"></a><spanclass="lineno"> 52</span><spanclass="keywordtype">string</span> sdata <spanclass="comment">// data string passed to iterator function</span></div>
<divclass="line"><aid="l00053"name="l00053"></a><spanclass="lineno"> 53</span><spanclass="comment">// the iterator may modify the string</span></div>
<divclass="line"><aid="l00054"name="l00054"></a><spanclass="lineno"> 54</span><spanclass="comment">// the function returns the string at the end</span></div>
<divclass="line"><aid="l00067"name="l00067"></a><spanclass="lineno"> 67</span><spanclass="comment">// function prototype for IterateWaves</span></div>
<divclass="line"><aid="l00068"name="l00068"></a><spanclass="lineno"> 68</span> dfref df <spanclass="comment">// data folder reference which the iterator is supposed to work on</span></div>
<divclass="line"><aid="l00069"name="l00069"></a><spanclass="lineno"> 69</span><spanclass="keywordtype">string</span>&sdata <spanclass="comment">// string with additional data, shared between calls</span></div>
<divclass="line"><aid="l00070"name="l00070"></a><spanclass="lineno"> 70</span><spanclass="comment">// this is a pass-by-reference argument,</span></div>
<divclass="line"><aid="l00071"name="l00071"></a><spanclass="lineno"> 71</span><spanclass="comment">// the function may modify the string</span></div>
<divclass="line"><aid="l00077"name="l00077"></a><spanclass="lineno"> 77</span><spanclass="comment">// no need to switch back to original folder</span></div>
<divclass="line"><aid="l00081"name="l00081"></a><spanclass="lineno"> 81</span><spanclass="comment">// iterate over all data folders matching a specified pattern in the current data folder,</span></div>
<divclass="line"><aid="l00082"name="l00082"></a><spanclass="lineno"> 82</span><spanclass="comment">// passing each folder to a user-defined iterator function</span></div>
<divclass="line"><aid="l00083"name="l00083"></a><spanclass="lineno"> 83</span><spanclass="keywordtype">string</span> matchStr <spanclass="comment">// matchStr as for the built-in stringmatch function</span></div>
<divclass="line"><aid="l00085"name="l00085"></a><spanclass="lineno"> 85</span><spanclass="comment">// use the DefaultFolderIterator function as a template</span></div>
<divclass="line"><aid="l00086"name="l00086"></a><spanclass="lineno"> 86</span><spanclass="keywordtype">string</span> sdata <spanclass="comment">// data string passed to iterator function</span></div>
<divclass="line"><aid="l00087"name="l00087"></a><spanclass="lineno"> 87</span><spanclass="comment">// the iterator may modify the string</span></div>
<divclass="line"><aid="l00088"name="l00088"></a><spanclass="lineno"> 88</span><spanclass="comment">// the function returns the string at the end</span></div>
<divclass="line"><aid="l00089"name="l00089"></a><spanclass="lineno"> 89</span><spanclass="keywordtype">string</span> progress_title <spanclass="comment">// title of the progress window (optional)</span></div>
<divclass="line"><aid="l00090"name="l00090"></a><spanclass="lineno"> 90</span><spanclass="comment">// if not specified or empty, the progress window will not be shown.</span></div>
<divclass="line"><aid="l00091"name="l00091"></a><spanclass="lineno"> 91</span><spanclass="comment">// if the progress window is show, the user can abort the iteration.</span></div>
<divclass="line"><aid="l00092"name="l00092"></a><spanclass="lineno"> 92</span><spanclass="comment">// the function result does not indicate whether the iteration was completed or aborted.</span></div>
<divclass="line"><aid="l00093"name="l00093"></a><spanclass="lineno"> 93</span><spanclass="comment">// the iterator and caller must take care of leaving the data in a consistent state.</span></div>
<liclass="footer">Generated on Mon Dec 22 2025 17:26:40 for PEARL Procedures by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.9.8 </li>