File: template_doc_base.m

package info (click to toggle)
opencv 4.10.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 282,092 kB
  • sloc: cpp: 1,178,079; xml: 682,621; python: 49,092; lisp: 31,150; java: 25,469; ansic: 11,039; javascript: 6,085; sh: 1,214; cs: 601; perl: 494; objc: 210; makefile: 173
file content (62 lines) | stat: -rw-r--r-- 2,093 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{% import 'functional.cpp' as functional %}
{{ ('CV.' + fun.name | upper + ' ' + doc.brief | stripTags) | comment(75, '%') | matlabURL }}
%
%   {{ functional.composeMatlab(fun) | upper }}
{% if doc.long %}
{{ doc.long | stripTags | qualify(fun.name) | comment(75, '%   ') | matlabURL }}
{% endif %}
%
{# ----------------------- Returns --------------------- #}
{% if fun.rtp|void|not or fun.req|outputs|length or fun.opt|outputs|length %}
%   Returns:
{% if fun.rtp|void|not %}
%      LVALUE
{% endif %}
{% for arg in fun.req|outputs + fun.opt|outputs %}
{% set uname = arg.name | upper + ('_OUT' if arg.I else '') %}
{% if arg.name in doc.params %}
{{ (uname + ' ' + doc.params[arg.name]) | stripTags | comment(75, '%     ') }}
{% else %}
{{ uname }}
{% endif %}
{% endfor %}
%
{% endif %}
{# ----------------- Required Inputs ------------------- #}
{% if fun.req|inputs|length %}
%   Required Inputs:
{% for arg in fun.req|inputs %}
{% set uname = arg.name | upper + ('_IN' if arg.O else '') %}
{% if arg.name in doc.params %}
{{ (uname + ' ' + doc.params[arg.name]) | stripTags | comment(75, '%     ') }}
{% else %}
{% endif %}
{% endfor %}
%
{% endif %}
{# ------------------ Optional Inputs ------------------- #}
{% if fun.opt|inputs|length %}
%   Optional Inputs:
{% for arg in fun.opt|inputs %}
{% set uname = arg.name | upper + ('_IN' if arg.O else '') + ' (default: ' + arg.default + ')' %}
{% if arg.name in doc.params %}
{{ (uname + ' ' + doc.params[arg.name]) | stripTags | comment(75, '%     ') }}
{% else %}
{{ uname }}
{% endif %}
{% endfor %}
%
{% endif %}
{# ---------------------- See also --------------------- #}
{% if 'seealso' in doc %}
%   See also: {% for item in doc['seealso'] %}
cv.{{ item }}{% if not loop.last %}, {% endif %}
{% endfor %}

%
{% endif %}
{# ----------------------- Online ---------------------- #}
{% set url = 'http://docs.opencv.org/modules/' + doc.module  + '/doc/' + (doc.file|filename) + '.html#' + (fun.name|slugify) %}
%   Online docs: {{ url | matlabURL }}
%   Copyright {{ time.strftime("%Y", time.localtime()) }} The OpenCV Foundation
%