Quellcode durchsuchen

docs: Clarify statements

Ole vor 9 Jahren
Ursprung
Commit
60e2b7efd0

+ 3 - 3
docs/mkdocs/advanced.md

@@ -3,7 +3,7 @@ Instead of extracting every Lua value seperately and pushing the result of your
 onto the stack again, you can use one of the following functions to make this process easier for you.
 
 ## Invoke a Callable with Lua values
-The function [direct](/reference/namespaceluwra.html#aa20e363f38b3ae5a168cf40365f5646a)
+The function [direct<S>](/reference/namespaceluwra.html#aa20e363f38b3ae5a168cf40365f5646a)
 lets you specify a *stack signature* in order to extract the values and invoke a `Callable` with
 them.
 
@@ -19,7 +19,7 @@ It could be rewritting like this:
 string result = luwra::direct<string(string, int)>(lua, n, foo);
 ```
 
-**Note:** The result of `foo` is not pushed onto the stack. Besides the extraction of Lua values
+**Note:** The result of `foo` is not pushed onto the stack. Except for the extraction of Lua values,
 everything happens on the C++ side.
 
 ## Invoke a function with Lua values
@@ -35,7 +35,7 @@ Provided a function `foo` which has been declared as used in the example above:
 string foo(string bar, int baz);
 
 // ... or with a function object
-std::function<string(string, int)> foo = /* magic */;
+function<string(string, int)> foo = /* magic */;
 ```
 
 One would use `foo` like this:

+ 0 - 0
docs/mkdocs/miscellaneous.md


+ 5 - 0
docs/mkdocs/wrapping.md

@@ -0,0 +1,5 @@
+# Function wrapping
+Luwra provides an easy way to turn any C or C++ function into a
+[lua_CFunction](http://www.lua.org/manual/5.3/manual.html#lua_CFunction) which can be used by the
+Lua VM. Note, all parameter types must be readable from the stack (`Value<T>::read` exists for all)
+and the return type must be pushable (`Value<T>::push` exists).

+ 9 - 20
docs/output/advanced/index.html

@@ -8,7 +8,7 @@
   
   
   
-  <title>Advanced - Luwra</title>
+  <title>Advanced Stack Interaction - Luwra</title>
   
 
   <link rel="shortcut icon" href="../img/favicon.ico">
@@ -23,7 +23,7 @@
   
   <script>
     // Current page data
-    var mkdocs_page_name = "Advanced";
+    var mkdocs_page_name = "Advanced Stack Interaction";
     var mkdocs_page_input_path = "advanced.md";
     var mkdocs_page_url = "/advanced/";
   </script>
@@ -63,14 +63,14 @@
           
             <li>
     <li class="toctree-l1 ">
-        <a class="" href="../basics/">Basics</a>
+        <a class="" href="../basics/">Basic Stack Interaction</a>
         
     </li>
 <li>
           
             <li>
     <li class="toctree-l1 current">
-        <a class="current" href="./">Advanced</a>
+        <a class="current" href="./">Advanced Stack Interaction</a>
         
             <ul>
             
@@ -83,13 +83,6 @@
             
             </ul>
         
-    </li>
-<li>
-          
-            <li>
-    <li class="toctree-l1 ">
-        <a class="" href="../miscellaneous/">Miscellaneous</a>
-        
     </li>
 <li>
           
@@ -115,7 +108,7 @@
     
       
     
-    <li>Advanced</li>
+    <li>Advanced Stack Interaction</li>
     <li class="wy-breadcrumbs-aside">
       
         
@@ -133,7 +126,7 @@
 <p>Instead of extracting every Lua value seperately and pushing the result of your C++ function back
 onto the stack again, you can use one of the following functions to make this process easier for you.</p>
 <h2 id="invoke-a-callable-with-lua-values">Invoke a Callable with Lua values</h2>
-<p>The function <a href="../reference/namespaceluwra.html#aa20e363f38b3ae5a168cf40365f5646a">direct</a>
+<p>The function <a href="../reference/namespaceluwra.html#aa20e363f38b3ae5a168cf40365f5646a">direct&lt;S&gt;</a>
 lets you specify a <em>stack signature</em> in order to extract the values and invoke a <code>Callable</code> with
 them.</p>
 <p>Consider the following:</p>
@@ -144,7 +137,7 @@ them.</p>
 <pre><code class="c++">string result = luwra::direct&lt;string(string, int)&gt;(lua, n, foo);
 </code></pre>
 
-<p><strong>Note:</strong> The result of <code>foo</code> is not pushed onto the stack. Besides the extraction of Lua values
+<p><strong>Note:</strong> The result of <code>foo</code> is not pushed onto the stack. Except for the extraction of Lua values,
 everything happens on the C++ side.</p>
 <h2 id="invoke-a-function-with-lua-values">Invoke a function with Lua values</h2>
 <p><a href="../reference/namespaceluwra.html#a839077ddd9c3d0565a40c574bc8e9555">apply</a> is similiar to
@@ -156,7 +149,7 @@ allows the compiler to infer the <em>stack signature</em> without providing a te
 <pre><code class="c++">string foo(string bar, int baz);
 
 // ... or with a function object
-std::function&lt;string(string, int)&gt; foo = /* magic */;
+function&lt;string(string, int)&gt; foo = /* magic */;
 </code></pre>
 
 <p>One would use <code>foo</code> like this:</p>
@@ -169,10 +162,8 @@ std::function&lt;string(string, int)&gt; foo = /* magic */;
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="../miscellaneous/" class="btn btn-neutral float-right" title="Miscellaneous">Next <span class="icon icon-circle-arrow-right"></span></a>
       
-      
-        <a href="../basics/" class="btn btn-neutral" title="Basics"><span class="icon icon-circle-arrow-left"></span> Previous</a>
+        <a href="../basics/" class="btn btn-neutral" title="Basic Stack Interaction"><span class="icon icon-circle-arrow-left"></span> Previous</a>
       
     </div>
   
@@ -203,8 +194,6 @@ std::function&lt;string(string, int)&gt; foo = /* magic */;
         <span><a href="../basics/" style="color: #fcfcfc;">&laquo; Previous</a></span>
       
       
-        <span style="margin-left: 15px"><a href="../miscellaneous/" style="color: #fcfcfc">Next &raquo;</a></span>
-      
     </span>
 </div>
 

+ 6 - 13
docs/output/basics/index.html

@@ -8,7 +8,7 @@
   
   
   
-  <title>Basics - Luwra</title>
+  <title>Basic Stack Interaction - Luwra</title>
   
 
   <link rel="shortcut icon" href="../img/favicon.ico">
@@ -23,7 +23,7 @@
   
   <script>
     // Current page data
-    var mkdocs_page_name = "Basics";
+    var mkdocs_page_name = "Basic Stack Interaction";
     var mkdocs_page_input_path = "basics.md";
     var mkdocs_page_url = "/basics/";
   </script>
@@ -63,7 +63,7 @@
           
             <li>
     <li class="toctree-l1 current">
-        <a class="current" href="./">Basics</a>
+        <a class="current" href="./">Basic Stack Interaction</a>
         
             <ul>
             
@@ -86,14 +86,7 @@
           
             <li>
     <li class="toctree-l1 ">
-        <a class="" href="../advanced/">Advanced</a>
-        
-    </li>
-<li>
-          
-            <li>
-    <li class="toctree-l1 ">
-        <a class="" href="../miscellaneous/">Miscellaneous</a>
+        <a class="" href="../advanced/">Advanced Stack Interaction</a>
         
     </li>
 <li>
@@ -120,7 +113,7 @@
     
       
     
-    <li>Basics</li>
+    <li>Basic Stack Interaction</li>
     <li class="wy-breadcrumbs-aside">
       
         
@@ -361,7 +354,7 @@ is delegated to the Lua VM. Have a look at the
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="../advanced/" class="btn btn-neutral float-right" title="Advanced">Next <span class="icon icon-circle-arrow-right"></span></a>
+        <a href="../advanced/" class="btn btn-neutral float-right" title="Advanced Stack Interaction">Next <span class="icon icon-circle-arrow-right"></span></a>
       
       
         <a href=".." class="btn btn-neutral" title="Home"><span class="icon icon-circle-arrow-left"></span> Previous</a>

+ 4 - 11
docs/output/index.html

@@ -73,21 +73,14 @@
           
             <li>
     <li class="toctree-l1 ">
-        <a class="" href="basics/">Basics</a>
+        <a class="" href="basics/">Basic Stack Interaction</a>
         
     </li>
 <li>
           
             <li>
     <li class="toctree-l1 ">
-        <a class="" href="advanced/">Advanced</a>
-        
-    </li>
-<li>
-          
-            <li>
-    <li class="toctree-l1 ">
-        <a class="" href="miscellaneous/">Miscellaneous</a>
+        <a class="" href="advanced/">Advanced Stack Interaction</a>
         
     </li>
 <li>
@@ -146,7 +139,7 @@ your preference.</p>
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="basics/" class="btn btn-neutral float-right" title="Basics">Next <span class="icon icon-circle-arrow-right"></span></a>
+        <a href="basics/" class="btn btn-neutral float-right" title="Basic Stack Interaction">Next <span class="icon icon-circle-arrow-right"></span></a>
       
       
     </div>
@@ -186,5 +179,5 @@ your preference.</p>
 
 <!--
 MkDocs version : 0.15.3
-Build Date UTC : 2016-04-19 13:29:48.887147
+Build Date UTC : 2016-04-19 13:53:25.969814
 -->

+ 0 - 169
docs/output/miscellaneous/index.html

@@ -1,169 +0,0 @@
-<!DOCTYPE html>
-<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  
-  
-  
-  <title>Miscellaneous - Luwra</title>
-  
-
-  <link rel="shortcut icon" href="../img/favicon.ico">
-
-  
-  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
-
-  <link rel="stylesheet" href="../css/theme.css" type="text/css" />
-  <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
-  <link rel="stylesheet" href="../css/highlight.css">
-
-  
-  <script>
-    // Current page data
-    var mkdocs_page_name = "Miscellaneous";
-    var mkdocs_page_input_path = "miscellaneous.md";
-    var mkdocs_page_url = "/miscellaneous/";
-  </script>
-  
-  <script src="../js/jquery-2.1.1.min.js"></script>
-  <script src="../js/modernizr-2.8.3.min.js"></script>
-  <script type="text/javascript" src="../js/highlight.pack.js"></script>
-  <script src="../js/theme.js"></script> 
-
-  
-</head>
-
-<body class="wy-body-for-nav" role="document">
-
-  <div class="wy-grid-for-nav">
-
-    
-    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
-      <div class="wy-side-nav-search">
-        <a href=".." class="icon icon-home"> Luwra</a>
-        <div role="search">
-  <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
-    <input type="text" name="q" placeholder="Search docs" />
-  </form>
-</div>
-      </div>
-
-      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-        <ul class="current">
-          
-            <li>
-    <li class="toctree-l1 ">
-        <a class="" href="..">Home</a>
-        
-    </li>
-<li>
-          
-            <li>
-    <li class="toctree-l1 ">
-        <a class="" href="../basics/">Basics</a>
-        
-    </li>
-<li>
-          
-            <li>
-    <li class="toctree-l1 ">
-        <a class="" href="../advanced/">Advanced</a>
-        
-    </li>
-<li>
-          
-            <li>
-    <li class="toctree-l1 current">
-        <a class="current" href="./">Miscellaneous</a>
-        
-            <ul>
-            
-            </ul>
-        
-    </li>
-<li>
-          
-        </ul>
-      </div>
-      &nbsp;
-    </nav>
-
-    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
-      
-      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
-        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
-        <a href="..">Luwra</a>
-      </nav>
-
-      
-      <div class="wy-nav-content">
-        <div class="rst-content">
-          <div role="navigation" aria-label="breadcrumbs navigation">
-  <ul class="wy-breadcrumbs">
-    <li><a href="..">Docs</a> &raquo;</li>
-    
-      
-    
-    <li>Miscellaneous</li>
-    <li class="wy-breadcrumbs-aside">
-      
-        
-          <a href="https://github.com/vapourismo/luwra" class="icon icon-github"> Edit on GitHub</a>
-        
-      
-    </li>
-  </ul>
-  <hr/>
-</div>
-          <div role="main">
-            <div class="section">
-              
-                
-              
-            </div>
-          </div>
-          <footer>
-  
-    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-      
-      
-        <a href="../advanced/" class="btn btn-neutral" title="Advanced"><span class="icon icon-circle-arrow-left"></span> Previous</a>
-      
-    </div>
-  
-
-  <hr/>
-
-  <div role="contentinfo">
-    <!-- Copyright etc -->
-    
-  </div>
-
-  Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
-</footer>
-	  
-        </div>
-      </div>
-
-    </section>
-
-  </div>
-
-<div class="rst-versions" role="note" style="cursor: pointer">
-    <span class="rst-current-version" data-toggle="rst-current-version">
-      
-          <a href="https://github.com/vapourismo/luwra" class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
-      
-      
-        <span><a href="../advanced/" style="color: #fcfcfc;">&laquo; Previous</a></span>
-      
-      
-    </span>
-</div>
-
-</body>
-</html>

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
docs/output/mkdocs/search_index.json


+ 2 - 9
docs/output/search.html

@@ -59,21 +59,14 @@
           
             <li>
     <li class="toctree-l1 ">
-        <a class="" href="basics/">Basics</a>
+        <a class="" href="basics/">Basic Stack Interaction</a>
         
     </li>
 <li>
           
             <li>
     <li class="toctree-l1 ">
-        <a class="" href="advanced/">Advanced</a>
-        
-    </li>
-<li>
-          
-            <li>
-    <li class="toctree-l1 ">
-        <a class="" href="miscellaneous/">Miscellaneous</a>
+        <a class="" href="advanced/">Advanced Stack Interaction</a>
         
     </li>
 <li>

+ 0 - 8
docs/output/sitemap.xml

@@ -25,12 +25,4 @@
     </url>
     
 
-    
-    <url>
-     <loc>None/miscellaneous/</loc>
-     <lastmod>2016-04-19</lastmod>
-     <changefreq>daily</changefreq>
-    </url>
-    
-
 </urlset>

+ 2 - 3
mkdocs.yml

@@ -3,9 +3,8 @@ site_description: Minimal-overhead Lua wrapper for C++
 repo_url: https://github.com/vapourismo/luwra
 pages:
   - 'Home': index.md
-  - 'Basics': basics.md
-  - 'Advanced': advanced.md
-  - 'Miscellaneous': miscellaneous.md
+  - 'Basic Stack Interaction': basics.md
+  - 'Advanced Stack Interaction': advanced.md
 theme: readthedocs
 docs_dir: docs/mkdocs
 site_dir: docs/output

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.