mirror of https://github.com/CGAL/cgal
Release 2.1 delivered to CGAL. Includes new manual and lot of changes
since release 1.14.
This commit is contained in:
parent
f1669d20df
commit
931378efec
|
|
@ -69,6 +69,8 @@
|
||||||
% |
|
% |
|
||||||
% | The dimensions \ccFirst and \ccSecond are set to the appropriate
|
% | The dimensions \ccFirst and \ccSecond are set to the appropriate
|
||||||
% | values. Afterwards, the \ccInitWidths does the rest.
|
% | values. Afterwards, the \ccInitWidths does the rest.
|
||||||
|
% | \ccInitFunctionWidths and \ccInitConstructorWidths set the
|
||||||
|
% | \ccFirst and \ccSecond appropriately and call \ccInitWidths afterwards.
|
||||||
% +--------------------------------------------------------------------------
|
% +--------------------------------------------------------------------------
|
||||||
|
|
||||||
\newdimen\ccwIndent
|
\newdimen\ccwIndent
|
||||||
|
|
@ -119,6 +121,21 @@
|
||||||
}
|
}
|
||||||
\ccInitWidths
|
\ccInitWidths
|
||||||
|
|
||||||
|
|
||||||
|
% \ccInitFunctionWidths and \ccInitConstructorWidths set the
|
||||||
|
% \ccFirst and \ccSecond appropriately and call \ccInitWidths afterwards.
|
||||||
|
\newcommand{\ccInitFunctionWidths}{%
|
||||||
|
\ccwFirst =\ccwFunctionFirst
|
||||||
|
\ccwSecond =\ccwFunctionSecond
|
||||||
|
\ccInitWidths
|
||||||
|
}
|
||||||
|
\newcommand{\ccInitConstructorWidths}{%
|
||||||
|
\ccwFirst =\ccwConstructorFirst
|
||||||
|
\ccwSecond =\ccwConstructorSecond
|
||||||
|
\ccInitWidths
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
% define macros for the vertical structuring
|
% define macros for the vertical structuring
|
||||||
% ------------------------------------------
|
% ------------------------------------------
|
||||||
\newcommand{\ccTopSkip}{\smallskip}
|
\newcommand{\ccTopSkip}{\smallskip}
|
||||||
|
|
@ -169,9 +186,10 @@
|
||||||
\newcommand{\ccTagReplaceInclude}{} % true -> include file prefixes
|
\newcommand{\ccTagReplaceInclude}{} % true -> include file prefixes
|
||||||
% are replaced when
|
% are replaced when
|
||||||
% \ccTagReplacePrefix is also true.
|
% \ccTagReplacePrefix is also true.
|
||||||
\newcommand{\ccAlternateThreeColumn}{}% true -> function paramters are aligned
|
\newcommand{\ccLongParamLayout}{} % false -> function parameters are
|
||||||
% below the opening paranthesis, else
|
% aligned below the opening paranthesis,
|
||||||
% they are aligned in a fixed column.
|
% else they are aligned in a fixed
|
||||||
|
% column.
|
||||||
|
|
||||||
% Declaration Layout tags
|
% Declaration Layout tags
|
||||||
\newcommand{\ccTagRmConstRefPair}{} % true -> removes const & pairs
|
\newcommand{\ccTagRmConstRefPair}{} % true -> removes const & pairs
|
||||||
|
|
@ -188,7 +206,7 @@
|
||||||
\def\ccTagChapterAuthor{\ccTrue}%
|
\def\ccTagChapterAuthor{\ccTrue}%
|
||||||
\def\ccTagReplacePrefix{\ccFalse}%
|
\def\ccTagReplacePrefix{\ccFalse}%
|
||||||
\def\ccTagReplaceInclude{\ccFalse}%
|
\def\ccTagReplaceInclude{\ccFalse}%
|
||||||
\def\ccAlternateThreeColumn{\ccTrue}%
|
\def\ccLongParamLayout{\ccFalse}%
|
||||||
% Declaration Layout tags
|
% Declaration Layout tags
|
||||||
\def\ccTagRmTrailingConst{\ccTrue}%
|
\def\ccTagRmTrailingConst{\ccTrue}%
|
||||||
\def\ccTagRmEigenClassName{\ccTrue}%
|
\def\ccTagRmEigenClassName{\ccTrue}%
|
||||||
|
|
@ -196,6 +214,7 @@
|
||||||
\def\ccTagOperatorLayout{\ccTrue}%
|
\def\ccTagOperatorLayout{\ccTrue}%
|
||||||
% portability namings
|
% portability namings
|
||||||
\def\CCalternateThreeColumn{\ccTrue}%
|
\def\CCalternateThreeColumn{\ccTrue}%
|
||||||
|
\def\ccAlternateThreeColumn{\ccTrue}%
|
||||||
}
|
}
|
||||||
|
|
||||||
\newcommand{\ccTagFullDeclarations}{%
|
\newcommand{\ccTagFullDeclarations}{%
|
||||||
|
|
@ -206,6 +225,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
% portability namings
|
% portability namings
|
||||||
|
\newcommand{\ccAlternateThreeColumn}{}% true -> function paramters are aligned
|
||||||
|
% below the opening paranthesis, else
|
||||||
|
% they are aligned in a fixed column.
|
||||||
\newcommand{\CCalternateThreeColumn}{}
|
\newcommand{\CCalternateThreeColumn}{}
|
||||||
|
|
||||||
% activate defaults
|
% activate defaults
|
||||||
|
|
@ -421,9 +443,11 @@
|
||||||
% +--------------------------------------------------------------------------
|
% +--------------------------------------------------------------------------
|
||||||
% #1 the macro name for the RCS entry
|
% #1 the macro name for the RCS entry
|
||||||
% #2 the RCS entry
|
% #2 the RCS entry
|
||||||
\newcommand{\RCSdef}{\begingroup\catcode`\$=12 \RCSdefSet}
|
\newcommand{\RCSdef}{}
|
||||||
|
\def\RCSdef{\begingroup\catcode`\$=12 \RCSdefSet}
|
||||||
{ \catcode`\$=12
|
{ \catcode`\$=12
|
||||||
\gdef\RCSdefSet #1$#2${\gdef#1{#2}\endgroup}%
|
\gdef\RCSdefSetX #1$#2${\gdef#1{#2}}%
|
||||||
|
\gdef\RCSdefSet #1#2{\RCSdefSetX{#1}#2\endgroup}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% +--------------------------------------------------------------------------
|
% +--------------------------------------------------------------------------
|
||||||
|
|
@ -623,22 +647,9 @@
|
||||||
\renewcommand{\ccVar}{}%
|
\renewcommand{\ccVar}{}%
|
||||||
}
|
}
|
||||||
|
|
||||||
\def\ccClassX #1{%
|
\def\ccClassX #1{% There is no longer a check whether the class has template
|
||||||
|
% parameters or not.
|
||||||
\endgroup
|
\endgroup
|
||||||
\ccClassXX #1<\end}
|
|
||||||
|
|
||||||
|
|
||||||
\def\ccClassXX #1<#2\end{%
|
|
||||||
\def\xparams{#2}\ifx\xparams\empty
|
|
||||||
\ccClassXXX{#1}%
|
|
||||||
\else
|
|
||||||
\errmessage{Template parameters are not allowed
|
|
||||||
in a normal class. Use \begin{classtemplate}
|
|
||||||
instead}>%
|
|
||||||
\ccClassXXX{#1<???>}%
|
|
||||||
\fi}
|
|
||||||
|
|
||||||
\def\ccClassXXX #1{%
|
|
||||||
\def\ccPureClassName{#1}%
|
\def\ccPureClassName{#1}%
|
||||||
\def\ccPureClassTemplateName{#1}%
|
\def\ccPureClassTemplateName{#1}%
|
||||||
\renewcommand{\ccClassName}{\hbox{{\ccFont
|
\renewcommand{\ccClassName}{\hbox{{\ccFont
|
||||||
|
|
@ -667,7 +678,7 @@
|
||||||
|
|
||||||
\def\ccClassTemplateXX #1<#2\end{%
|
\def\ccClassTemplateXX #1<#2\end{%
|
||||||
\def\xparams{#2}\ifx\xparams\empty
|
\def\xparams{#2}\ifx\xparams\empty
|
||||||
\errmessage{Template parameters missed for
|
\errmessage{Template parameters missing for
|
||||||
class template}>%
|
class template}>%
|
||||||
\ccClassTemplateXXX{#1}<???><\end%
|
\ccClassTemplateXXX{#1}<???><\end%
|
||||||
\else
|
\else
|
||||||
|
|
@ -764,9 +775,7 @@
|
||||||
\ccNestedTypeXX{#1}}%
|
\ccNestedTypeXX{#1}}%
|
||||||
}
|
}
|
||||||
\long\def\ccNestedTypeXX #1#2{%
|
\long\def\ccNestedTypeXX #1#2{%
|
||||||
\ccwFirst =\ccwConstructorFirst
|
\ccInitConstructorWidths
|
||||||
\ccwSecond =\ccwConstructorSecond
|
|
||||||
\ccInitWidths
|
|
||||||
\setbox\returntypebox=\hbox{}%
|
\setbox\returntypebox=\hbox{}%
|
||||||
\setbox\callnamebox=\hbox{\ccClassTemplateName
|
\setbox\callnamebox=\hbox{\ccClassTemplateName
|
||||||
\ccFont\ccPrintTokens ::\end}%
|
\ccFont\ccPrintTokens ::\end}%
|
||||||
|
|
@ -1061,16 +1070,16 @@
|
||||||
\else\isLastAlphaX #1\end
|
\else\isLastAlphaX #1\end
|
||||||
\fi}
|
\fi}
|
||||||
\def\isLastAlphaX #1#2\end{%
|
\def\isLastAlphaX #1#2\end{%
|
||||||
\def\xbody{\isLastAlphaX #2\end}%
|
\def\xqqbody{\isLastAlphaX #2\end}%
|
||||||
\isLetterX #1\end
|
\isLetterX #1\end
|
||||||
\def\qqparams{#2}\ifx\qqparams\empty\let\xnext=\relax
|
\def\qqparams{#2}\ifx\qqparams\empty\let\xqqnext=\relax
|
||||||
\else\isEmpty{#2}\ifnum\ccBool=\ccTrue \ccInvert
|
\else\isEmpty{#2}\ifnum\ccBool=\ccTrue \ccInvert
|
||||||
\let\xnext=\relax
|
\let\xqqnext=\relax
|
||||||
\else
|
\else
|
||||||
\let\xnext=\xbody
|
\let\xqqnext=\xqqbody
|
||||||
\fi
|
\fi
|
||||||
\fi
|
\fi
|
||||||
\xnext}
|
\xqqnext}
|
||||||
|
|
||||||
% This macro gets a complete C++ declaration for an operator and has to
|
% This macro gets a complete C++ declaration for an operator and has to
|
||||||
% decide weather it is the parenthesis () operator declaration or not.
|
% decide weather it is the parenthesis () operator declaration or not.
|
||||||
|
|
@ -1119,9 +1128,7 @@
|
||||||
\ccSeparateTemplate{\ccTemplateLine}{%
|
\ccSeparateTemplate{\ccTemplateLine}{%
|
||||||
\constructorcall{#1}}#2(#3)#4\end
|
\constructorcall{#1}}#2(#3)#4\end
|
||||||
\else
|
\else
|
||||||
\ccwFirst =\ccwConstructorFirst
|
\ccInitConstructorWidths
|
||||||
\ccwSecond =\ccwConstructorSecond
|
|
||||||
\ccInitWidths
|
|
||||||
\setbox\callnamebox=\hbox{%
|
\setbox\callnamebox=\hbox{%
|
||||||
\ccClassTemplateName\ \ \ccFont\ccVar}%
|
\ccClassTemplateName\ \ \ccFont\ccVar}%
|
||||||
\setbox\functioncallbox=\hbox{\unhcopy\callnamebox
|
\setbox\functioncallbox=\hbox{\unhcopy\callnamebox
|
||||||
|
|
@ -1146,9 +1153,7 @@
|
||||||
% has to be from the original call notation. The 7th parameter is there
|
% has to be from the original call notation. The 7th parameter is there
|
||||||
% to check for this ";".
|
% to check for this ";".
|
||||||
\def\ccFunctionCall #1#2#3 #4(#5)#6;#7\end{%
|
\def\ccFunctionCall #1#2#3 #4(#5)#6;#7\end{%
|
||||||
\ccwFirst =\ccwFunctionFirst
|
\ccInitFunctionWidths
|
||||||
\ccwSecond =\ccwFunctionSecond
|
|
||||||
\ccInitWidths
|
|
||||||
\def\xparam{#7}\ifx\xparam\empty
|
\def\xparam{#7}\ifx\xparam\empty
|
||||||
\errmessage{Missing ";" at the end of the
|
\errmessage{Missing ";" at the end of the
|
||||||
declaration. A method or function
|
declaration. A method or function
|
||||||
|
|
@ -1209,9 +1214,7 @@
|
||||||
% has to be from the original call notation. The 4th parameter is there
|
% has to be from the original call notation. The 4th parameter is there
|
||||||
% to check for this ";".
|
% to check for this ";".
|
||||||
\def\ccVariableDeclaration #1#2 #3;#4\end{%
|
\def\ccVariableDeclaration #1#2 #3;#4\end{%
|
||||||
\ccwFirst =\ccwFunctionFirst
|
\ccInitFunctionWidths
|
||||||
\ccwSecond =\ccwFunctionSecond
|
|
||||||
\ccInitWidths
|
|
||||||
\def\xparam{#4}\ifx\xparam\empty
|
\def\xparam{#4}\ifx\xparam\empty
|
||||||
\errmessage{Missing ";" at the end of the
|
\errmessage{Missing ";" at the end of the
|
||||||
declaration. A variable, typedef, or constant
|
declaration. A variable, typedef, or constant
|
||||||
|
|
@ -1245,9 +1248,7 @@
|
||||||
% o The 4th parameter contains an optional variable name.
|
% o The 4th parameter contains an optional variable name.
|
||||||
% The declaration has to be terminated with "\end".
|
% The declaration has to be terminated with "\end".
|
||||||
\def\ccEnumDeclaration #1#2\{#3\}#4\end {%
|
\def\ccEnumDeclaration #1#2\{#3\}#4\end {%
|
||||||
\ccwFirst =\ccwConstructorFirst
|
\ccInitConstructorWidths
|
||||||
\ccwSecond =\ccwConstructorSecond
|
|
||||||
\ccInitWidths
|
|
||||||
\setbox\returntypebox=\hbox{}%
|
\setbox\returntypebox=\hbox{}%
|
||||||
\setbox\callnamebox=\hbox{\ccFont\ccPrintTokens #2\end}%
|
\setbox\callnamebox=\hbox{\ccFont\ccPrintTokens #2\end}%
|
||||||
\setbox\functioncallbox=\hbox{\ccFont
|
\setbox\functioncallbox=\hbox{\ccFont
|
||||||
|
|
@ -1287,11 +1288,14 @@
|
||||||
\ifdim\wd\functioncallbox>\ccwSecondLong
|
\ifdim\wd\functioncallbox>\ccwSecondLong
|
||||||
% Operators are assumed to fit in \ccwSecondLong.
|
% Operators are assumed to fit in \ccwSecondLong.
|
||||||
% Otherwise, they are formatted as functions.
|
% Otherwise, they are formatted as functions.
|
||||||
\ccBool=\ccAlternateThreeColumn
|
\ccBool=\ccLongParamLayout
|
||||||
\ifnum\ccBool=\ccTrue
|
\ifnum\ccBool=\ccFalse
|
||||||
\ccBool=\CCalternateThreeColumn
|
\ccBool=\ccAlternateThreeColumn \ccInvert
|
||||||
\fi
|
\fi
|
||||||
\ifnum\ccBool=\ccTrue
|
\ifnum\ccBool=\ccFalse
|
||||||
|
\ccBool=\CCalternateThreeColumn \ccInvert
|
||||||
|
\fi
|
||||||
|
\ifnum\ccBool=\ccFalse
|
||||||
% Switches ext. format ON.
|
% Switches ext. format ON.
|
||||||
{\setbox0=\hbox{\ccFont\unhcopy\callnamebox
|
{\setbox0=\hbox{\ccFont\unhcopy\callnamebox
|
||||||
#1 }%
|
#1 }%
|
||||||
|
|
@ -1395,17 +1399,17 @@
|
||||||
\ccPrintTokens #2\end}}%
|
\ccPrintTokens #2\end}}%
|
||||||
\else
|
\else
|
||||||
\def\xparams{#1}\ifx\xparams\empty
|
\def\xparams{#1}\ifx\xparams\empty
|
||||||
\if#3&%
|
\ifx#3&%
|
||||||
\ccSeparateFunctionXX{#2#3}#4\end%
|
\ccSeparateFunctionXX{#2#3}#4\end%
|
||||||
\else\if#3*%
|
\else\ifx#3*%
|
||||||
\ccSeparateFunctionXX{#2#3}#4\end%
|
\ccSeparateFunctionXX{#2#3}#4\end%
|
||||||
\else
|
\else
|
||||||
\ccSeparateFunctionXX{#2 }#3#4\end%
|
\ccSeparateFunctionXX{#2 }#3#4\end%
|
||||||
\fi\fi
|
\fi\fi
|
||||||
\else
|
\else
|
||||||
\if#3&%
|
\ifx#3&%
|
||||||
\ccSeparateFunctionXX{#1#2#3}#4\end%
|
\ccSeparateFunctionXX{#1#2#3}#4\end%
|
||||||
\else\if#3*%
|
\else\ifx#3*%
|
||||||
\ccSeparateFunctionXX{#1#2#3}#4\end%
|
\ccSeparateFunctionXX{#1#2#3}#4\end%
|
||||||
\else
|
\else
|
||||||
\ccSeparateFunctionXX{#1#2 }#3#4\end%
|
\ccSeparateFunctionXX{#1#2 }#3#4\end%
|
||||||
|
|
@ -1471,10 +1475,10 @@
|
||||||
|
|
||||||
\def\ccPrintSingleTokenX #1#2\end{%CCtrue
|
\def\ccPrintSingleTokenX #1#2\end{%CCtrue
|
||||||
\ccPrintChar #1%
|
\ccPrintChar #1%
|
||||||
\def\xbody{\ccPrintSingleTokenX #2\end}%
|
\def\xqabody{\ccPrintSingleTokenX #2\end}%
|
||||||
\isEmpty{#2}\ifnum\ccBool=\ccTrue \let\xnext=\relax
|
\isEmpty{#2}\ifnum\ccBool=\ccTrue \let\xqanext=\relax
|
||||||
\else\let\xnext=\xbody\fi
|
\else\let\xqanext=\xqabody\fi
|
||||||
\xnext}
|
\xqanext}
|
||||||
|
|
||||||
% Print C++ tokens (separated with spaces). Skip leading spaces.
|
% Print C++ tokens (separated with spaces). Skip leading spaces.
|
||||||
% The tokens have to be delimited by "\end".
|
% The tokens have to be delimited by "\end".
|
||||||
|
|
@ -1486,14 +1490,14 @@
|
||||||
}
|
}
|
||||||
\def\ccPrintTokensX #1#2\end{%
|
\def\ccPrintTokensX #1#2\end{%
|
||||||
\ccPrintChar #1%
|
\ccPrintChar #1%
|
||||||
\def\xbody{\ccPrintTokensX #2\end}%
|
\def\xqbody{\ccPrintTokensX #2\end}%
|
||||||
\isEmpty{#2}\ifnum\ccBool=\ccTrue
|
\isEmpty{#2}\ifnum\ccBool=\ccTrue
|
||||||
\let\xnext=\relax
|
\let\xqnext=\relax
|
||||||
\else
|
\else
|
||||||
\compareAndCopySpace{#2}#2\end
|
\compareAndCopySpace{#2}#2\end
|
||||||
\let\xnext=\xbody
|
\let\xqnext=\xqbody
|
||||||
\fi
|
\fi
|
||||||
\xnext}
|
\xqnext}
|
||||||
|
|
||||||
|
|
||||||
% +--------------------------------------------------------------------------
|
% +--------------------------------------------------------------------------
|
||||||
|
|
@ -1839,7 +1843,8 @@
|
||||||
\if,#2%
|
\if,#2%
|
||||||
\ifnum\nestinglevel=0
|
\ifnum\nestinglevel=0
|
||||||
\advance\NParameters by1
|
\advance\NParameters by1
|
||||||
\ifnum\NParameters=1 \setbox\parameterX=%
|
\ifnum\NParameters=1 %
|
||||||
|
\setbox\parameterX=%
|
||||||
\hbox{\ccPrintParameter #1const.&.\end}%
|
\hbox{\ccPrintParameter #1const.&.\end}%
|
||||||
\def\xxxbody{\ccExtractParamListX{}#3\end}%
|
\def\xxxbody{\ccExtractParamListX{}#3\end}%
|
||||||
\else\advance\NParameters by1
|
\else\advance\NParameters by1
|
||||||
|
|
@ -1903,84 +1908,68 @@
|
||||||
% The parameter parsing macros counts the nesting level of
|
% The parameter parsing macros counts the nesting level of
|
||||||
% template parameter instantiations.
|
% template parameter instantiations.
|
||||||
\newcount\nestinglevel
|
\newcount\nestinglevel
|
||||||
\newcount\xnestinglevel
|
|
||||||
|
|
||||||
% Print a parameter where "const ...&" pairs are eliminated. Strips a
|
% Print a parameter where "const ...&" pairs are eliminated. Strips a
|
||||||
% leading type that equals the \ccClassName. It is a four step process:
|
% type that equals the \ccPureClassName. It is a nested macro definition.
|
||||||
% 1. strip all in front of a "<" character.
|
% It uses the \ccPureClassName to build a matching pattern to detect a
|
||||||
% 2. extract the leading token without any space in it to decide,
|
% possible type name to be eliminated. Similar solution as \ccReplacePrefix.
|
||||||
% weather the type given is a templated type or not.
|
% If the function argument is empty, \ccEmptyParameter is printed.
|
||||||
% 3. Compare the leading token with \ccClassName
|
|
||||||
% 4. If true, strip the possible following template parameter.
|
|
||||||
% The parameter has to be delimited with "<>\end".
|
% The parameter has to be delimited with "<>\end".
|
||||||
% Ignore leading spaces.
|
% Ignore leading spaces.
|
||||||
\def\ccPrintOwnClassParameter #1#2<#3#4\end{%
|
\def\ccPrintOwnClassParameter #1#2<>\end{%
|
||||||
\ifnum\ccTagRmEigenClassName=\ccFalse
|
\ifnum\ccTagRmEigenClassName=\ccFalse
|
||||||
\ccPrintOwnClassXQX #1#2<#3#4\end%
|
\ccPrintTokens #1#2\end%
|
||||||
\else
|
\else
|
||||||
\ifx\ccPureTemplateParameters\empty
|
\ifx\ccPureClassName\empty
|
||||||
\if>#3%
|
\ccPrintTokens #1#2\end%
|
||||||
\ccPrintOwnClassX #1#2 \end% no template case
|
|
||||||
\else
|
\else
|
||||||
\ccPrintOwnClassXQX #1#2<#3#4\end%
|
\isEmpty{#2}\ifnum\ccBool=\ccTrue
|
||||||
\fi
|
\ccPrintTokens #1\end% A complete hack. Necessary to work together
|
||||||
\else\if>#3%
|
% with the operator example. Otherwise a def is not working
|
||||||
\ccPrintOwnClassX #1#2 \end% no template case
|
% (totally obscure errormessage). However, I do not understand
|
||||||
|
% what is going on, I assume that the special case of a member
|
||||||
|
% function, where the first argument is \ccVar, causes the trouble.
|
||||||
|
% This special case is checked here.
|
||||||
\else
|
\else
|
||||||
\ccPrintOwnClassXX{#1#2}<#3#4\end% template case ?
|
\edef\ccOwnClassPair{{\ccPureClassName}{#1#2\ccPureClassName}}%
|
||||||
|
\expandafter\ccPrintOwnClassParameterX\ccOwnClassPair
|
||||||
\fi\fi
|
\fi\fi
|
||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
\def\ccPrintOwnClassXQX #1#2<>\end{% strip the unneccessary <> from the end
|
|
||||||
\ccPrintTokens #1#2\end}
|
% Does the actual work: #1 is the \ccPureClassName
|
||||||
\def\ccPrintOwnClassX #1 #2\end{% check for \ccClassName
|
% #2 is the text to process with the \ccPureClassName
|
||||||
\def\xparams{#1}\ifx\xparams\ccPureClassName
|
% appended at the end
|
||||||
\isEmpty{#2}\ifnum\ccBool=\ccTrue
|
\def\ccPrintOwnClassParameterX #1#2{%
|
||||||
|
% local macro to do the parsing: ##1 is the text before \ccPureClassName
|
||||||
|
% ##2 is the text after \ccPureClassName
|
||||||
|
\def\ccRepOwnClass ##1#1##2\end{%
|
||||||
|
\isEmpty{##2}\ifnum\ccBool=\ccTrue
|
||||||
|
% normal case, \ccPureClassName is not in the argument.
|
||||||
|
\ccPrintTokens ##1\end%
|
||||||
|
\else
|
||||||
|
% \ccPureClassName is in the argument.
|
||||||
|
\ccRepOwnClassX ##1##2\end%
|
||||||
|
\fi
|
||||||
|
}%
|
||||||
|
% local macro to remove the trailing \ccPureClassName.
|
||||||
|
% If the function argument is empty, print \ccEmptyParameter.
|
||||||
|
% ##1 is the text before \ccPureClassName
|
||||||
|
\def\ccRepOwnClassX ##1#1\end{%
|
||||||
|
\isEmpty{##1}\ifnum\ccBool=\ccTrue
|
||||||
\ccEmptyParameter
|
\ccEmptyParameter
|
||||||
\else
|
\else
|
||||||
\ccPrintTokens #2\end%
|
\ccPrintTokens ##1\end% \ccRepOwnClassXX was superfluous here.
|
||||||
\fi
|
\fi
|
||||||
\else
|
}%
|
||||||
\ccPrintTokens #1 #2\end%
|
% local macro to remove leading spaces.
|
||||||
\fi}
|
% ##1##2 is the (non empty) argument without leading spaces.
|
||||||
\def\ccPrintOwnClassXX #1#2<>\end{% strip the unneccessary <> from the end
|
%\def\ccRepOwnClassXX ##1##2\end{%
|
||||||
\ccPrintOwnClassXXX {#2}#1 \end}
|
% \ccPrintTokens ##1##2\end%
|
||||||
\def\ccPrintOwnClassXXX #1#2 #3\end{%
|
%}%
|
||||||
% check \ccClassName in the possible template case
|
% apply the local macro
|
||||||
% #1 is the parameter tail starting with the template params
|
\ccRepOwnClass #2\end%
|
||||||
% #2 is the leading class name
|
}
|
||||||
% #3 is inbetween and should be empty
|
|
||||||
\def\qqparams{#3}\ifx\qqparams\empty
|
|
||||||
\def\xparams{#2}\ifx\xparams\ccPureClassName
|
|
||||||
\xnestinglevel=0
|
|
||||||
\ccPrintOwnClassXXXX #1\end% strip the template parameters
|
|
||||||
\else
|
|
||||||
\ccPrintTokens #2#1\end% nothing stripped
|
|
||||||
\fi
|
|
||||||
\else
|
|
||||||
\ccPrintTokens #2\ \end
|
|
||||||
\ccPrintOwnClassXXX {#1}#3\end
|
|
||||||
\fi}
|
|
||||||
\def\ccPrintOwnClassXXXX #1#2\end{% strip a leading template parameter
|
|
||||||
\if<#1\advance\xnestinglevel by1 \fi
|
|
||||||
\if>#1\advance\xnestinglevel by-1 \fi
|
|
||||||
\ifnum\xnestinglevel=0
|
|
||||||
\isEmpty{#2}\ifnum\ccBool=\ccTrue
|
|
||||||
\ccEmptyParameter
|
|
||||||
\else
|
|
||||||
\ccPrintTokens #2\end%
|
|
||||||
\fi
|
|
||||||
\let\xnext=\relax
|
|
||||||
\else
|
|
||||||
\def\xparams{#2}%
|
|
||||||
\ifx\xparams\empty
|
|
||||||
\errmessage{Mismatching angles in template
|
|
||||||
parameter list}%
|
|
||||||
\fi
|
|
||||||
\def\xbody{\ccPrintOwnClassXXXX #2\end}%
|
|
||||||
\let\xnext=\xbody
|
|
||||||
\fi
|
|
||||||
\xnext}
|
|
||||||
|
|
||||||
|
|
||||||
% Print a C++ function or method parameter. Strips a matching
|
% Print a C++ function or method parameter. Strips a matching
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue