Skip to content
Snippets Groups Projects
Commit 6daa8c10 authored by Steven Palmer's avatar Steven Palmer
Browse files

Updated doxygen tutorial

parent beaf9daf
No related branches found
No related tags found
No related merge requests found
from math import pi
class Circle:
def __init__(self, r):
if r <= 0:
raise ValueError("Radius must be positive.")
self.r = r
def getR(self):
return self.r
def setR(self, r):
self.r = r
def perimeter(self):
return 2 * pi * self.r
def area(self):
return pi * self.r**2
def scale(self, scaleFactor):
if scaleFactor <= 0:
raise ValueError("Scaling factor must be positive.")
self.r *= scaleFactor
\ No newline at end of file
No preview for this file type
......@@ -255,6 +255,25 @@ McMaster University\\ }
\end{itemize}
\end{frame}
% -----------------------------------------------------
\begin{frame}[t,fragile]
\frametitle{Documenting Source Files}
\begin{itemize}
\item At the top of each source file it is good practice
to add some information about authors, date, etc.:
\begin{lstlisting}
## @file File name
# @title Title of source (module name?)
# @author The author(s)
# @date Date of last revision
\end{lstlisting}
\end{itemize}
\end{frame}
% -----------------------------------------------------
\begin{frame}[t,fragile]
\frametitle{Example}
......@@ -263,6 +282,17 @@ McMaster University\\ }
\end{itemize}
\end{frame}
\begin{frame}[t]
\frametitle{Exercise 1}
\begin{block}{Exercise 1: Annotate Circle.py for doxygen}
\begin{itemize}
\item In the T01b exercise folder you will find a small Python file called Circle.py.
\item Add comments for doxygen to this file (you should make annotations for the file itself, the Circle class, and all of the methods in the Circle class).
\item Using the Box3D.py example as a guide might be helpful.
\end{itemize}
\end{block}
\end{frame}
% -----------------------------------------------------
\begin{frame}[t,fragile]
\frametitle{Additional Commands}
......@@ -315,6 +345,35 @@ McMaster University\\ }
\end{itemize}
\end{frame}
\begin{frame}[t]
\frametitle{Exercise 2}
\begin{block}{Exercise 2: Generate doxygen documentation for Circle.py}
Using the information given in the last few slides, create doxygen documentation
for the Circle.py file you annotated in Exercise 1. This will require the following steps:
\begin{enumerate}
\item Generate a new configuration file.
\item Fill in the title and source file information in the configuration file.
\item Run doxygen to generate documentation.
\end{enumerate}
\end{block}
\end{frame}
\begin{frame}[t]
\frametitle{Exercise 3}
\begin{block}{Exercise 3: Add file annotations to A1 source files}
A GitLab repository for assignments has been created for each student in the course (you should have received an invitation to join). You will find this repo on GitLab under the name se2aa4\_cs2me3\_assignments\_2018/<macid>.
\begin{enumerate}
\item Clone your assignment repository using git
\item Add file annotations (see slide 14) to SeqADT.py and CurveADT.py in the A1 src folder
\item Stage your changes using git
\item Commit your change using git
\item Push your changes to GitLab using git
\end{enumerate}
\end{block}
\end{frame}
\begin{frame}[t,fragile]
\frametitle{Reference}
\begin{itemize}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment