edoc(3erl) | Erlang Module Definition | edoc(3erl) |
edoc - EDoc - the Erlang program documentation generator.
EDoc - the Erlang program documentation generator.
This module provides the main user interface to EDoc.
The EDoc documentation data for a module, expressed as an XML document in XMerL format. See the file edoc.dtd for details.
Module Entries (one per function, plus module header and footer).
Environment information needed by EDoc for generating references.
Module information.
Generic tag information. #tag.form is only defined if #tag.origin is code, that is the #tag{} represents a code fragment, not a doc comment tag.
application(App::atom()) -> ok
Equivalent to application(Application, []).
application(App, Options) -> ok
Types:
Run EDoc on an application in its default app-directory. See application/3 for details.
See also: application/1.
application(App, Dir, Options) -> ok
Types:
Run EDoc on an application located in the specified directory. Tries to automatically set up good defaults. Unless the user specifies otherwise:
See run/2 for details, including options.
See also: application/2.
file(Name::filename()) -> ok
This function is deprecated: See file/2 for details.
Equivalent to file(Name, []).
file(Name, Options) -> ok
Types:
This function is deprecated: This is part of the old interface to EDoc and is mainly kept for backwards compatibility. The preferred way of generating documentation is through one of the functions application/2 and files/2.
Reads a source code file and outputs formatted documentation to a corresponding file.
Options:
See get_doc/2 and layout/2 for further options.
For running EDoc from a Makefile or similar, see edoc_run:file/1.
See also: read/2.
files(Files::[filename()]) -> ok
files(Files, Options) -> ok
Types:
Runs EDoc on a given set of source files. See run/2 for details, including options.
get_doc(File::filename()) -> {module(), edoc_module()}
Equivalent to get_doc(File, []).
get_doc(File, Options) -> R
Types:
Reads a source code file and extracts EDoc documentation data. Note that without an environment parameter (see get_doc/3), hypertext links may not be correct.
Options:
Specifies a set of user-defined EDoc macros. The text substituted for macro calls is specified as either a string() or a function(). The function is called with the macro argument text, the current line number, and the current environment. The fun is to return a string(). See Macro expansion for details.
See read_source/2, read_comments/2 and edoc_lib:get_doc_env/3 for further options.
See also: get_doc/3, layout/2, read/2, run/2, edoc_extract:source/5.
get_doc(File, Env, Options) -> R
Types:
Like get_doc/2, but for a given environment parameter. Env is an environment created by edoc_lib:get_doc_env/3.
layout(Doc::edoc_module()) -> string()
Equivalent to layout(Doc, []).
layout(Doc, Opts) -> string()
Types:
Transforms EDoc module documentation data to text. The default layout creates an HTML document.
Options:
See also: file/2, layout/1, read/2, run/2.
read(File::filename()) -> string()
Equivalent to read(File, []).
read(File, Opts) -> string()
Types:
Reads and processes a source file and returns the resulting EDoc-text as a string. See get_doc/2 and layout/2 for options.
See also: file/2.
read_comments(File::filename()) -> [comment()]
Equivalent to read_comments(File, []).
read_comments(File, Opts) -> [comment()]
Types:
Extracts comments from an Erlang source code file. See the module erl_comment_scan(3erl) for details on the representation of comments. Currently, no options are available.
read_source(Name::filename()) -> [syntaxTree()]
Equivalent to read_source(File, []).
read_source(File, Opts) -> [syntaxTree()]
Types:
Reads an Erlang source file and returns the list of "source code form" syntax trees.
Options:
Normally, preprocessing is not necessary for EDoc to work, but if a file contains too exotic definitions or uses of macros, it will not be possible to read it without preprocessing. Note: comments in included files will not be available to EDoc, even with this option enabled.
See also: erl_syntax(3erl), get_doc/2.
run(Files, Opts) -> ok
Types:
Runs EDoc on a given set of source files. Note that the doclet plugin module has its own particular options; see the doclet option below.
Also see layout/2 for layout-related options, and get_doc/2 for options related to reading source files.
Options:
Subpackage source files are found by recursively searching for source code files in subdirectories of the known source code root directories. (Also see the source_path option.) Directory names must begin with a lowercase letter and contain only alphanumeric characters and underscore, or they will be ignored. (For example, a subdirectory named test-files will not be searched.)
See also: application/2, files/2.
Richard Carlsson <carlsson.richard@gmail.com>
edoc 1.2 |