Code Map
module diode.vdoc;
//! Type of doc object.
enum Kind
{
Invalid,
Arg,
Enum,
EnumDecl,
Alias,
Class,
Union,
Group,
Import,
Return,
Struct,
Module,
Member,
Function,
Variable,
Interface,
Destructor,
Constructor,
}
//! Access of a symbool.
enum Access
{
Public,
Protected,
Private,
}
//! Storage of a variable.
enum Storage
{
Field,
Global,
Local,
}
//! The object that templates accesses the rest of the documentation nodes
//! from.
class VdocRoot : Value
{
public:
//! Current thing that a vdoc template is rendering.
current: Value;
//! Set holding config data.
set: Set;
public:
this() { }
fn modules() Parent[] { }
fn groups() Parent[] { }
fn ident(n: ir.Node, key: string) Value { }
//! Return a named object of the given name.
fn findNamed(name: string) Named { }
//! Add a group, mostly used to create groups implicitly.
fn addGroup(name: string, title: string, raw: string) Parent { }
//! Sets the children and does any upfront processing needed.
fn setChildren(children: Value[]) { }
}
//! Base class for all doc objects.
class Base : Value
{
public:
kind: Kind;
public:
this() { }
}
//! Base class for all doc objects that can have names.
class Named : Base
{
public:
//! Printable name of this object.
name: string;
//! Ident for looking up this Named thing.
search: string;
//! Access of this named object.
access: Access;
//! Raw doccomment string.
raw: string;
//! Where to find the per thing documentation page, if any.
url: string;
//! A unique identifier for this object.
tag: string;
//! The content of the doccomment, in markdown form.
content: string;
//! The brief in text form.
brief: string;
//! The groups this named is in.
ingroup: Value[];
//! The sa commands for this Named thing.
sa: string[];
//! The throw commands for this Named thing.
_throw: string[];
//! The se commands for this Named thing.
se: string[];
//! The parsed name of parent class to the class.
parentStr: string;
//! The full name of parent class to the class.
parentFullStr: string;
//! The parsed name of the interface(s) to the class or interface.
interfacesStr: string[];
//! The full name of the interface(s) to the class or interface.
interfacesFullStr: string[];
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! Regular imports and bound imports.
class Import : Named
{
public:
//! Is this import bound to a name.
bind: string;
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! A single freestanding enum or value part of a enum.
class EnumDecl : Named
{
public:
//! Is this a enum
isStandalone: bool;
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! Base class for things with children, like Module, Class, Structs.
class Parent : Named
{
public:
//! The children of this Named thing.
children: Value[];
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! Argument to a function.
class Arg : Base
{
public:
name: string;
type: string;
typeFull: string;
//! The doccomment content for this argument.
content: string;
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! Return from a function.
class Return : Base
{
public:
type: string;
typeFull: string;
//! The doccomment content for this return.
content: string;
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! A variable or field on a aggregate.
class Variable : Named
{
public:
type: string;
typeFull: string;
storage: Storage;
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! An alias declaration.
class Alias : Named
{
public:
type: string;
typeFull: string;
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! A function or constructor, destructor or method on a aggreegate.
class Function : Named
{
public:
args: Value[];
rets: Value[];
linkage: string;
hasBody: bool;
forceLabel: bool;
isFinal: bool;
isScope: bool;
isAbstract: bool;
isProperty: bool;
isOverride: bool;
public:
this() { }
fn ident(n: ir.Node, key: string) Value { }
}
//! A special array that you can access fields on to filter the members.
class Collection : Array
{
public:
this(vals: Value[]) { }
fn ident(n: ir.Node, key: string) Value { }
public:
static fn make(vals: Value[], key: string) Value { }
}
fn accessToString(access: Access) string { }
//! Create a text Value, nil if string is empty.
fn makeNilOrText(text: string) Value { }
//! Create a array Value, nil if string is empty.
fn makeNilOrArray(array: Value[]) Value { }
Type of doc object.
Access of a symbool.
Storage of a variable.
The object that templates accesses the rest of the documentation nodes from.
Current thing that a vdoc template is rendering.
Set holding config data.
All loaded Named objects.
All loaded modules.
All loaded groups.
All children as a array.
Return a named object of the given name.
Add a group, mostly used to create groups implicitly.
Sets the children and does any upfront processing needed.
Any old children are removed.
Base class for all doc objects.
Base class for all doc objects that can have names.
Printable name of this object.
Ident for looking up this Named thing.
Access of this named object.
Raw doccomment string.
Where to find the per thing documentation page, if any.
A unique identifier for this object.
The content of the doccomment, in markdown form.
The brief in text form.
The groups this named is in.
The sa commands for this Named thing.
The throw commands for this Named thing.
The se commands for this Named thing.
The parsed name of parent class to the class.
The full name of parent class to the class.
The parsed name of the interface(s) to the class or interface.
The full name of the interface(s) to the class or interface.
Regular imports and bound imports.
Is this import bound to a name.
A single freestanding enum or value part of a enum.
Is this a enum
Base class for things with children, like Module, Class, Structs.
The children of this Named thing.
Argument to a function.
The doccomment content for this argument.
Return from a function.
The doccomment content for this return.
A variable or field on a aggregate.
An alias declaration.
A function or constructor, destructor or method on a aggreegate.
A special array that you can access fields on to filter the members.
Create a text Value, nil if string is empty.
Create a array Value, nil if string is empty.