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 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
|
<!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"/>
<title>Lutok: anonymous_namespace{state.cpp} Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="/usr/share/javascript/jquery/jquery.min.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">Lutok
 <span id="projectnumber">0.4</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<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 class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><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="namespaces.html"><span>Namespace List</span></a></li>
<li><a href="namespacemembers.html"><span>Namespace Members</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>Macros</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><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">anonymous_namespace{state.cpp} Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac895a6a4aab5ec5597bdfb62adf0f85c"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#ac895a6a4aab5ec5597bdfb62adf0f85c">protected_getglobal</a> (lua_State *state)</td></tr>
<tr class="memdesc:ac895a6a4aab5ec5597bdfb62adf0f85c"><td class="mdescLeft"> </td><td class="mdescRight">Wrapper around lua_getglobal to run in a protected environment. <a href="#ac895a6a4aab5ec5597bdfb62adf0f85c"></a><br/></td></tr>
<tr class="memitem:a901e28feef6c6a7c94edf906139464a4"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#a901e28feef6c6a7c94edf906139464a4">protected_gettable</a> (lua_State *state)</td></tr>
<tr class="memdesc:a901e28feef6c6a7c94edf906139464a4"><td class="mdescLeft"> </td><td class="mdescRight">Wrapper around lua_gettable to run in a protected environment. <a href="#a901e28feef6c6a7c94edf906139464a4"></a><br/></td></tr>
<tr class="memitem:a8163cc0f7d5dfba820e335e02769bd91"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#a8163cc0f7d5dfba820e335e02769bd91">protected_next</a> (lua_State *state)</td></tr>
<tr class="memdesc:a8163cc0f7d5dfba820e335e02769bd91"><td class="mdescLeft"> </td><td class="mdescRight">Wrapper around lua_next to run in a protected environment. <a href="#a8163cc0f7d5dfba820e335e02769bd91"></a><br/></td></tr>
<tr class="memitem:a931ec64a97c5b8ff24bd12b1318c4bf5"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#a931ec64a97c5b8ff24bd12b1318c4bf5">protected_setglobal</a> (lua_State *state)</td></tr>
<tr class="memdesc:a931ec64a97c5b8ff24bd12b1318c4bf5"><td class="mdescLeft"> </td><td class="mdescRight">Wrapper around lua_setglobal to run in a protected environment. <a href="#a931ec64a97c5b8ff24bd12b1318c4bf5"></a><br/></td></tr>
<tr class="memitem:a42654c15fd147850ad03cd891d1d7193"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#a42654c15fd147850ad03cd891d1d7193">protected_settable</a> (lua_State *state)</td></tr>
<tr class="memdesc:a42654c15fd147850ad03cd891d1d7193"><td class="mdescLeft"> </td><td class="mdescRight">Wrapper around lua_settable to run in a protected environment. <a href="#a42654c15fd147850ad03cd891d1d7193"></a><br/></td></tr>
<tr class="memitem:ac12be03daffcd5d46ac51da378577e51"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#ac12be03daffcd5d46ac51da378577e51">call_cxx_function_from_c</a> (lutok::cxx_function function, lua_State *raw_state) throw ()</td></tr>
<tr class="memdesc:ac12be03daffcd5d46ac51da378577e51"><td class="mdescLeft"> </td><td class="mdescRight">Calls a C++ Lua function from a C calling environment. <a href="#ac12be03daffcd5d46ac51da378577e51"></a><br/></td></tr>
<tr class="memitem:a86e6a7c405a8feea00907b99c4d084ca"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#a86e6a7c405a8feea00907b99c4d084ca">cxx_closure_trampoline</a> (lua_State *raw_state)</td></tr>
<tr class="memdesc:a86e6a7c405a8feea00907b99c4d084ca"><td class="mdescLeft"> </td><td class="mdescRight">Lua glue to call a C++ closure. <a href="#a86e6a7c405a8feea00907b99c4d084ca"></a><br/></td></tr>
<tr class="memitem:af3c459196ed8b373a8376b5abeedd472"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00033.html#af3c459196ed8b373a8376b5abeedd472">cxx_function_trampoline</a> (lua_State *raw_state)</td></tr>
<tr class="memdesc:af3c459196ed8b373a8376b5abeedd472"><td class="mdescLeft"> </td><td class="mdescRight">Lua glue to call a C++ function. <a href="#af3c459196ed8b373a8376b5abeedd472"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ac12be03daffcd5d46ac51da378577e51"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int anonymous_namespace{state.cpp}::call_cxx_function_from_c </td>
<td>(</td>
<td class="paramtype">lutok::cxx_function </td>
<td class="paramname"><em>function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">lua_State * </td>
<td class="paramname"><em>raw_state</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> throw ()</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calls a C++ Lua function from a C calling environment. </p>
<p>Any errors reported by the C++ function are caught and reported to the caller as Lua errors.</p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">function</td><td>The C++ function to call. </td></tr>
<tr><td class="paramname">raw_state</td><td>The raw Lua state.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of return values pushed onto the Lua stack by the function. </dd></dl>
</div>
</div>
<a class="anchor" id="a86e6a7c405a8feea00907b99c4d084ca"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int anonymous_namespace{state.cpp}::cxx_closure_trampoline </td>
<td>(</td>
<td class="paramtype">lua_State * </td>
<td class="paramname"><em>raw_state</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Lua glue to call a C++ closure. </p>
<p>This Lua binding is actually a closure that we have constructed from the state.push_cxx_closure() method. The closure contains the same upvalues provided by the user plus an extra upvalue that contains the address of the C++ function we have to call. All we do here is safely delegate the execution to the wrapped C++ closure.</p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">raw_state</td><td>The Lua C API state.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of return values of the called closure. </dd></dl>
</div>
</div>
<a class="anchor" id="af3c459196ed8b373a8376b5abeedd472"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int anonymous_namespace{state.cpp}::cxx_function_trampoline </td>
<td>(</td>
<td class="paramtype">lua_State * </td>
<td class="paramname"><em>raw_state</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Lua glue to call a C++ function. </p>
<p>This Lua binding is actually a closure that we have constructed from the state.push_cxx_function() method. The closure has a single upvalue that contains the address of the C++ function we have to call. All we do here is safely delegate the execution to the wrapped C++ function.</p>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">raw_state</td><td>The Lua C API state.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of return values of the called function. </dd></dl>
</div>
</div>
<a class="anchor" id="ac895a6a4aab5ec5597bdfb62adf0f85c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int anonymous_namespace{state.cpp}::protected_getglobal </td>
<td>(</td>
<td class="paramtype">lua_State * </td>
<td class="paramname"><em>state</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Wrapper around lua_getglobal to run in a protected environment. </p>
<dl class="section pre"><dt>Precondition:</dt><dd>stack(-1) is the name of the global to get. </dd></dl>
<dl class="section post"><dt>Postcondition:</dt><dd>stack(-1) is the value of the global.</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">state</td><td>The Lua C API state.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of return values pushed onto the stack. </dd></dl>
</div>
</div>
<a class="anchor" id="a901e28feef6c6a7c94edf906139464a4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int anonymous_namespace{state.cpp}::protected_gettable </td>
<td>(</td>
<td class="paramtype">lua_State * </td>
<td class="paramname"><em>state</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Wrapper around lua_gettable to run in a protected environment. </p>
<dl class="section pre"><dt>Precondition:</dt><dd>stack(-2) is the table to get the element from. </dd>
<dd>
stack(-1) is the table index. </dd></dl>
<dl class="section post"><dt>Postcondition:</dt><dd>stack(-1) is the value of stack(-2)[stack(-1)].</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">state</td><td>The Lua C API state.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of return values pushed onto the stack. </dd></dl>
</div>
</div>
<a class="anchor" id="a8163cc0f7d5dfba820e335e02769bd91"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int anonymous_namespace{state.cpp}::protected_next </td>
<td>(</td>
<td class="paramtype">lua_State * </td>
<td class="paramname"><em>state</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Wrapper around lua_next to run in a protected environment. </p>
<dl class="section pre"><dt>Precondition:</dt><dd>stack(-2) is the table to get the next element from. </dd>
<dd>
stack(-1) is the last processed key. </dd></dl>
<dl class="section post"><dt>Postcondition:</dt><dd>stack(-1) is the value of next(stack(-2), stack(-1)).</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">state</td><td>The Lua C API state.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of return values pushed onto the stack. </dd></dl>
</div>
</div>
<a class="anchor" id="a931ec64a97c5b8ff24bd12b1318c4bf5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int anonymous_namespace{state.cpp}::protected_setglobal </td>
<td>(</td>
<td class="paramtype">lua_State * </td>
<td class="paramname"><em>state</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Wrapper around lua_setglobal to run in a protected environment. </p>
<dl class="section pre"><dt>Precondition:</dt><dd>stack(-2) is the name of the global to set. </dd>
<dd>
stack(-1) is the value to set the global to.</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">state</td><td>The Lua C API state.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of return values pushed onto the stack. </dd></dl>
</div>
</div>
<a class="anchor" id="a42654c15fd147850ad03cd891d1d7193"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static int anonymous_namespace{state.cpp}::protected_settable </td>
<td>(</td>
<td class="paramtype">lua_State * </td>
<td class="paramname"><em>state</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Wrapper around lua_settable to run in a protected environment. </p>
<dl class="section pre"><dt>Precondition:</dt><dd>stack(-3) is the table to set the element into. </dd>
<dd>
stack(-2) is the table index. </dd>
<dd>
stack(-1) is the value to set.</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
<table class="params">
<tr><td class="paramname">state</td><td>The Lua C API state.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of return values pushed onto the stack. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Dec 7 2013 19:02:36 for Lutok by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
|