UNPKG

character-sheet

Version:

CharacterSheet library for assembling relationships between stats and modifiers.

847 lines (213 loc) 9.41 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: Operation</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: Operation</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>Operation<span class="signature">(operationDefinition)</span><span class="type-signature"></span></h2> <div class="class-description">Operation Base Class Represents a dynamic modification to a character sheet property.</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Operation"><span class="type-signature"></span>new Operation<span class="signature">(operationDefinition)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>operationDefinition</code></td> <td class="type"> <span class="param-type"><a href="global.html#OperationDefinition">OperationDefinition</a></span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Operation.js.html">Operation.js</a>, <a href="Operation.js.html#line13">line 13</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="_registeredOperations"><span class="type-signature"></span>_registeredOperations<span class="type-signature"></span></h4> <div class="description"> Key-value store of modules and their types </div> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>_registeredOperations</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Operation.js.html">Operation.js</a>, <a href="Operation.js.html#line19">line 19</a> </li></ul></dd> </dl> <h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"></span></h4> <div class="description"> Operation Type Identifies the operation in its definition. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Operation.js.html">Operation.js</a>, <a href="Operation.js.html#line28">line 28</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".from"><span class="type-signature">(static) </span>from<span class="signature">(operationDefinition)</span><span class="type-signature"></span></h4> <div class="description"> Generate a operation instance from its definition. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>operationDefinition</code></td> <td class="type"> <span class="param-type"><a href="global.html#OperationDefinition">OperationDefinition</a></span> </td> <td class="description last">A operation definition</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Operation.js.html">Operation.js</a>, <a href="Operation.js.html#line55">line 55</a> </li></ul></dd> </dl> <h4 class="name" id=".registerOperation"><span class="type-signature">(static) </span>registerOperation<span class="signature">(OperationClass)</span><span class="type-signature"></span></h4> <div class="description"> Registeres a operation so that its definitions may be used dynamically. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>OperationClass</code></td> <td class="type"> <span class="param-type"><a href="Operation.html">Operation</a></span> </td> <td class="description last">Any operation</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Operation.js.html">Operation.js</a>, <a href="Operation.js.html#line72">line 72</a> </li></ul></dd> </dl> <h4 class="name" id="transform"><span class="type-signature"></span>transform<span class="signature">(value, character)</span><span class="type-signature"> &rarr; {Number|String|Boolean}</span></h4> <div class="description"> Operational transformation </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>value</code></td> <td class="type"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>character</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Operation.js.html">Operation.js</a>, <a href="Operation.js.html#line44">line 44</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Number</span> | <span class="param-type">String</span> | <span class="param-type">Boolean</span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Add.html">Add</a></li><li><a href="Modifier.html">Modifier</a></li><li><a href="Operation.html">Operation</a></li><li><a href="Using.html">Using</a></li></ul><h3>Global</h3><ul><li><a href="global.html#RegisterWith">RegisterWith</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Dec 25 2018 11:17:38 GMT-0800 (Pacific Standard Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>