mirror of https://github.com/CGAL/cgal
Added @commentheading keyword
This commit is contained in:
parent
af51cec326
commit
153ceb6c26
|
|
@ -44,8 +44,8 @@ my @placeholders = (
|
||||||
'[Ss]ome(\\\\_\w+)+[,\.]',
|
'[Ss]ome(\\\\_\w+)+[,\.]',
|
||||||
);
|
);
|
||||||
|
|
||||||
# Conversion table from clear text to macro names
|
# Conversion table from clear text to \ccHeading macros
|
||||||
my %macro_names = (
|
my %heading_names = (
|
||||||
'\ccHeading{Has Models}' => '\ccHasModels',
|
'\ccHeading{Has Models}' => '\ccHasModels',
|
||||||
'\ccHeading{Is Model for the Concepts}' => '\ccIsModel',
|
'\ccHeading{Is Model for the Concepts}' => '\ccIsModel',
|
||||||
'\ccHeading{Design Pattern}' => '\ccHeading{Design Pattern}',
|
'\ccHeading{Design Pattern}' => '\ccHeading{Design Pattern}',
|
||||||
|
|
@ -59,6 +59,11 @@ my %macro_names = (
|
||||||
# '\ccHeading{Parameters}' => '\ccParameters', # processed separately
|
# '\ccHeading{Parameters}' => '\ccParameters', # processed separately
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# Conversion table from clear text to \ccCommentHeading macros
|
||||||
|
my %comment_heading_names = (
|
||||||
|
'\ccCommentHeading{Precondition}' => '\ccPrecond',
|
||||||
|
);
|
||||||
|
|
||||||
# Warning sentence before automatically generated sections
|
# Warning sentence before automatically generated sections
|
||||||
my $warning = "% The section below is automatically generated. Do not edit!";
|
my $warning = "% The section below is automatically generated. Do not edit!";
|
||||||
|
|
||||||
|
|
@ -355,8 +360,8 @@ sub keep_only_if_function
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Convert clear text to macro name
|
# Convert clear text to \ccHeading and \ccSubHeading macros
|
||||||
# Param: heading name in doxygen latex doc, of the form "Heading ...:" or "Subheading ..."
|
# Param: macro name in doxygen latex doc, of the form "Heading ...:" or "Subheading ..."
|
||||||
# Return value: the formatted macro name
|
# Return value: the formatted macro name
|
||||||
sub convert_heading_name
|
sub convert_heading_name
|
||||||
{
|
{
|
||||||
|
|
@ -367,8 +372,27 @@ sub convert_heading_name
|
||||||
$heading =~ s/^Subheading (.*?):?$/\\ccSubHeading\{$1\}/;
|
$heading =~ s/^Subheading (.*?):?$/\\ccSubHeading\{$1\}/;
|
||||||
|
|
||||||
# Use CGAL Manual shortcut if available
|
# Use CGAL Manual shortcut if available
|
||||||
if (defined($macro_names{$heading})) {
|
if (defined($heading_names{$heading})) {
|
||||||
$heading = $macro_names{$heading};
|
$heading = $heading_names{$heading};
|
||||||
|
}
|
||||||
|
|
||||||
|
return $heading;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Convert clear text to \ccCommentHeading macros
|
||||||
|
# Param: macro name in doxygen latex doc, of the form "CommentHeading ...:"
|
||||||
|
# Return value: the formatted macro name
|
||||||
|
sub convert_comment_heading_name
|
||||||
|
{
|
||||||
|
my $heading = shift;
|
||||||
|
|
||||||
|
# Convert to \ccHeading or \subsubsection
|
||||||
|
$heading =~ s/^CommentHeading (.*?):$/\\ccCommentHeading\{$1\}/;
|
||||||
|
|
||||||
|
# Use CGAL Manual shortcut if available
|
||||||
|
if (defined($comment_heading_names{$heading})) {
|
||||||
|
$heading = $comment_heading_names{$heading};
|
||||||
}
|
}
|
||||||
|
|
||||||
return $heading;
|
return $heading;
|
||||||
|
|
@ -384,8 +408,8 @@ sub extented_format_headings
|
||||||
# Get parameter: buffer containing a doxygen-generated latex file
|
# Get parameter: buffer containing a doxygen-generated latex file
|
||||||
my $buf = shift;
|
my $buf = shift;
|
||||||
|
|
||||||
# Extract @headings sections from from detailed section.
|
# Extract @heading sections from from detailed section.
|
||||||
# @heading is in fact an alias to "Heading".
|
# - @heading is in fact an alias to "Heading".
|
||||||
# - the macro name starts at "Heading" and ends with ":".
|
# - the macro name starts at "Heading" and ends with ":".
|
||||||
# - the macro content lies on a unique line, except lists.
|
# - the macro content lies on a unique line, except lists.
|
||||||
# Doxygen may concat lines, thus we also stop at the first dot.
|
# Doxygen may concat lines, thus we also stop at the first dot.
|
||||||
|
|
@ -660,6 +684,11 @@ sub format_doxygen_class_doc
|
||||||
# Rename \ccNestedType, \ccEnum, \ccConstructor, \ccMethod, \ccVariable expressions
|
# Rename \ccNestedType, \ccEnum, \ccConstructor, \ccMethod, \ccVariable expressions
|
||||||
$buf = format_curly_brace_pairs_expressions($className, "class/struct/concept", $buf);
|
$buf = format_curly_brace_pairs_expressions($className, "class/struct/concept", $buf);
|
||||||
|
|
||||||
|
# Convert @commentheading sections [L. Saboret + S. Hornus extension]
|
||||||
|
# - @commentheading is in fact an alias to "CommentHeading".
|
||||||
|
# - the macro name starts at "CommentHeading" and ends with ":".
|
||||||
|
$buf =~ s/(CommentHeading.*?:)/convert_comment_heading_name($1)/smge;
|
||||||
|
|
||||||
# Remove CGAL:: prefix (implicit)
|
# Remove CGAL:: prefix (implicit)
|
||||||
$buf =~ s/CGAL::(\w+)/$1/g;
|
$buf =~ s/CGAL::(\w+)/$1/g;
|
||||||
|
|
||||||
|
|
@ -755,6 +784,11 @@ sub format_doxygen_function_doc
|
||||||
# Rename \ccFunction expressions
|
# Rename \ccFunction expressions
|
||||||
$buf = format_curly_brace_pairs_expressions($functionName, "function", $buf);
|
$buf = format_curly_brace_pairs_expressions($functionName, "function", $buf);
|
||||||
|
|
||||||
|
# Convert @commentheading sections [L. Saboret + S. Hornus extension].
|
||||||
|
# - @commentheading is in fact an alias to "CommentHeading".
|
||||||
|
# - the macro name starts at "CommentHeading" and ends with ":".
|
||||||
|
$buf =~ s/(CommentHeading.*?:)/convert_comment_heading_name($1)/smge;
|
||||||
|
|
||||||
# Remove CGAL:: prefix (implicit)
|
# Remove CGAL:: prefix (implicit)
|
||||||
$buf =~ s/CGAL::(\w+)/$1/g;
|
$buf =~ s/CGAL::(\w+)/$1/g;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@ DISTRIBUTE_GROUP_DOC = NO
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
TAB_SIZE = 4
|
TAB_SIZE = 4
|
||||||
ALIASES = "subheading=@name Subheading" \
|
ALIASES = "subheading=@name Subheading" \
|
||||||
heading=Heading
|
heading=Heading \
|
||||||
|
commentheading=CommentHeading
|
||||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
BUILTIN_STL_SUPPORT = YES
|
BUILTIN_STL_SUPPORT = YES
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue