aboutsummaryrefslogtreecommitdiffstats
path: root/set_8h_source.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--set_8h_source.html131
1 files changed, 131 insertions, 0 deletions
diff --git a/set_8h_source.html b/set_8h_source.html
new file mode 100644
index 0000000..f55c229
--- /dev/null
+++ b/set_8h_source.html
@@ -0,0 +1,131 @@
+<!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>Relational Algebra Engine: include/set.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/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">Relational Algebra Engine
+ </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&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>
+<script type="text/javascript">
+/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
+$(document).ready(function() { init_codefold(0); });
+/* @license-end */
+</script>
+<!-- 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_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle"><div class="title">set.h</div></div>
+</div><!--header-->
+<div class="contents">
+<a href="set_8h.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">#ifndef SET_H</span></div>
+<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define SET_H</span></div>
+<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
+<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &lt;stddef.h&gt;</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"><a class="line" href="set_8h.html#ae18711cd0f4e4e8356608ed79326276b"> 6</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structSet.html">Set</a> <a class="code hl_struct" href="structSet.html">Set</a>;</div>
+<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
+<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">/* Function pointer type for comparison.</span></div>
+<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> Should return 0 if equal, &lt;0 if a &lt; b, &gt;0 if a &gt; b */</span></div>
+<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"><a class="line" href="set_8h.html#a06af63e60b3ef1e2879ce1896685b599"> 10</a></span><span class="keyword">typedef</span> int (*<a class="code hl_typedef" href="set_8h.html#a06af63e60b3ef1e2879ce1896685b599">SetCompareFn</a>)(<span class="keyword">const</span> <span class="keywordtype">void</span> *a, <span class="keyword">const</span> <span class="keywordtype">void</span> *b);</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="comment">/* Function pointer type for freeing elements (optional, can be NULL) */</span></div>
+<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"><a class="line" href="set_8h.html#ae58aa89dcaed24a2807b4b67ff8f9cf6"> 13</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="set_8h.html#ae58aa89dcaed24a2807b4b67ff8f9cf6">SetFreeFn</a>)(<span class="keywordtype">void</span> *elem);</div>
+<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
+<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><a class="code hl_struct" href="structSet.html">Set</a> *<a class="code hl_function" href="set_8h.html#a5b646b26d147dfeeeea8e757a8096a8c">set_create</a>(<a class="code hl_typedef" href="set_8h.html#a06af63e60b3ef1e2879ce1896685b599">SetCompareFn</a> <a class="code hl_variable" href="structSet.html#a39ade50c69068171b307b049a247cab3">cmp</a>, <a class="code hl_typedef" href="set_8h.html#ae58aa89dcaed24a2807b4b67ff8f9cf6">SetFreeFn</a> <a class="code hl_variable" href="structSet.html#a35539f1fb4dacf88ced13489cd008621">freer</a>);</div>
+<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="keywordtype">void</span> <a class="code hl_function" href="set_8h.html#a9d762a027f1c3bcdd22f70ee9093a7dd">set_destroy</a>(<a class="code hl_struct" href="structSet.html">Set</a> *set);</div>
+<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
+<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">/* Basic operations */</span></div>
+<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="keywordtype">int</span> <a class="code hl_function" href="set_8h.html#a6d3c6162152fb63fc571c269ff42932e">set_add</a>(<a class="code hl_struct" href="structSet.html">Set</a> *set, <span class="keywordtype">void</span> *elem);</div>
+<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keywordtype">int</span> <a class="code hl_function" href="set_8h.html#a810577df03b3c0d077c2e9c90fef6648">set_remove</a>(<a class="code hl_struct" href="structSet.html">Set</a> *set, <span class="keyword">const</span> <span class="keywordtype">void</span> *elem);</div>
+<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keywordtype">int</span> <a class="code hl_function" href="set_8h.html#a1f829089f94f01c84a55010ad1e6ca77">set_contains</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structSet.html">Set</a> *set, <span class="keyword">const</span> <span class="keywordtype">void</span> *elem);</div>
+<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="keywordtype">size_t</span> <a class="code hl_function" href="set_8h.html#a3337392b0e2da0fbacb5cbd04bff7ff3">set_size</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structSet.html">Set</a> *set);</div>
+<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
+<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">/* Iteration */</span></div>
+<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="set_8h.html#a370a2d3c5b99f48b2b5c2354b419ee2e"> 25</a></span><span class="keyword">typedef</span> void (*<a class="code hl_typedef" href="set_8h.html#a370a2d3c5b99f48b2b5c2354b419ee2e">SetIterFn</a>)(<span class="keywordtype">void</span> *elem, <span class="keywordtype">void</span> *userdata);</div>
+<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keywordtype">void</span> <a class="code hl_function" href="set_8h.html#add1f5ca395dd043e9bf77e58d4ba7d96">set_foreach</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structSet.html">Set</a> *set, <a class="code hl_typedef" href="set_8h.html#a370a2d3c5b99f48b2b5c2354b419ee2e">SetIterFn</a> fn, <span class="keywordtype">void</span> *userdata);</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="preprocessor">#endif </span><span class="comment">// SET_H</span></div>
+<div class="ttc" id="aset_8h_html_a06af63e60b3ef1e2879ce1896685b599"><div class="ttname"><a href="set_8h.html#a06af63e60b3ef1e2879ce1896685b599">SetCompareFn</a></div><div class="ttdeci">int(* SetCompareFn)(const void *a, const void *b)</div><div class="ttdef"><b>Definition</b> set.h:10</div></div>
+<div class="ttc" id="aset_8h_html_a1f829089f94f01c84a55010ad1e6ca77"><div class="ttname"><a href="set_8h.html#a1f829089f94f01c84a55010ad1e6ca77">set_contains</a></div><div class="ttdeci">int set_contains(const Set *set, const void *elem)</div><div class="ttdoc">Check if a Set contains an element.</div><div class="ttdef"><b>Definition</b> set.c:70</div></div>
+<div class="ttc" id="aset_8h_html_a3337392b0e2da0fbacb5cbd04bff7ff3"><div class="ttname"><a href="set_8h.html#a3337392b0e2da0fbacb5cbd04bff7ff3">set_size</a></div><div class="ttdeci">size_t set_size(const Set *set)</div><div class="ttdoc">Get the number of elements in a Set.</div><div class="ttdef"><b>Definition</b> set.c:131</div></div>
+<div class="ttc" id="aset_8h_html_a370a2d3c5b99f48b2b5c2354b419ee2e"><div class="ttname"><a href="set_8h.html#a370a2d3c5b99f48b2b5c2354b419ee2e">SetIterFn</a></div><div class="ttdeci">void(* SetIterFn)(void *elem, void *userdata)</div><div class="ttdef"><b>Definition</b> set.h:25</div></div>
+<div class="ttc" id="aset_8h_html_a5b646b26d147dfeeeea8e757a8096a8c"><div class="ttname"><a href="set_8h.html#a5b646b26d147dfeeeea8e757a8096a8c">set_create</a></div><div class="ttdeci">Set * set_create(SetCompareFn cmp, SetFreeFn freer)</div><div class="ttdoc">Create a new Set.</div><div class="ttdef"><b>Definition</b> set.c:31</div></div>
+<div class="ttc" id="aset_8h_html_a6d3c6162152fb63fc571c269ff42932e"><div class="ttname"><a href="set_8h.html#a6d3c6162152fb63fc571c269ff42932e">set_add</a></div><div class="ttdeci">int set_add(Set *set, void *elem)</div><div class="ttdoc">Add an element to a Set.</div><div class="ttdef"><b>Definition</b> set.c:85</div></div>
+<div class="ttc" id="aset_8h_html_a810577df03b3c0d077c2e9c90fef6648"><div class="ttname"><a href="set_8h.html#a810577df03b3c0d077c2e9c90fef6648">set_remove</a></div><div class="ttdeci">int set_remove(Set *set, const void *elem)</div><div class="ttdoc">Remove an element from a Set.</div><div class="ttdef"><b>Definition</b> set.c:105</div></div>
+<div class="ttc" id="aset_8h_html_a9d762a027f1c3bcdd22f70ee9093a7dd"><div class="ttname"><a href="set_8h.html#a9d762a027f1c3bcdd22f70ee9093a7dd">set_destroy</a></div><div class="ttdeci">void set_destroy(Set *set)</div><div class="ttdoc">Destroy a Set and free its memory.</div><div class="ttdef"><b>Definition</b> set.c:49</div></div>
+<div class="ttc" id="aset_8h_html_add1f5ca395dd043e9bf77e58d4ba7d96"><div class="ttname"><a href="set_8h.html#add1f5ca395dd043e9bf77e58d4ba7d96">set_foreach</a></div><div class="ttdeci">void set_foreach(const Set *set, SetIterFn fn, void *userdata)</div><div class="ttdoc">Iterate over all elements in a Set.</div><div class="ttdef"><b>Definition</b> set.c:140</div></div>
+<div class="ttc" id="aset_8h_html_ae58aa89dcaed24a2807b4b67ff8f9cf6"><div class="ttname"><a href="set_8h.html#ae58aa89dcaed24a2807b4b67ff8f9cf6">SetFreeFn</a></div><div class="ttdeci">void(* SetFreeFn)(void *elem)</div><div class="ttdef"><b>Definition</b> set.h:13</div></div>
+<div class="ttc" id="astructSet_html"><div class="ttname"><a href="structSet.html">Set</a></div><div class="ttdef"><b>Definition</b> set.c:17</div></div>
+<div class="ttc" id="astructSet_html_a35539f1fb4dacf88ced13489cd008621"><div class="ttname"><a href="structSet.html#a35539f1fb4dacf88ced13489cd008621">Set::freer</a></div><div class="ttdeci">SetFreeFn freer</div><div class="ttdef"><b>Definition</b> set.c:20</div></div>
+<div class="ttc" id="astructSet_html_a39ade50c69068171b307b049a247cab3"><div class="ttname"><a href="structSet.html#a39ade50c69068171b307b049a247cab3">Set::cmp</a></div><div class="ttdeci">SetCompareFn cmp</div><div class="ttdef"><b>Definition</b> set.c:19</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.8
+</small></address>
+</body>
+</html>