<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.8"/> <title>VSQLite++: include/sqlite/ext/variant.hpp 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> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </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 style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">VSQLite++  <span id="projectnumber">0.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.8 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_3f88e153761c17e242b6c7e4aa35bdc0.html">include</a></li><li class="navelem"><a class="el" href="dir_fe656244f5d8738c4990b4ed5b745c18.html">sqlite</a></li><li class="navelem"><a class="el" href="dir_6c756a94efbdc3c0fc53e583cf0816c1.html">ext</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">variant.hpp</div> </div> </div><!--header--> <div class="contents"> <a href="variant_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*##############################################################################</span></div> <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> VSQLite++ - virtuosic bytes SQLite3 C++ wrapper</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"></span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright (c) 2012 Vinzenz Feenstra vinzenz.feenstra@gmail.com</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> All rights reserved.</span></div> <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"></span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> Redistribution and use in source and binary forms, with or without modification,</span></div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> are permitted provided that the following conditions are met:</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span></div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * Redistributions of source code must retain the above copyright notice,</span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> this list of conditions and the following disclaimer.</span></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * Redistributions in binary form must reproduce the above copyright notice,</span></div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> this list of conditions and the following disclaimer in the documentation</span></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> and/or other materials provided with the distribution.</span></div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * Neither the name of virtuosic bytes nor the names of its contributors may</span></div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> be used to endorse or promote products derived from this software without</span></div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> specific prior written permission.</span></div> <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"></span></div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div> <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div> <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> POSSIBILITY OF SUCH DAMAGE.</span></div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"></span></div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">##############################################################################*/</span></div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#ifndef GUARD_SQLITE_EXT_VARIANT_HPP_INCLUDED</span></div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#define GUARD_SQLITE_EXT_VARIANT_HPP_INCLUDED</span></div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include <boost/variant.hpp></span></div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include <boost/shared_ptr.hpp></span></div> <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <boost/cstdint.hpp></span></div> <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <vector></span></div> <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include <string></span></div> <div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div> <div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">namespace </span><a class="code" href="namespacesqlite.html">sqlite</a>{</div> <div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> <div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700"> 43</a></span>  <span class="keyword">enum</span> <a class="code" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700">type</a> {</div> <div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700ab5fdd5b8df675cf89fab9dcd71b37eb1"> 44</a></span>  <a class="code" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700ab5fdd5b8df675cf89fab9dcd71b37eb1">unknown</a>,</div> <div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a560c243d0aea17a7787fef5ca613f162"> 45</a></span>  <a class="code" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a560c243d0aea17a7787fef5ca613f162">null</a>,</div> <div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a1d53d1ee7bc73bc6f238615ef4aae483"> 46</a></span>  <a class="code" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a1d53d1ee7bc73bc6f238615ef4aae483">integer</a>,</div> <div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a55ad5f8e3c01ab3b8a911fc88f3dbe00"> 47</a></span>  <a class="code" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a55ad5f8e3c01ab3b8a911fc88f3dbe00">real</a>,</div> <div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a1ab1e70476f59020c524a6bd6250a184"> 48</a></span>  <a class="code" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a1ab1e70476f59020c524a6bd6250a184">text</a>,</div> <div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a4dcb69cd3bd9945ae70f33bb6ffd3807"> 49</a></span>  <a class="code" href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a4dcb69cd3bd9945ae70f33bb6ffd3807">blob</a></div> <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  };</div> <div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div> <div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structsqlite_1_1unknown__t.html"> 52</a></span>  <span class="keyword">struct </span><a class="code" href="structsqlite_1_1unknown__t.html">unknown_t</a>{};</div> <div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="structsqlite_1_1null__t.html"> 53</a></span>  <span class="keyword">struct </span><a class="code" href="structsqlite_1_1null__t.html">null_t</a>{};</div> <div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="namespacesqlite.html#a3cfe00bbdca6df265ec7028e84aa64ec"> 54</a></span>  <span class="keyword">typedef</span> std::vector<boost::uint8_t> <a class="code" href="namespacesqlite.html#a3cfe00bbdca6df265ec7028e84aa64ec">blob_t</a>;</div> <div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="namespacesqlite.html#afc72b0006a971ab4acc286a9646eaec7"> 55</a></span>  <span class="keyword">typedef</span> boost::shared_ptr<blob_t> <a class="code" href="namespacesqlite.html#afc72b0006a971ab4acc286a9646eaec7">blob_ref_t</a>;</div> <div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div> <div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">typedef</span> boost::variant<</div> <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="structsqlite_1_1unknown__t.html">unknown_t</a>,</div> <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  int,</div> <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  boost::int64_t,</div> <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordtype">long</span> double,</div> <div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  std::string,</div> <div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <a class="code" href="structsqlite_1_1null__t.html">null_t</a>,</div> <div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="namespacesqlite.html#affa7282f6f84721e9822a130f60a37a8"> 64</a></span>  blob_ref_t > <a class="code" href="namespacesqlite.html#affa7282f6f84721e9822a130f60a37a8">variant_t</a>;</div> <div class="line"><a name="l00065"></a><span class="lineno"> 65</span> }</div> <div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div> <div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="preprocessor">#endif //GUARD_SQLITE_EXT_VARIANT_HPP_INCLUDED</span></div> <div class="ttc" id="namespacesqlite_html_a3cfe00bbdca6df265ec7028e84aa64ec"><div class="ttname"><a href="namespacesqlite.html#a3cfe00bbdca6df265ec7028e84aa64ec">sqlite::blob_t</a></div><div class="ttdeci">std::vector< boost::uint8_t > blob_t</div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00054">variant.hpp:54</a></div></div> <div class="ttc" id="namespacesqlite_html_a24df146a8eed4c7eb0378eed5d1b5700a560c243d0aea17a7787fef5ca613f162"><div class="ttname"><a href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a560c243d0aea17a7787fef5ca613f162">sqlite::null</a></div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00045">variant.hpp:45</a></div></div> <div class="ttc" id="namespacesqlite_html_a24df146a8eed4c7eb0378eed5d1b5700a4dcb69cd3bd9945ae70f33bb6ffd3807"><div class="ttname"><a href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a4dcb69cd3bd9945ae70f33bb6ffd3807">sqlite::blob</a></div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00049">variant.hpp:49</a></div></div> <div class="ttc" id="namespacesqlite_html"><div class="ttname"><a href="namespacesqlite.html">sqlite</a></div><div class="ttdef"><b>Definition:</b> <a href="command_8hpp_source.html#l00042">command.hpp:42</a></div></div> <div class="ttc" id="namespacesqlite_html_a24df146a8eed4c7eb0378eed5d1b5700"><div class="ttname"><a href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700">sqlite::type</a></div><div class="ttdeci">type</div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00043">variant.hpp:43</a></div></div> <div class="ttc" id="namespacesqlite_html_a24df146a8eed4c7eb0378eed5d1b5700a55ad5f8e3c01ab3b8a911fc88f3dbe00"><div class="ttname"><a href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a55ad5f8e3c01ab3b8a911fc88f3dbe00">sqlite::real</a></div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00047">variant.hpp:47</a></div></div> <div class="ttc" id="namespacesqlite_html_a24df146a8eed4c7eb0378eed5d1b5700a1ab1e70476f59020c524a6bd6250a184"><div class="ttname"><a href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a1ab1e70476f59020c524a6bd6250a184">sqlite::text</a></div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00048">variant.hpp:48</a></div></div> <div class="ttc" id="namespacesqlite_html_afc72b0006a971ab4acc286a9646eaec7"><div class="ttname"><a href="namespacesqlite.html#afc72b0006a971ab4acc286a9646eaec7">sqlite::blob_ref_t</a></div><div class="ttdeci">boost::shared_ptr< blob_t > blob_ref_t</div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00055">variant.hpp:55</a></div></div> <div class="ttc" id="structsqlite_1_1null__t_html"><div class="ttname"><a href="structsqlite_1_1null__t.html">sqlite::null_t</a></div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00053">variant.hpp:53</a></div></div> <div class="ttc" id="namespacesqlite_html_affa7282f6f84721e9822a130f60a37a8"><div class="ttname"><a href="namespacesqlite.html#affa7282f6f84721e9822a130f60a37a8">sqlite::variant_t</a></div><div class="ttdeci">boost::variant< unknown_t, int, boost::int64_t, long double, std::string, null_t, blob_ref_t > variant_t</div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00064">variant.hpp:64</a></div></div> <div class="ttc" id="namespacesqlite_html_a24df146a8eed4c7eb0378eed5d1b5700a1d53d1ee7bc73bc6f238615ef4aae483"><div class="ttname"><a href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700a1d53d1ee7bc73bc6f238615ef4aae483">sqlite::integer</a></div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00046">variant.hpp:46</a></div></div> <div class="ttc" id="namespacesqlite_html_a24df146a8eed4c7eb0378eed5d1b5700ab5fdd5b8df675cf89fab9dcd71b37eb1"><div class="ttname"><a href="namespacesqlite.html#a24df146a8eed4c7eb0378eed5d1b5700ab5fdd5b8df675cf89fab9dcd71b37eb1">sqlite::unknown</a></div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00044">variant.hpp:44</a></div></div> <div class="ttc" id="structsqlite_1_1unknown__t_html"><div class="ttname"><a href="structsqlite_1_1unknown__t.html">sqlite::unknown_t</a></div><div class="ttdef"><b>Definition:</b> <a href="variant_8hpp_source.html#l00052">variant.hpp:52</a></div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Fri Oct 31 2014 11:19:54 for VSQLite++ by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.8 </small></address> </body> </html>