Generated docs

This commit is contained in:
Ferdinand Majerech 2015-02-16 13:53:00 +01:00
parent a071de644a
commit a4c74fc79b
7 changed files with 1005 additions and 0 deletions

1
doc/highlight.pack.js Normal file

File diff suppressed because one or more lines are too long

39
doc/index.html Normal file
View file

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script src="highlight.pack.js"></script>
<title>Index</title>
<base href=""/>
<script src="search.js"></script>
<script src="show_hide.js"></script>
</head>
<body>
<div class="main">
<div class="breadcrumbs">
<table id="results"></table>
<a href="index.html" class="home"></a><input type="search" id="search" placeholder="Search" onkeyup="searchSubmit(this.value, event)"/>
tinyendian : Main Page
</div>
<div class="sidebar">
<a href=".html#hide-toc" class="hide" id="hide-toc">&#171;</a>
<a href=".html#show-toc" class="show" id="show-toc">&#187;</a>
<div id="toc-id" class="toc">
<ul><li><a href="tinyendian.html">tinyendian</a></li>
</ul>
</div></div>
<div class="content">
<table class="module-list">
<tr><td class="module-name"><a href="tinyendian.html">tinyendian</a></td><td><p>A minimal library providing functionality for changing the endianness of data.
</p>
</td></tr>
</div>
<footer>
Generated with <a href="https://github.com/kiith-sa/harbored-mod">harbored-mod</a>
</footer>
</div>
</body>
</html>

59
doc/search.js Normal file
View file

@ -0,0 +1,59 @@
"use strict";
var items = [
{"tinyendian" : "tinyendian.html"},
{"tinyendian.UTFEncoding" : "tinyendian/UTFEncoding.html"},
{"tinyendian.swapByteOrder" : "tinyendian.html#swapByteOrder"},
{"tinyendian.fixUTFByteOrder" : "tinyendian.html#fixUTFByteOrder"},
];
function search(str) {
var re = new RegExp(str.toLowerCase());
var ret = {};
for (var i = 0; i < items.length; i++) {
var k = Object.keys(items[i])[0];
if (re.test(k.toLowerCase()))
ret[k] = items[i][k];
}
return ret;
}
function searchSubmit(value, event) {
console.log("searchSubmit");
var resultTable = document.getElementById("results");
while (resultTable.firstChild)
resultTable.removeChild(resultTable.firstChild);
if (value === "" || event.keyCode == 27) {
resultTable.style.display = "none";
return;
}
resultTable.style.display = "block";
var results = search(value);
var keys = Object.keys(results);
if (keys.length === 0) {
var row = resultTable.insertRow();
var td = document.createElement("td");
var node = document.createTextNode("No results");
td.appendChild(node);
row.appendChild(td);
return;
}
for (var i = 0; i < keys.length; i++) {
var k = keys[i];
var v = results[keys[i]];
var link = document.createElement("a");
link.href = v;
link.textContent = k;
link.attributes.id = "link" + i;
var row = resultTable.insertRow();
row.appendChild(link);
}
}
function hideSearchResults(event) {
if (event.keyCode != 27)
return;
var resultTable = document.getElementById("results");
while (resultTable.firstChild)
resultTable.removeChild(resultTable.firstChild);
resultTable.style.display = "none";
}

17
doc/show_hide.js Normal file
View file

@ -0,0 +1,17 @@
window.onload = function(e)
{
var elems = document.querySelectorAll( "div.toc ul ul" );
for( i in elems )
{
if( elems[i].style.display != "block" )
elems[i].style.display = "none";
}
}
function show_hide(id)
{
var elem = document.getElementById( id );
if( elem.style.display == "block" )
elem.style.display = "none";
else elem.style.display = "block";
}

726
doc/style.css Normal file
View file

@ -0,0 +1,726 @@
html {
font-family: Verdana, "DejaVu Sans", sans;
margin: 0;
padding: 0;
background-color: #333;
border-left: .2em solid #333;
border-right: .2em solid #333;
min-height: 100%;
}
body {
margin: 0;
padding: 0;
}
div.main {
overflow: hidden;
background-color: #F8F8F8;
}
/**** BREADCRUMBS ****/
div.breadcrumbs {
color: white;
background-color: #333;
padding: 1.0em 0.5em 0.0em 0.5em;
left: 0;
box-sizing: border-box;
text-align: right;
top: 0;
width: 100%;
height: 48px;
font-size: 95%;
position: fixed;
}
div.breadcrumbs a {
color: white;
}
div.breadcrumbs span.highlight, div.breadcrumbs span a {
color: #DAAF07;
}
div.breadcrumbs input {
width: 7em;
margin-top: -0.1em;
}
div.breadcrumbs small {
font-size: 0.8em;
}
/** narrow screen hacks **/
@media only screen and (max-width: 1000px)
{
div.breadcrumbs span, div.breadcrumbs small {
font-size: 80%;
}
}
@media only screen and (max-width: 800px)
{
div.breadcrumbs small {
display: none;
position: fixed;
}
div.breadcrumbs span {
font-size: 75%;
}
}
@media only screen and (max-width: 600px)
{
div.breadcrumbs span {
font-size: 65%;
}
}
div.breadcrumbs a.home {
float: left;
font-weight: bold;
font-size: 200%;
margin: 0 2% 0 0%;
margin-top: -0.3em;
text-decoration: none;
}
div.breadcrumbs input {
float: left;
}
/* anchors need to compensate for the fixed-pos breadcrumbs */
a.anchor
{
display: block;
position: relative;
top: -48px;
visibility: hidden;
}
/** SEARCH RESULTS **/
#results {
position: absolute;
max-height: 30em;
background-color: #eee;
box-shadow: 0 .25em .25em black;
display: none;
text-align: left;
color: black;
margin-top: 2em;
font-size: 70%;
z-index: 1000;
overflow-y: scroll;
}
#results a {
color: blue;
}
/**** SIDEBAR, TABLE OF CONTENTS ****/
div.sidebar {
margin-top: 48px;
float: left;
margin-right: -1px;
border-right: 1px solid #D0D0D0;
background-color: #F8F8F0;
}
div.toc {
padding: 1.5em 0.75em 1em 0.5em;
font-size: 0.55em;
line-height: 1.95em;
display:block;
}
@media only screen and (max-width: 800px)
{
div.toc {
font-size: 0.5em;
padding: 1.5em 0.4em 1em 0.2em;
}
}
/* stuff for showing/hiding the sidebar */
.hide, .show {
display: block;
float: right;
border-right: 1px solid #D0D0D0;
border-bottom: 1px solid #D0D0D0;
border-left: 1px solid #D0D0D0;
/* to avoid having double border */
margin-right: -1px;
font-size: 1.1em;
padding: 0 0.6em;
}
a.hide, a.show {
color: #111;
text-decoration: none;
}
.hide {
background-color: #F8F8F8;
border-bottom-left-radius:3px;
border-right: 1px solid #F8F8F8;
}
.show {
background-color: #F8F8F0;
border-bottom-right-radius:3px;
display: none;
}
.hide:target + .show {
display: inline;
position: absolute;
}
.hide:target {
display: none;
}
.hide:target ~ .toc {
display:none;
}
div.toc .toc-additional {
border-bottom: 1px dashed #333;
line-height: 1.5em;
}
div.toc .toc-additional p, div.toc .toc-additional ul {
margin: 0.4em 0;
}
div.toc ul {
list-style-type: none;
padding-left: 0;
padding-bottom: 0.5em;
}
div.toc ul ul {
list-style-type: none;
padding-left: 0.5em;
}
div.toc a {
color: #111;
font-size: 1.25em;
}
@media only screen and (max-width: 800px)
{
div.toc ul ul {
padding-left: 0.2em;
}
}
div.toc span.package {
cursor: pointer;
line-height: 1.8em;
font-weight: bold;
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 2px;
background-color: #F0F0F0;
font-size: 1.25em;
padding: 0 0.2em;
/* counteracts the text movement caused by the padding */
margin: 0 -0.2em;
}
div.toc span.package a {
font-size: 1em;
}
/* Highlight the current module/package */
div.toc .selected {
border-radius: 2px;
background-color: #DAAF07 !important;
padding: 0.325em 0.2em;
/* counteracts the text movement caused by the padding */
margin: -0.325em -0.2em;
}
/**** MAIN CONTENT ****/
div.content {
margin-top: 48px;
padding: 1.5em;
font-size: 90%;
line-height: 130%;
overflow: hidden;
border-left: 1px solid #D0D0D0;
}
@media only screen and (max-width: 800px)
{
div.content {
font-size: 82%;
}
}
@media only screen and (max-width: 600px)
{
div.content {
font-size: 70%;
padding: 1.5em 0.3em 1.5em 0.5em;
}
}
div.content h2 {
margin: .35em 0 .45em 0;
padding-top: .35em;
font-size: 1.3em;
}
div.content h3 {
font-size: 1.1em;
}
div.content tr {
margin: 0;
}
div.content table {
border-collapse: collapse;
border-bottom: 1px dashed #333;
font-size: 90%;
line-height: 130%;
margin: 1em 0;
}
div.content td {
border-top: 1px dashed #333;
margin: 0;
padding: .32em;
}
div.content td:first-child {
text-align: center;
}
/* prevent function attribs from wrapping, make the cell wider instead */
div.content td:first-child * {
white-space: nowrap
}
/* The first markdown-generated paragraph in e.g. Params tables shouldn't add any vertical
* space
*/
div.content td p:first-child {
margin: 0;
}
div.content p strong {
font-size: 92%;
}
.paramName {
font-weight: bold;
width: 6em;
}
div.section {
padding: 0;
margin: 0;
}
/**** EXTRA INFO IN FUNCTION/CLASS/ETC LISTS ****/
div.content td .extrainfo{
display: block;
line-height: 105%;
font-family: monospace;
font-size: 85%;
text-align: center;
}
.extrainfo div {
display: block;
margin: 0;
}
.extrainfo .attr-const { color: blueviolet; }
.extrainfo .attr-pure { color: darkslategray; }
.extrainfo .attr-nothrow { color: brown; }
.extrainfo .attr-nogc { color: darkgreen; }
.extrainfo .attr-safe { color: darkblue; }
.extrainfo .attr-trusted { color: firebrick; }
.extrainfo .attr-system { color: darkred; }
.extrainfo .attr-final { color: darkolivegreen; }
.extrainfo .attr-ref { color: fuchsia; }
/**** SYMBOLS (not used by the one-file-for-every-variable writer backend) ****/
div.aggregate-symbol {
display: flex;
flex-direction: column;
display: -webkit-flex;
-webkit-flex-direction: column;
}
div.aggregate-symbol div.description {
order: -2;
-webkit-order: -2;
}
div.aggregate-symbol div.members {
order: -1;
-webkit-order: -1;
padding-bottom: 0.3em;
border-bottom: 10px solid #333;
margin: 1em 0em 1.5em 0em;
}
div.symbol {
border-radius: 3px;
border: 1px solid #d0d0d0;
padding: 1px 0.4em;
margin: 0.5em 0;
}
a.anchor:target + div.symbol {
border: 2px solid #DAAF07;
border-radius: 0;
background-color: #F8F8F0;
}
/**** SECTION-SPECIFIC STYLES ****/
.section.seealso, .section.note, .section.imports {
font-size: 75%;
line-height: 135%;
/* background-color: #F0F0C0; */
/* background-color: #DA7F07; */
/* background-color: #DA8F07; */
/* background-color: #DA9F07; */
background-color: #DAAF07;
/* background-color: #EABD08; */
padding: 1em;
margin-bottom: 0.5em;
}
.section.seealso h2, .section.note h2 {
display: block;
float: left;
margin: 0 0.7em -0.05em 0em;
padding: 0;
font-size: 1.1em;
}
.section.imports h2 {
display: inline;
margin: 0.5em 0em;
padding: 0;
font-size: 1.1em;
}
.section.seealso div.seealso-content, .section.note div.note-content {
display: block;
margin-left: 6.5em;
}
.section.imports ul {
margin: 0;
list-style-type: none;
padding-left: 1.5em;
-moz-column-count: 4;
-moz-column-gap: 20px;
-webkit-column-count: 4;
-webkit-column-gap: 20px;
column-count: 4;
column-gap: 20px;
}
@media only screen and (max-width: 1400px)
{
.section.imports ul {
-moz-column-count: 3;
-moz-column-gap: 20px;
-webkit-column-count: 3;
-webkit-column-gap: 20px;
column-count: 3;
column-gap: 20px;
}
}
@media only screen and (max-width: 1100px)
{
.section.imports ul {
-moz-column-count: 2;
-moz-column-gap: 13px;
-webkit-column-count: 2;
-webkit-column-gap: 13px;
column-count: 2;
column-gap: 13px;
}
}
@media only screen and (max-width: 800px)
{
.section.imports ul {
-moz-column-count: 1;
-moz-column-gap: 7px;
-webkit-column-count: 1;
-webkit-column-gap: 7px;
column-count: 1;
column-gap: 7px;
}
}
.section.imports ul a {
color: #111;
}
.section.seealso *:first-child, .section.note *:first-child {
margin-top: 0em;
}
.section.seealso ul, .section.note ul {
padding-left: 1.5em;
}
.section.seealso *:last-child, .section.note *:last-child {
margin-bottom: 0em;
}
/**** FOOTER ****/
footer
{
text-align: center;
font-size: 60%;
color: white;
background-color: #333;
}
footer a
{
color: white;
}
/**** CODE ****/
pre {
margin-top: 0.4em;
}
/* DDoc code examples */
code {
background-color: #333;
color: #eee;
padding: 0.8em;
border-radius: .1em;
display: block;
}
code a {
color: white;
text-decoration: none;
border-bottom: 1px dotted #888;
}
/* hmod/libddoc errors */
div.error {
color: darkred;
}
/* Markdown inline code and $(D code) */
code.prettyprint, .d_inlinecode {
font-family: monospace;
color: #333;
background-color:rgba(0,0,0,0.04);
border-radius: .15em;
border: 1px solid #C0C0C0;
padding: 0.22em;
display: inline;
}
code.prettyprint a {
color: black;
border-color: #777;
}
/*do not affect the first <pre>, which is not in a section*/
div.section pre > code {
margin: .5em;
border-radius: .1em;
padding: 0.8em;
}
div.section td pre {
margin: 0;
padding: 0;
}
div.section td code:not(.prettyprint) {
margin: 0;
padding: 0.6em;
}
.hljs {
display: block; padding: 1em;
background: #282B2E;
overflow-x: auto;
display: block;
}
.hljs-keyword,
.hljs-literal,
.hljs-change,
.hljs-winutils,
.hljs-flow,
.lisp .hljs-title,
.clojure .hljs-built_in,
.nginx .hljs-title,
.css .hljs-id,
.tex .hljs-special {
color: #93C763;
}
.hljs-number {
color: #FFCD22;
}
.hljs {
color: #E0E2E4;
}
.css .hljs-tag,
.css .hljs-pseudo {
color: #D0D2B5;
}
.hljs-attribute,
.hljs .hljs-constant {
color: #668BB0;
}
.xml .hljs-attribute {
color: #B3B689;
}
.xml .hljs-tag .hljs-value {
color: #E8E2B7;
}
.hljs-code,
.hljs-class .hljs-title,
.hljs-header {
color: white;
}
.hljs-class,
.hljs-hexcolor {
color: #93C763;
}
.hljs-regexp {
color: #D39745;
}
.hljs-at_rule,
.hljs-at_rule .hljs-keyword {
color: #A082BD;
}
.hljs-doctype {
color: #557182;
}
.hljs-link_url,
.hljs-tag,
.hljs-tag .hljs-title,
.hljs-bullet,
.hljs-subst,
.hljs-emphasis,
.haskell .hljs-type,
.hljs-preprocessor,
.hljs-pragma,
.ruby .hljs-class .hljs-parent,
.hljs-built_in,
.sql .hljs-aggregate,
.django .hljs-template_tag,
.django .hljs-variable,
.smalltalk .hljs-class,
.hljs-javadoc,
.django .hljs-filter .hljs-argument,
.smalltalk .hljs-localvars,
.smalltalk .hljs-array,
.hljs-attr_selector,
.hljs-pseudo,
.hljs-addition,
.hljs-stream,
.hljs-envvar,
.apache .hljs-tag,
.apache .hljs-cbracket,
.tex .hljs-command,
.hljs-prompt {
color: #8CBBAD;
}
.hljs-string {
color: #EC7600;
}
.hljs-comment,
.java .hljs-annotation,
.hljs-blockquote,
.hljs-horizontal_rule,
.python .hljs-decorator,
.hljs-template_comment,
.hljs-pi,
.hljs-deletion,
.hljs-shebang,
.apache .hljs-sqbracket,
.tex .hljs-formula {
color: #818E96;
}
.hljs-keyword,
.hljs-literal,
.css .hljs-id,
.hljs-phpdoc,
.hljs-title,
.hljs-header,
.haskell .hljs-type,
.vbscript .hljs-built_in,
.sql .hljs-aggregate,
.rsl .hljs-built_in,
.smalltalk .hljs-class,
.diff .hljs-header,
.hljs-chunk,
.hljs-winutils,
.bash .hljs-variable,
.apache .hljs-tag,
.tex .hljs-special,
.hljs-request,
.hljs-at_rule .hljs-keyword,
.hljs-status {
font-weight: bold;
}
.coffeescript .javascript,
.javascript .xml,
.tex .hljs-formula,
.xml .javascript,
.xml .vbscript,
.xml .css,
.xml .hljs-cdata {
opacity: 0.5;
}

117
doc/tinyendian.html Normal file
View file

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script src="highlight.pack.js"></script>
<title>tinyendian</title>
<base href=""/>
<script src="search.js"></script>
<script src="show_hide.js"></script>
</head>
<body>
<div class="main">
<div class="breadcrumbs">
<table id="results"></table>
<a href="index.html" class="home"></a><input type="search" id="search" placeholder="Search" onkeyup="searchSubmit(this.value, event)"/>
<small>tinyendian</small>
</div>
<div class="sidebar">
<a href="tinyendian.html#hide-toc" class="hide" id="hide-toc">&#171;</a>
<a href="tinyendian.html#show-toc" class="show" id="show-toc">&#187;</a>
<div id="toc-id" class="toc">
<ul><li><span class=" selected"><a href="tinyendian.html">tinyendian</a></span>
</li>
</ul>
</div></div>
<div class="content">
<div class="aggregate-symbol"><a class="anchor" id="swapByteOrder"></a><div class="symbol"><div class="description"><pre><code>public @system pure nothrow @nogc <a href="http://dlang.org/type.html#basic-data-types">void</a> <a href="tinyendian.html#swapByteOrder">swapByteOrder</a>(T)(T[] array)
if([2, 4].canFind(T.sizeof))
</code></pre>
<div class="section "><p>Swap byte order of items in an array in place.
</p>
</div>
<div class="section"><h2>Parameters</h2>
<table class="params">
<tr class="param"><td class="paramName">T</td><td class="paramDoc"><p>Item type. Must be either 2 or 4 bytes long.
</p>
</td></tr>
<tr class="param"><td class="paramName">array</td><td class="paramDoc"><p>Buffer with values to fix byte order of.
</p>
</td></tr>
</table>
</div>
</div></div><a class="anchor" id="fixUTFByteOrder"></a><div class="symbol"><div class="description"><pre><code>public @system pure nothrow @nogc auto <a href="tinyendian.html#fixUTFByteOrder">fixUTFByteOrder</a>(<a href="http://dlang.org/type.html#basic-data-types">ubyte</a>[] array)
</code></pre>
<div class="section "><p>Convert byte order of an array encoded in UTF(8/16/32) to system endianness in place.
</p>
</div>
<div class="section"><p>Uses the UTF byte-order-mark (BOM) to determine UTF encoding. If there is no BOM
at the beginning of array, UTF-8 is assumed (this is compatible with ASCII). The
BOM, if any, will be removed from the buffer.
</p>
<p> If the encoding is determined to be UTF-16 or UTF-32 and there aren't enough bytes
for the last code unit (i.e. if array.length is odd for UTF-16 or not divisible by
4 for UTF-32), the extra bytes (1 for UTF-16, 1-3 for UTF-32) are stripped.
</p>
<p> Note that this function does <b>not</b> check if the array is a valid UTF string. It
only works with the BOM and 1,2 or 4-byte items.
</p>
</div>
<div class="section"><h2>Parameters</h2>
<table class="params">
<tr class="param"><td class="paramName">array</td><td class="paramDoc"><p>The array with UTF-data.
</p>
</td></tr>
</table>
</div>
<div class="section"><h2>Returns</h2>
<p> A struct with the following members:
</p>
<p> <code class="d_inlinecode">ubyte[] array</code> A slice of the input array containing data in correct
byte order, without BOM and in case of UTF-16/UTF-32,
without stripped bytes, if any.
<code class="d_inlinecode">UTFEncoding encoding</code> Encoding of the result (UTF-8, UTF-16 or UTF-32)
<code class="d_inlinecode">std.system.Endian endian</code> Endianness of the original array.
<code class="d_inlinecode">uint bytesStripped</code> Number of bytes stripped from a UTF-16/UTF-32 array, if
any. This is non-zero only if array.length was not
divisible by 2 or 4 for UTF-16 and UTF-32, respectively.
</p>
</div>
<div class="section"><h2>Complexity</h2>
<p> (BIGOH array.length)
</p>
</div>
</div></div><div class="description"><div class="section "><p>A minimal library providing functionality for changing the endianness of data.
</p>
</div>
</div><div class="section members"><h2>Enums</h2><table><tr><td><a href="tinyendian/UTFEncoding.html">UTFEncoding</a></td><td></td><td><p>Unicode UTF encodings.
</p>
</td></tr></table><h2>Functions</h2><table><tr><td><a href="tinyendian.html#swapByteOrder">swapByteOrder</a><span class="extrainfo"></span></td><td></td><td><p>Swap byte order of items in an array in place.
</p>
</td></tr><tr><td><span class="extrainfo"><span class="attribs"><span class="attr-auto">auto</span></span></span><a href="tinyendian.html#fixUTFByteOrder">fixUTFByteOrder</a><span class="extrainfo"></span></td><td></td><td><p>Convert byte order of an array encoded in UTF(8/16/32) to system endianness in place.
</p>
</td></tr></table>
</div>
</div><script>hljs.initHighlightingOnLoad();</script>
</div>
<footer>
Generated with <a href="https://github.com/kiith-sa/harbored-mod">harbored-mod</a>
</footer>
</div>
</body>
</html>

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="../style.css"/>
<script src="../highlight.pack.js"></script>
<title>UTFEncoding</title>
<base href="../"/>
<script src="search.js"></script>
<script src="show_hide.js"></script>
</head>
<body>
<div class="main">
<div class="breadcrumbs">
<table id="results"></table>
<a href="index.html" class="home"></a><input type="search" id="search" placeholder="Search" onkeyup="searchSubmit(this.value, event)"/>
<small><a href=tinyendian.html>tinyendian</a>.</small><span class="highlight">UTFEncoding</span>
</div>
<div class="sidebar">
<a href="tinyendian.html#hide-toc" class="hide" id="hide-toc">&#171;</a>
<a href="tinyendian.html#show-toc" class="show" id="show-toc">&#187;</a>
<div id="toc-id" class="toc">
<ul><li><span class=" selected"><a href="tinyendian.html">tinyendian</a></span>
</li>
</ul>
</div></div>
<div class="content">
<div class="aggregate-symbol"><div class="description"><pre><code>public enum UTFEncoding : <a href="http://dlang.org/type.html#basic-data-types">ubyte</a>
</code></pre>
<div class="section "><p>Unicode UTF encodings.
</p>
</div>
</div><div class="section members"><h2>Values</h2><table><tr><td>UTF_8</td><td></td><td></td></tr><tr><td>UTF_16</td><td></td><td></td></tr><tr><td>UTF_32</td><td></td><td></td></tr></table>
</div>
</div><script>hljs.initHighlightingOnLoad();</script>
</div>
<footer>
Generated with <a href="https://github.com/kiith-sa/harbored-mod">harbored-mod</a>
</footer>
</div>
</body>
</html>