Commit 5b093e50 authored by Andreas Zwinkau's avatar Andreas Zwinkau

Add 'criterium'

High-level criteria are 'fulfilled' by low-level functionality.
Functionalities are 'tested' by tests.
parent 72e43053
...@@ -4,23 +4,28 @@ ...@@ -4,23 +4,28 @@
% cross referencing % cross referencing
\newcommand\partOf[1]{\AddProperty{doc:partOf}{#1}} \newcommand\partOf[1]{\AddProperty{doc:partOf}{#1}}
\newcommand\tests[1]{\AddProperty{pfl:tests}{#1}} \newcommand\tests[1]{\AddProperty{pfl:tests}{#1}}
\newcommand\fulfills[1]{\AddProperty{pfl:fulfills}{#1}}
\newcommand\testlink[1]{\hyperlink{#1}% \newcommand\testlink[1]{\hyperlink{#1}%
{ \GetProperty{#1}{pfl:tstid} }} { \GetProperty{#1}{pfl:tstid} }}
\newcommand\functionalitylink[1]{\hyperlink{#1}% \newcommand\functionalitylink[1]{\hyperlink{#1}%
{ \GetProperty{#1}{pfl:fncid} }} { \GetProperty{#1}{pfl:fncid} }}
\newcommand\criteriumlink[1]{\hyperlink{#1}%
{ \GetProperty{#1}{pfl:crtid} }}
\newcounter{criterium}
\newcounter{functionality} \newcounter{functionality}
\newcounter{test} \newcounter{test}
% document macros % document macros
\newcommand\test[2]{ \newcommand\criterium[2]{
\stepcounter{test} \stepcounter{criterium}
\par\textbf{T\arabic{test} #1}\rdflabel{#2} \par\textbf{C\arabic{criterium} #1}\rdflabel{#2}
\marginpar{T\arabic{test}} \marginpar{C\arabic{criterium}}
\AddProperty{pfl:tstname}{#1} \AddProperty{pfl:crtname}{#1}
\AddPropertyEx{pfl:tstid}{T\arabic{test}} \AddPropertyEx{pfl:crtid}{C\arabic{criterium}}
Testing: \Bind{#2}{pfl:tests}{?f}{ \functionalitylink{\GetVal{?f}} } Fulfilled by: \Bind{?f}{pfl:fulfills}{#2}{ \functionalitylink{\GetVal{?f}} }
\par} \par}
\newcommand\functionality[2]{ \newcommand\functionality[2]{
\stepcounter{functionality} \stepcounter{functionality}
\par\textbf{F\arabic{functionality} #1}\rdflabel{#2} \par\textbf{F\arabic{functionality} #1}\rdflabel{#2}
...@@ -28,4 +33,14 @@ ...@@ -28,4 +33,14 @@
\AddProperty{pfl:fncname}{#1} \AddProperty{pfl:fncname}{#1}
\AddPropertyEx{pfl:fncid}{F\arabic{functionality}} \AddPropertyEx{pfl:fncid}{F\arabic{functionality}}
Tested by: \Bind{?t}{pfl:tests}{#2}{ \testlink{\GetVal{?t}} } Tested by: \Bind{?t}{pfl:tests}{#2}{ \testlink{\GetVal{?t}} }
Fulfills: \Bind{#2}{pfl:fulfills}{?c}{ \criteriumlink{\GetVal{?c}} }
\par}
\newcommand\test[2]{
\stepcounter{test}
\par\textbf{T\arabic{test} #1}\rdflabel{#2}
\marginpar{T\arabic{test}}
\AddProperty{pfl:tstname}{#1}
\AddPropertyEx{pfl:tstid}{T\arabic{test}}
Testing: \Bind{#2}{pfl:tests}{?f}{ \functionalitylink{\GetVal{?f}} }
\par} \par}
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
\begin{document} \begin{document}
\section{Einleitung}
Wir brauchen ein \LaTeX\ Paket für Pflichtenhefte in PSE.
\section{Kriterien} \section{Kriterien}
\rdflabel{sec:funktionen} \rdflabel{sec:funktionen}
...@@ -22,6 +26,10 @@ ...@@ -22,6 +26,10 @@
\rdflabel{sec:muss} \rdflabel{sec:muss}
\partOf{sec:funktionen} \partOf{sec:funktionen}
\criterium{Querverweise}{crt:crossref}
\criterium{Margin Annotationen}{crt:marginanno}
\subsection{Kann} \subsection{Kann}
\rdflabel{sec:kann} \rdflabel{sec:kann}
\partOf{sec:funktionen} \partOf{sec:funktionen}
...@@ -29,6 +37,7 @@ ...@@ -29,6 +37,7 @@
\section{Funktionen} \section{Funktionen}
\functionality{Foo}{fnc:foo} \functionality{Foo}{fnc:foo}
\fulfills{crt:crossref}
\functionality{Bar}{fnc:bar} \functionality{Bar}{fnc:bar}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment