... | ... | @@ -144,8 +144,6 @@ Let us start with a few selected documentation examples from my [CS |
|
|
|
|
|
Doxygen can be used for *C++*. Consider the following Doxygen Example:
|
|
|
|
|
|
\bExample{C++ Doxygen Documentation}
|
|
|
|
|
|
```c++
|
|
|
/**
|
|
|
* Retrieve the value stored in three selected Cells
|
... | ... | @@ -163,15 +161,10 @@ Doxygen can be used for *C++*. Consider the following Doxygen Example: |
|
|
CellTriple get3Cells(int cell1Id, int cell2Id, int cell3Id) const;
|
|
|
```
|
|
|
|
|
|
\eExample
|
|
|
|
|
|
|
|
|
### Java
|
|
|
|
|
|
Javadoc can be used for Java. Consider the following Javadoc Example:
|
|
|
|
|
|
\bExample{Javadoc Documentation}
|
|
|
|
|
|
```java
|
|
|
/**
|
|
|
* Multi-thread Coin Flip.
|
... | ... | @@ -187,15 +180,11 @@ public static FlipTask[] multiThread(long numTrials, int numThreads) |
|
|
throws InterruptedException
|
|
|
```
|
|
|
|
|
|
\eExample
|
|
|
|
|
|
|
|
|
### Python
|
|
|
|
|
|
Pydoc or Sphinx can be used for Python. Consider the following Pydoc Example:
|
|
|
|
|
|
\bExample{Python 3 Pydoc Documentation}
|
|
|
|
|
|
```python3
|
|
|
def parse_raw_temps(original_temps: TextIO,
|
|
|
step_size: int=30, units: bool=True) -> Iterator[Tuple[float, List[float]] ]:
|
... | ... | @@ -212,12 +201,9 @@ def parse_raw_temps(original_temps: TextIO, |
|
|
CPU cores)
|
|
|
"""
|
|
|
```
|
|
|
\eExample
|
|
|
|
|
|
I prefer the Sphinx/Google style for Python.
|
|
|
|
|
|
\bExample{Python 3 Sphinx/Google Style Documentation}
|
|
|
|
|
|
```python3
|
|
|
def parse_raw_temps(original_temps: TextIO,
|
|
|
step_size: int=30, units: bool=True) -> Iterator[Tuple[float, List[float]] ]:
|
... | ... | @@ -236,13 +222,10 @@ def parse_raw_temps(original_temps: TextIO, |
|
|
CPU cores)
|
|
|
"""
|
|
|
```
|
|
|
\eExample
|
|
|
|
|
|
|
|
|
### Rust
|
|
|
|
|
|
\bExample{Rust Documentation}
|
|
|
|
|
|
```rust
|
|
|
///
|
|
|
/// Take a room and change the flooring
|
... | ... | @@ -260,8 +243,6 @@ fn upgrade_flooring(original: &House) -> House { |
|
|
}
|
|
|
```
|
|
|
|
|
|
\eExample
|
|
|
|
|
|
Rust and Python have similar documentation styles (give or take some `markdown`
|
|
|
formatting). Since we only cover small snippets of Rust in this course (for
|
|
|
context), we will forgo a complete
|
... | ... | |