UNPKG

documon

Version:

A documentation system for mortals. Use with any language.

90 lines (66 loc) 3.63 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Inheritance</title> <meta name="description" content="more.comment_authoring_guide.inheritance"> <!-- Normalize --> <link rel="stylesheet" href="assets/vendor/normalize.css"> <!-- prettify --> <link rel="stylesheet" href="assets/vendor/prettify/codamike.css"> <script src="assets/vendor/prettify/prettify.js"></script> <!-- Documon Pages Info. (Used by various classes to identify this page.) --> <script> var pageCtx = { id : "more.comment_authoring_guide.inheritance", name: "Inheritance" } </script> <!-- theme <link rel="stylesheet" href="assets/fonts/Fira_Sans/FiraSans.css"> <link rel="stylesheet" href="assets/fonts/Inconsolata/inconsolata.css"> --> <link rel="stylesheet" href="assets/css/pages.css"> <script src="assets/js/documon/Storage.js"></script> <script src="assets/js/documon/Access.js"></script> <script src="assets/js/documon/Pages.js"></script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-106684927-1', 'auto'); ga('send', 'pageview'); </script> </head> <body> <div class="page"> <div class="more"><h1 id="inheritance">Inheritance</h1> <p>The following tags are used to organize the relationship tree:</p> <ul> <li><a href="https://github.com/extends">@extends</a></li> <li><a href="https://github.com/impliments">@impliments</a></li> <li><a href="https://github.com/inherits">@inherits</a></li> <li><a href="https://github.com/overrides">@overrides</a></li> </ul> <p>The <a href="https://github.com/extends">@extends</a> tag is the primary tag used to establish inheritence. Documon constructs a relationship tree whenever an <a href="https://github.com/extends">@extends</a> tag is discovered and automatically processes parent/child relationships.</p> <p>When defining <a href="https://github.com/extends">@extends</a>, you can use a short-hand for classes in the same package.</p> <p>For example, lets say we have 2 classes as:</p> <pre><code> /some/long/winded/package/Foo.js some/long/winded/package/Bar.js</code></pre> <p>… and "Bar" extends "Foo"… Rather than writing:</p> <pre><code> @class Bar @package long.winded.package @extends long.winded.package.Foo</code></pre> <p>… we can write:</p> <pre><code> @class Bar @package long.winded.package @extends Foo</code></pre> <p>… because Foo and Bar are in the same package. We only need to use the long-form when referencing things outside of the same package.</p> <h3 id="about-the-inherits-tag">About the <a href="https://github.com/inherits">@inherits</a> tag</h3> <p>Using the <a href="https://github.com/inherits">@inherits</a> tag is a little redundant, since Documon automatically figures this out based on the <a href="https://github.com/extends">@extends</a> tag. But you're free to incorporate the <a href="https://github.com/inherits">@inherits</a> tag and Documon <strong>should</strong> honor it (e.g. construct the proper parent/chold menu relationship).</p></div> </div> <div class="footer">Generated by <a href="http://www.documon.net" target="_blank">Documon</a></div> </body> </html>