The quantum of doczar documentation. Every Component has its own directory and html page in the final output. Codifies type, expected location and useful information about a unit of data or functionality. The ultimate goal is to produce and render a Finalization.
constructor
Component ( ) {
Arguments
Each new Component
is a member of a specific ComponentCache
.
The type of the new Component
, expressed as an Array of Arrays in the form
[ [ delimiter, name ], ...]
Static Properties
This is how a Component presents itself to the Handlebars rendering engine.
Member Properties
A map of named items from argument
to their Component
instances.
An Array of Component
instances representing function arguments for this Component
. If our
ctype
is not "member"
or "property"
these arguments are rendered as belonging to a
constructor function. (Further document this constructor by providing @spare constructor
)
The "component type" of this Component
, better known as the word after the @
. One of
property
, member
, spare
, module
, class
, argument
, returns
, callback
, default
.
After finalization, final
is an Object designed to be passed to the template
engine (Handlebars).
A map of property names to Component
instances representing these types.
The type of this Component
expressed as an Array of Arrays in the form
[ [ delimiter, name ], ...]
A map of property names to Component
instances representing these types.
An array of Component instances representing return values for this Component.
A map of named items from returns
to their Component
instances.
A map of "spare document" names to Component
instances representing these documents.
An array of Component instances representing situations when code represented by this Component may throw an exception.
A map of named items from throws
to their Component
instances.
Methods
Create a representative document ready for rendering and save it to final.
A tricky waltz prepares this Component's finalization for rendering.
Stage 0: Accumulation
Every child Component on this Component is compiled into two Arrays: One is an Array of Arrays
grouping children by the name they were stored under, the other is a flat Array of all children.
The hasChildren output Boolean and the isTotallyEmpty local Boolean are processed. Implicit documentation (if any) is converted to
either a @summary
or @details
child Component. Finally, async.each
calls finalize
on
every child Component before proceeding to Stage 2: Compilation.
Stage 1: Initialization
Occurs synchronously after Stage 0. Leaves are processed first, then downward toward the trunk. This Component's final property is partially filled. Simple flag properties are set. Empty containers are placed for all child types.
If this Component is a @spare
then markdown is rendered now. Modifiers are processed into the
finalization. The local Booleans ctype, isClassValtype and isJSONValtype are processed into the output Booleans
isFunction, isCallback, isClasslike and isInline.
At this point, the finalize
call returns. After a trip around the event loop, Stage 2 begins
to process from the trunk outward to the leaves.
Stage 2: Compilation
Control briefly passes to #inherit to generate a new Object containing inherited properties. Every Component with a superclass digs recursively to base classes and builds new versions of several child sets. These inherited sets include local children too.
Every expected variety of child Component is enumerated and a source set picked from either the inheritence document (preferentially) or the local Component.
Arguments
Gather children from superclasses and merge them, in order, into a document representing this Component's inheritence. Note: this Component's children will also be merged in, producing a pre-compiled inheritence result and not just the inherited children.
Returns
The assembled inheritence document is returned. It looks like an incomplete Component instance, containing only child Components.
Merge additional information into this Component.
Arguments
Document information hot off the Parser
.