pypdevsbbl.extra.packaging.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>pypdevsbbl.extra.packaging module &#8212; Python(P)DEVS-BBL documentation</title>
  8. <link rel="stylesheet" href="_static/nature.css" type="text/css" />
  9. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  10. <link rel="stylesheet" type="text/css" href="_static/custom.css" />
  11. <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  12. <script type="text/javascript" src="_static/jquery.js"></script>
  13. <script type="text/javascript" src="_static/underscore.js"></script>
  14. <script type="text/javascript" src="_static/doctools.js"></script>
  15. <script type="text/javascript" src="_static/language_data.js"></script>
  16. <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  17. <link rel="index" title="Index" href="genindex.html" />
  18. <link rel="search" title="Search" href="search.html" />
  19. <link rel="next" title="pypdevsbbl.extra.queues module" href="pypdevsbbl.extra.queues.html" />
  20. <link rel="prev" title="pypdevsbbl.extra.mathutils module" href="pypdevsbbl.extra.mathutils.html" />
  21. </head><body>
  22. <div class="related" role="navigation" aria-label="related navigation">
  23. <h3>Navigation</h3>
  24. <ul>
  25. <li class="right" style="margin-right: 10px">
  26. <a href="genindex.html" title="General Index"
  27. accesskey="I">index</a></li>
  28. <li class="right" >
  29. <a href="py-modindex.html" title="Python Module Index"
  30. >modules</a> |</li>
  31. <li class="right" >
  32. <a href="pypdevsbbl.extra.queues.html" title="pypdevsbbl.extra.queues module"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="pypdevsbbl.extra.mathutils.html" title="pypdevsbbl.extra.mathutils module"
  36. accesskey="P">previous</a> |</li>
  37. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  38. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  39. <li class="nav-item nav-item-2"><a href="pypdevsbbl.extra.html" accesskey="U">pypdevsbbl.extra package</a> &#187;</li>
  40. </ul>
  41. </div>
  42. <div class="document">
  43. <div class="documentwrapper">
  44. <div class="bodywrapper">
  45. <div class="body" role="main">
  46. <div class="section" id="module-pypdevsbbl.extra.packaging">
  47. <span id="pypdevsbbl-extra-packaging-module"></span><h1>pypdevsbbl.extra.packaging module<a class="headerlink" href="#module-pypdevsbbl.extra.packaging" title="Permalink to this headline">¶</a></h1>
  48. <p>Helper file for <a class="reference internal" href="pypdevsbbl.generic.transformers.html#pypdevsbbl.generic.transformers.Pack" title="pypdevsbbl.generic.transformers.Pack"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.transformers.Pack</span></code></a> and <a class="reference internal" href="pypdevsbbl.generic.transformers.html#pypdevsbbl.generic.transformers.Unpack" title="pypdevsbbl.generic.transformers.Unpack"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.transformers.Unpack</span></code></a> blocks.</p>
  49. <p>The classes in this file represent generic containers in which items can be “packed” together.</p>
  50. <dl class="class">
  51. <dt id="pypdevsbbl.extra.packaging.Package">
  52. <em class="property">class </em><code class="descclassname">pypdevsbbl.extra.packaging.</code><code class="descname">Package</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/packaging.html#Package"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.packaging.Package" title="Permalink to this definition">¶</a></dt>
  53. <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
  54. <p>Generic container that holds items.</p>
  55. <p>All custom containers must inherit from this class,
  56. or implement the same methods.</p>
  57. <table class="docutils field-list" frame="void" rules="none">
  58. <col class="field-name" />
  59. <col class="field-body" />
  60. <tbody valign="top">
  61. <tr class="field-odd field"><th class="field-name">Variables:</th><td class="field-body"><strong>contents</strong> (<em>list</em>) – A container for all packed items.</td>
  62. </tr>
  63. </tbody>
  64. </table>
  65. <dl class="method">
  66. <dt id="pypdevsbbl.extra.packaging.Package.pack">
  67. <code class="descname">pack</code><span class="sig-paren">(</span><em>new</em>, <em>elapsed=0.0</em>, <em>time=0.0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/packaging.html#Package.pack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.packaging.Package.pack" title="Permalink to this definition">¶</a></dt>
  68. <dd><p>Packs a new item in this package.</p>
  69. <table class="docutils field-list" frame="void" rules="none">
  70. <col class="field-name" />
  71. <col class="field-body" />
  72. <tbody valign="top">
  73. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  74. <li><strong>new</strong> (<em>any</em>) – The new object to join to the package.</li>
  75. <li><strong>elapsed</strong> (<em>numeric</em>) – The elpased time since the last package.
  76. Defaults to 0.</li>
  77. <li><strong>time</strong> (<em>numeric</em>) – The total simulation time. Defaults to 0.</li>
  78. </ul>
  79. </td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </dd></dl>
  84. <dl class="method">
  85. <dt id="pypdevsbbl.extra.packaging.Package.unpack">
  86. <code class="descname">unpack</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/packaging.html#Package.unpack"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.packaging.Package.unpack" title="Permalink to this definition">¶</a></dt>
  87. <dd><p>Releases the contents of this package.</p>
  88. <p>After this method is executed, the Package must be in its original state.</p>
  89. </dd></dl>
  90. <dl class="method">
  91. <dt id="pypdevsbbl.extra.packaging.Package.finished">
  92. <code class="descname">finished</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/packaging.html#Package.finished"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.packaging.Package.finished" title="Permalink to this definition">¶</a></dt>
  93. <dd><p>Indicates if the package is finished or not.</p>
  94. <p>Whenever this evaluates to <code class="docutils literal notranslate"><span class="pre">True</span></code> after a <a class="reference internal" href="#pypdevsbbl.extra.packaging.Package.pack" title="pypdevsbbl.extra.packaging.Package.pack"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pack()</span></code></a>-call, the package
  95. should be released automatically.</p>
  96. </dd></dl>
  97. </dd></dl>
  98. <dl class="class">
  99. <dt id="pypdevsbbl.extra.packaging.SizedPackage">
  100. <em class="property">class </em><code class="descclassname">pypdevsbbl.extra.packaging.</code><code class="descname">SizedPackage</code><span class="sig-paren">(</span><em>size</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/packaging.html#SizedPackage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.packaging.SizedPackage" title="Permalink to this definition">¶</a></dt>
  101. <dd><p>Bases: <a class="reference internal" href="#pypdevsbbl.extra.packaging.Package" title="pypdevsbbl.extra.packaging.Package"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.extra.packaging.Package</span></code></a></p>
  102. <p>A <a class="reference internal" href="#pypdevsbbl.extra.packaging.Package" title="pypdevsbbl.extra.packaging.Package"><code class="xref py py-class docutils literal notranslate"><span class="pre">Package</span></code></a> that has a maximal size.</p>
  103. <dl class="method">
  104. <dt id="pypdevsbbl.extra.packaging.SizedPackage.finished">
  105. <code class="descname">finished</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/packaging.html#SizedPackage.finished"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.packaging.SizedPackage.finished" title="Permalink to this definition">¶</a></dt>
  106. <dd></dd></dl>
  107. </dd></dl>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  113. <div class="sphinxsidebarwrapper">
  114. <h4>Previous topic</h4>
  115. <p class="topless"><a href="pypdevsbbl.extra.mathutils.html"
  116. title="previous chapter">pypdevsbbl.extra.mathutils module</a></p>
  117. <h4>Next topic</h4>
  118. <p class="topless"><a href="pypdevsbbl.extra.queues.html"
  119. title="next chapter">pypdevsbbl.extra.queues module</a></p>
  120. <div id="searchbox" style="display: none" role="search">
  121. <h3>Quick search</h3>
  122. <div class="searchformwrapper">
  123. <form class="search" action="search.html" method="get">
  124. <input type="text" name="q" />
  125. <input type="submit" value="Go" />
  126. <input type="hidden" name="check_keywords" value="yes" />
  127. <input type="hidden" name="area" value="default" />
  128. </form>
  129. </div>
  130. </div>
  131. <script type="text/javascript">$('#searchbox').show(0);</script>
  132. </div>
  133. </div>
  134. <div class="clearer"></div>
  135. </div>
  136. <div class="related" role="navigation" aria-label="related navigation">
  137. <h3>Navigation</h3>
  138. <ul>
  139. <li class="right" style="margin-right: 10px">
  140. <a href="genindex.html" title="General Index"
  141. >index</a></li>
  142. <li class="right" >
  143. <a href="py-modindex.html" title="Python Module Index"
  144. >modules</a> |</li>
  145. <li class="right" >
  146. <a href="pypdevsbbl.extra.queues.html" title="pypdevsbbl.extra.queues module"
  147. >next</a> |</li>
  148. <li class="right" >
  149. <a href="pypdevsbbl.extra.mathutils.html" title="pypdevsbbl.extra.mathutils module"
  150. >previous</a> |</li>
  151. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  152. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  153. <li class="nav-item nav-item-2"><a href="pypdevsbbl.extra.html" >pypdevsbbl.extra package</a> &#187;</li>
  154. </ul>
  155. </div>
  156. <div class="footer" role="contentinfo">
  157. &#169; Copyright 2020, Randy Paredis.
  158. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
  159. </div>
  160. </body>
  161. </html>