|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54582 - in sandbox/monotonic/libs/monotonic/doc: . html html/monotonic_storage html/monotonic_storage/tutorial
From: christian.schladetsch_at_[hidden]
Date: 2009-07-02 01:34:43
Author: cschladetsch
Date: 2009-07-02 01:34:42 EDT (Thu, 02 Jul 2009)
New Revision: 54582
URL: http://svn.boost.org/trac/boost/changeset/54582
Log:
updated
Text files modified:
sandbox/monotonic/libs/monotonic/doc/Jamfile.v2 | 6 ++++--
sandbox/monotonic/libs/monotonic/doc/html/index.html | 4 ++--
sandbox/monotonic/libs/monotonic/doc/html/monotonic_storage/change_log.html | 4 ++--
sandbox/monotonic/libs/monotonic/doc/html/monotonic_storage/tutorial/using_monotonic_storage.html | 40 +++++++++++++++++++---------------------
sandbox/monotonic/libs/monotonic/doc/monotonic.qbk | 2 ++
5 files changed, 29 insertions(+), 27 deletions(-)
Modified: sandbox/monotonic/libs/monotonic/doc/Jamfile.v2
==============================================================================
--- sandbox/monotonic/libs/monotonic/doc/Jamfile.v2 (original)
+++ sandbox/monotonic/libs/monotonic/doc/Jamfile.v2 2009-07-02 01:34:42 EDT (Thu, 02 Jul 2009)
@@ -5,7 +5,8 @@
xml monotonic : monotonic.qbk ;
-path-constant images : ../../../doc/html ;
+#path-constant images : ../../../doc/html ;
+path-constant images : . ;
boostbook standalone
:
@@ -13,7 +14,8 @@
:
<xsl:param>boost.root=../../../..
<xsl:param>boost.libraries=../../../../libs/libraries.htm
- <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
+ #<xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
+ <xsl:param>html.stylesheet=boostbook.css
<xsl:param>generate.section.toc.level=3
<xsl:param>chunk.section.depth=2
<xsl:param>chunk.first.sections=1
Modified: sandbox/monotonic/libs/monotonic/doc/html/index.html
==============================================================================
--- sandbox/monotonic/libs/monotonic/doc/html/index.html (original)
+++ sandbox/monotonic/libs/monotonic/doc/html/index.html 2009-07-02 01:34:42 EDT (Thu, 02 Jul 2009)
@@ -28,7 +28,7 @@
</h3></div></div></div>
<div><p class="copyright">Copyright © 2009 Christian Schladetsch</p></div>
<div><div class="legalnotice" title="Legal Notice">
-<a name="id688412"></a><p>
+<a name="id674212"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
@@ -54,7 +54,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: July 02, 2009 at 05:27:06 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 02, 2009 at 05:34:02 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/monotonic/libs/monotonic/doc/html/monotonic_storage/change_log.html
==============================================================================
--- sandbox/monotonic/libs/monotonic/doc/html/monotonic_storage/change_log.html (original)
+++ sandbox/monotonic/libs/monotonic/doc/html/monotonic_storage/change_log.html 2009-07-02 01:34:42 EDT (Thu, 02 Jul 2009)
@@ -27,14 +27,14 @@
<a name="monotonic_storage.change_log"></a><a class="link" href="change_log.html" title="Change Log"> Change Log</a>
</h2></div></div></div>
<a name="monotonic_storage.change_log.version_0_4"></a><h4>
-<a name="id688517"></a>
+<a name="id674318"></a>
<a class="link" href="change_log.html#monotonic_storage.change_log.version_0_4">Version 0.4</a>
</h4>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Added reclaimable storage
</li></ul></div>
<a name="monotonic_storage.change_log.version_0_3"></a><h4>
-<a name="id688538"></a>
+<a name="id674338"></a>
<a class="link" href="change_log.html#monotonic_storage.change_log.version_0_3">Version 0.3</a>
</h4>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Modified: sandbox/monotonic/libs/monotonic/doc/html/monotonic_storage/tutorial/using_monotonic_storage.html
==============================================================================
--- sandbox/monotonic/libs/monotonic/doc/html/monotonic_storage/tutorial/using_monotonic_storage.html (original)
+++ sandbox/monotonic/libs/monotonic/doc/html/monotonic_storage/tutorial/using_monotonic_storage.html 2009-07-02 01:34:42 EDT (Thu, 02 Jul 2009)
@@ -31,30 +31,28 @@
directly and wherever we want efficient resource management.
</p>
<p>
- <code class="computeroutput"></code> int main() { <span class="emphasis"><em>/ define local storage of 4k on the
- stack. /</em></span> allocations will use the heap after the inline stack-based
- storage // has been exhausted. monotonic::storage<4*1024> storage;
- { int &amp;num = storage.create<int>(); std::string &amp;str
- = storage.create<std::string>(); char *bytes = storage.allocate_bytes(3000);
- </p>
-<pre class="programlisting"><span class="comment">// use num, str, bytes as needed
+
+</p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// define local storage of 4k on the stack.
+</span> <span class="comment">// allocations will use the heap after the inline stack-based storage
+</span> <span class="comment">// has been exhausted.
+</span> <span class="identifier">monotonic</span><span class="special">::</span><span class="identifier">storage</span><span class="special"><</span><span class="number">4</span><span class="special">*</span><span class="number">1024</span><span class="special">></span> <span class="identifier">storage</span><span class="special">;</span>
+ <span class="special">{</span>
+ <span class="keyword">int</span> <span class="special">&</span><span class="identifier">amp</span><span class="special">;</span><span class="identifier">num</span> <span class="special">=</span> <span class="identifier">storage</span><span class="special">.</span><span class="identifier">create</span><span class="special"><</span><span class="keyword">int</span><span class="special">>();</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span><span class="identifier">amp</span><span class="special">;</span><span class="identifier">str</span> <span class="special">=</span> <span class="identifier">storage</span><span class="special">.</span><span class="identifier">create</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>();</span>
+ <span class="keyword">char</span> <span class="special">*</span><span class="identifier">bytes</span> <span class="special">=</span> <span class="identifier">storage</span><span class="special">.</span><span class="identifier">allocate_bytes</span><span class="special">(</span><span class="number">3000</span><span class="special">);</span>
+
+ <span class="comment">// use num, str, bytes as needed
</span>
-<span class="comment">// call std::string's destructor directly, or use storage.destroy
-</span><span class="identifier">storage</span><span class="special">.</span><span class="identifier">destroy</span><span class="special">(</span><span class="identifier">str</span><span class="special">);</span>
- <span class="special">}</span>
- <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
-</pre>
-<p>
- // use num, str, bytes as needed
- </p>
-<pre class="programlisting"><span class="comment">// call std::string's destructor directly, or use storage.destroy
-</span><span class="identifier">storage</span><span class="special">.</span><span class="identifier">destroy</span><span class="special">(</span><span class="identifier">str</span><span class="special">);</span>
- <span class="special">}</span>
- <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+ <span class="comment">// call std::string's destructor directly, or use storage.destroy
+</span> <span class="identifier">storage</span><span class="special">.</span><span class="identifier">destroy</span><span class="special">(</span><span class="identifier">str</span><span class="special">);</span>
+ <span class="special">}</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
</pre>
<p>
- // call std::string's destructor directly, or use storage.destroy storage.destroy(str);
- } return 0; }
</p>
<p>
Of course, we could have just made <code class="computeroutput"><span class="identifier">num</span></code>,
Modified: sandbox/monotonic/libs/monotonic/doc/monotonic.qbk
==============================================================================
--- sandbox/monotonic/libs/monotonic/doc/monotonic.qbk (original)
+++ sandbox/monotonic/libs/monotonic/doc/monotonic.qbk 2009-07-02 01:34:42 EDT (Thu, 02 Jul 2009)
@@ -90,6 +90,7 @@
In general, the programmer is required to release storage used at an appropriate time,
however local scoping systems are provided by the library for the most common use cases.
+
Features include:
* fast allocation from the stack
@@ -289,6 +290,7 @@
}
return 0;
}
+``
Of course, we could have just made `num`, `str` and `bytes` on the stack by declaring them as
local variables and be done with it - well, except for having a dynamically-sized array of bytes
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk