Permalink
Browse files

Generate edocs via asciiedoc

  • Loading branch information...
norton committed Nov 22, 2012
1 parent 86e81c3 commit f019c1bea7479e67be4a490aa4b7b414db348e2a
View
202 README.md

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -10,40 +10,12 @@
__This module defines the `contract_driver` behaviour.__
<br></br>
- Required callback functions: `start/1`, `start/2`, `init/1`, `init/2`, `encode/3`, `decode/5`.<a name="index"></a>
+ Required callback functions: `start/1`, `start/2`, `init/1`, `init/2`, `encode/3`, `decode/4`.<a name="index"></a>
##Function Index##
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#behaviour_info-1">behaviour_info/1</a></td><td></td></tr><tr><td valign="top"><a href="#loop-5">loop/5</a></td><td></td></tr><tr><td valign="top"><a href="#loop-6">loop/6</a></td><td></td></tr><tr><td valign="top"><a href="#loop-7">loop/7</a></td><td><p>Driver main loop.</p>
-<ul>
-<li>
-<p>
-A driver sits between a socket and a Pid
-</p>
-</li>
-<li>
-<p>
-Stuff on the socket is send to the Pid
-</p>
-</li>
-<li>
-<p>
-Stuff from the Pid is send to the socket
-</p>
-</li>
-<li>
-<p>
-When it is called the Socket has been set to send messages to the
-driver and the Pid exists
-</p>
-</li>
-<li>
-<p>
-If one side dies the process dies
-</p>
-</li>
-</ul>.</td></tr><tr><td valign="top"><a href="#relay-3">relay/3</a></td><td></td></tr><tr><td valign="top"><a href="#start-3">start/3</a></td><td></td></tr></table>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#behaviour_info-1">behaviour_info/1</a></td><td></td></tr><tr><td valign="top"><a href="#loop-5">loop/5</a></td><td></td></tr><tr><td valign="top"><a href="#loop-6">loop/6</a></td><td></td></tr><tr><td valign="top"><a href="#relay-3">relay/3</a></td><td></td></tr><tr><td valign="top"><a href="#start-3">start/3</a></td><td></td></tr></table>
<a name="functions"></a>
@@ -71,42 +43,6 @@ If one side dies the process dies
`loop(Module, Contract, Options, Pid, Socket, Timeout) -> any()`
-<a name="loop-7"></a>
-
-###loop/7##
-
-
-`loop(Module, Contract, Options, Pid, Socket, Timeout, Cont) -> any()`
-
-<p>Driver main loop.</p>
-<ul>
-<li>
-<p>
-A driver sits between a socket and a Pid
-</p>
-</li>
-<li>
-<p>
-Stuff on the socket is send to the Pid
-</p>
-</li>
-<li>
-<p>
-Stuff from the Pid is send to the socket
-</p>
-</li>
-<li>
-<p>
-When it is called the Socket has been set to send messages to the
-driver and the Pid exists
-</p>
-</li>
-<li>
-<p>
-If one side dies the process dies
-</p>
-</li>
-</ul>
<a name="relay-3"></a>
###relay/3##
View
@@ -9,30 +9,30 @@
<p>Contract manager server</p>
-<pre><tt>This module implements the contract manager server process, which
+<pre><code>This module implements the contract manager server process, which
runs on the Erlang server side, between the UBF driver (or the
driver for whatever protocol is being used "over the wire",
-e.g. JSON-RPC) and the plugin handler server.</tt></pre>
+e.g. JSON-RPC) and the plugin handler server.</code></pre>
-<pre><tt>image:ubf-flow-01.png[UBF Flow]</tt></pre>
+<pre><code>image:ubf-flow-01.png[UBF Flow]</code></pre>
-<pre><tt>== Message Passing</tt></pre>
+<pre><code>== Message Passing</code></pre>
-<pre><tt>In the diagram below, the "Client" is actually the UBF driver
+<pre><code>In the diagram below, the "Client" is actually the UBF driver
(using UBF, EBF, JSON, JSON-RPC, or other transport protocol) that
acts on behalf of the remote client. The "Server" is actually the
plugin handler server, which acts as an intermediary between the
-actual server application.</tt></pre>
+actual server application.</code></pre>
-<pre><tt>------
+<pre><code>------
Client Contract Server
| | |
| | |
@@ -61,7 +61,7 @@ actual server application.</tt></pre>
| | {event_in,M} |
| +------------->------------+
| | |
-------</tt></pre>
+------</code></pre>
.
<a name="index"></a>
@@ -9,11 +9,11 @@
<p>Contract manager transaction logging.</p>
-<pre><tt>This module can be used by the server to log individual protocol
+<pre><code>This module can be used by the server to log individual protocol
transactions, if desired. This simple default module uses the
Erlang/OTP +error_logger+ module; we highly recommend that the
+sasl+ application be running to take full advantage of OTP\'s
-error and event handling capabilities.</tt></pre>
+error and event handling capabilities.</code></pre>
.
<a name="index"></a>
View
@@ -9,49 +9,42 @@
<p>UBF(b) contract parser.</p>
-<pre><tt>Parsing a UBF(b) contract is done via a compiler "parse transform"
-during the usual compilation of an Erlang source module.</tt></pre>
+<pre><code>Parsing a UBF(b) contract is done via a compiler "parse transform"
+during the usual compilation of an Erlang source module.</code></pre>
.
<a name="index"></a>
##Function Index##
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#make-0">make/0</a></td><td></td></tr><tr><td valign="top"><a href="#make_lex-0">make_lex/0</a></td><td></td></tr><tr><td valign="top"><a href="#make_yecc-0">make_yecc/0</a></td><td></td></tr><tr><td valign="top"><a href="#parse_file-1">parse_file/1</a></td><td></td></tr><tr><td valign="top"><a href="#parse_transform-2">parse_transform/2</a></td><td></td></tr><tr><td valign="top"><a href="#parse_transform_contract-2">parse_transform_contract/2</a></td><td></td></tr><tr><td valign="top"><a href="#preDefinedTypes-0">preDefinedTypes/0</a></td><td></td></tr><tr><td valign="top"><a href="#preDefinedTypesWithAttrs-0">preDefinedTypesWithAttrs/0</a></td><td></td></tr><tr><td valign="top"><a href="#preDefinedTypesWithoutAttrs-0">preDefinedTypesWithoutAttrs/0</a></td><td></td></tr><tr><td valign="top"><a href="#tags-1">tags/1</a></td><td></td></tr><tr><td valign="top"><a href="#tags-2">tags/2</a></td><td></td></tr></table>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#builtin_types-0">builtin_types/0</a></td><td></td></tr><tr><td valign="top"><a href="#builtin_types-1">builtin_types/1</a></td><td></td></tr><tr><td valign="top"><a href="#parse_stream-3">parse_stream/3</a></td><td></td></tr><tr><td valign="top"><a href="#parse_transform-2">parse_transform/2</a></td><td></td></tr><tr><td valign="top"><a href="#parse_transform-5">parse_transform/5</a></td><td></td></tr><tr><td valign="top"><a href="#parse_transform_contract-2">parse_transform_contract/2</a></td><td></td></tr><tr><td valign="top"><a href="#predefined_types-0">predefined_types/0</a></td><td></td></tr><tr><td valign="top"><a href="#predefined_types-1">predefined_types/1</a></td><td></td></tr><tr><td valign="top"><a href="#tags-1">tags/1</a></td><td></td></tr><tr><td valign="top"><a href="#tags-2">tags/2</a></td><td></td></tr></table>
<a name="functions"></a>
##Function Details##
-<a name="make-0"></a>
+<a name="builtin_types-0"></a>
-###make/0##
+###builtin_types/0##
-`make() -> any()`
+`builtin_types() -> any()`
-<a name="make_lex-0"></a>
+<a name="builtin_types-1"></a>
-###make_lex/0##
+###builtin_types/1##
-`make_lex() -> any()`
+`builtin_types(X1) -> any()`
-<a name="make_yecc-0"></a>
+<a name="parse_stream-3"></a>
-###make_yecc/0##
+###parse_stream/3##
-`make_yecc() -> any()`
-
-<a name="parse_file-1"></a>
-
-###parse_file/1##
-
-
-`parse_file(F) -> any()`
+`parse_stream(Stream, Lex, Yecc) -> any()`
<a name="parse_transform-2"></a>
@@ -60,33 +53,33 @@ during the usual compilation of an Erlang source module.</tt></pre>
`parse_transform(In, Opts) -> any()`
-<a name="parse_transform_contract-2"></a>
+<a name="parse_transform-5"></a>
-###parse_transform_contract/2##
+###parse_transform/5##
-`parse_transform_contract(In, Contract) -> any()`
+`parse_transform(In, Opts, File, Imports, ParseFun) -> any()`
-<a name="preDefinedTypes-0"></a>
+<a name="parse_transform_contract-2"></a>
-###preDefinedTypes/0##
+###parse_transform_contract/2##
-`preDefinedTypes() -> any()`
+`parse_transform_contract(In, Contract) -> any()`
-<a name="preDefinedTypesWithAttrs-0"></a>
+<a name="predefined_types-0"></a>
-###preDefinedTypesWithAttrs/0##
+###predefined_types/0##
-`preDefinedTypesWithAttrs() -> any()`
+`predefined_types() -> any()`
-<a name="preDefinedTypesWithoutAttrs-0"></a>
+<a name="predefined_types-1"></a>
-###preDefinedTypesWithoutAttrs/0##
+###predefined_types/1##
-`preDefinedTypesWithoutAttrs() -> any()`
+`predefined_types(X1) -> any()`
<a name="tags-1"></a>
View
@@ -6,41 +6,14 @@
* [Function Details](#functions)
-<p>Contract implementation: compare a term against a contract.</p>
-
-
-<pre><tt>See the function checkType/3 for assistance on checking if a term
-does/does not break a contract.</tt></pre>
-.
+<p>Contract implementation: compare a term against a contract.</p>.
<a name="index"></a>
##Function Index##
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#checkEventIn-3">checkEventIn/3</a></td><td></td></tr><tr><td valign="top"><a href="#checkEventOut-3">checkEventOut/3</a></td><td></td></tr><tr><td valign="top"><a href="#checkRPCIn-3">checkRPCIn/3</a></td><td></td></tr><tr><td valign="top"><a href="#checkRPCOut-4">checkRPCOut/4</a></td><td></td></tr><tr><td valign="top"><a href="#checkType-3">checkType/3</a></td><td><p>Given a contract type name, a term to check against that
-contract type, and a contract module name, verify the term against
-that contract's type.</p>
-
-
-<pre><tt>Example usage from the irc_plugin.con contract:</tt></pre>
-
-
-
-<pre><tt>------
-1> contracts:checkType(ok, ok, irc_plugin).
-2> contracts:checkType(bool, true, irc_plugin).
-3> contracts:checkType(nick, {'#S', "foo"}, irc_plugin).
-4> contracts:checkType(joinEvent, {joins, {'#S', "nck"}, {'#S', "grp"}}, irc_plugin).
-5> contracts:checkType(joinEvent, {joins, {'#S', "nck"}, {'#S', bad_atom}}, irc_plugin).
-------</tt></pre>
-
-
-
-<pre><tt>NOTE: This is a brute-force function, but it works, mostly. Don\'t
-try to have a computer parse the output in error cases: the failure
-output is meant only for human eyes.</tt></pre>
-.</td></tr><tr><td valign="top"><a href="#isType-3">isType/3</a></td><td></td></tr><tr><td valign="top"><a href="#isTypeAttr-2">isTypeAttr/2</a></td><td></td></tr></table>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#checkEventIn-3">checkEventIn/3</a></td><td></td></tr><tr><td valign="top"><a href="#checkEventOut-3">checkEventOut/3</a></td><td></td></tr><tr><td valign="top"><a href="#checkRPCIn-3">checkRPCIn/3</a></td><td></td></tr><tr><td valign="top"><a href="#checkRPCOut-4">checkRPCOut/4</a></td><td></td></tr><tr><td valign="top"><a href="#isType-3">isType/3</a></td><td></td></tr><tr><td valign="top"><a href="#isTypeAttr-2">isTypeAttr/2</a></td><td></td></tr></table>
<a name="functions"></a>
@@ -75,38 +48,6 @@ output is meant only for human eyes.</tt></pre>
`checkRPCOut(MsgOut, StateOut, FSM2, Mod) -> any()`
-<a name="checkType-3"></a>
-
-###checkType/3##
-
-
-<pre>checkType(HumanType::atom(), Term::term(), Mod::module()) -&gt; yup | term()</pre>
-<br></br>
-
-
-<p>Given a contract type name, a term to check against that
-contract type, and a contract module name, verify the term against
-that contract's type.</p>
-
-
-<pre><tt>Example usage from the irc_plugin.con contract:</tt></pre>
-
-
-
-<pre><tt>------
-1> contracts:checkType(ok, ok, irc_plugin).
-2> contracts:checkType(bool, true, irc_plugin).
-3> contracts:checkType(nick, {'#S', "foo"}, irc_plugin).
-4> contracts:checkType(joinEvent, {joins, {'#S', "nck"}, {'#S', "grp"}}, irc_plugin).
-5> contracts:checkType(joinEvent, {joins, {'#S', "nck"}, {'#S', bad_atom}}, irc_plugin).
-------</tt></pre>
-
-
-
-<pre><tt>NOTE: This is a brute-force function, but it works, mostly. Don\'t
-try to have a computer parse the output in error cases: the failure
-output is meant only for human eyes.</tt></pre>
-
<a name="isType-3"></a>
###isType/3##
View
@@ -10,30 +10,30 @@
protocol sessions.</p>
-<pre><tt>This driver automagically relies on the OTP +gen_tcp+ "packet"
+<pre><code>This driver automagically relies on the OTP +gen_tcp+ "packet"
feature, using a 4-byte prefix to specify the size of the data
coming from the client. Similarly, this packet feature is used
-when sending our reply back to the client.</tt></pre>
+when sending our reply back to the client.</code></pre>
.
__Behaviours:__ [`contract_driver`](contract_driver.md).<a name="index"></a>
##Function Index##
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#decode-5">decode/5</a></td><td></td></tr><tr><td valign="top"><a href="#encode-3">encode/3</a></td><td></td></tr><tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr><tr><td valign="top"><a href="#init-2">init/2</a></td><td></td></tr><tr><td valign="top"><a href="#start-1">start/1</a></td><td></td></tr><tr><td valign="top"><a href="#start-2">start/2</a></td><td></td></tr></table>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#decode-4">decode/4</a></td><td></td></tr><tr><td valign="top"><a href="#encode-3">encode/3</a></td><td></td></tr><tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr><tr><td valign="top"><a href="#init-2">init/2</a></td><td></td></tr><tr><td valign="top"><a href="#start-1">start/1</a></td><td></td></tr><tr><td valign="top"><a href="#start-2">start/2</a></td><td></td></tr></table>
<a name="functions"></a>
##Function Details##
-<a name="decode-5"></a>
+<a name="decode-4"></a>
-###decode/5##
+###decode/4##
-`decode(Contract, Options, X3, Binary, CallBack) -> any()`
+`decode(Contract, Options, X3, Binary) -> any()`
<a name="encode-3"></a>
View
@@ -3,6 +3,7 @@
{modules,[contract_driver,contract_lex,contract_manager,contract_manager_tlog,
contract_parser,contract_proto,contract_yecc,contracts,
contracts_abnf,ebf,ebf_driver,proc_socket_server,proc_utils,qc_ubf,
- qc_ubf_types,ubf,ubf_client,ubf_driver,ubf_plugin_handler,
- ubf_plugin_meta_stateful,ubf_plugin_meta_stateless,
- ubf_plugin_stateful,ubf_plugin_stateless,ubf_server,ubf_utils]}.
+ qc_ubf_impl,qc_ubf_types,ubf,ubf_client,ubf_driver,
+ ubf_plugin_handler,ubf_plugin_meta_stateful,
+ ubf_plugin_meta_stateless,ubf_plugin_stateful,ubf_plugin_stateless,
+ ubf_server,ubf_types_builtin,ubf_utils]}.
Oops, something went wrong.

0 comments on commit f019c1b

Please sign in to comment.