Skip to content

Commit b51b3c1

Browse files
committed
Add API documentation
1 parent 85a138e commit b51b3c1

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

doc/sphinx/api_manual/API_FFI/C_interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ C interface
44

55
```{todo}
66
Explain how to use the C interface in your program. Point to or show the example in the example directory.
7-
```
7+
```

doc/sphinx/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ developer_manual/start_devel_and_contrib/index
5353
developer_manual/contributing_to_the_documentation/index
5454
developer_manual/contributing_to_the_code/index
5555
developer_manual/developing_for_the_GWB/index
56+
Source code documentation <https://codedocs.xyz/GeodynamicWorldBuilder/WorldBuilder/index.html>
5657
5758
```
5859

include/world_builder/wrapper_c.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@
2222

2323
#include <stdbool.h>
2424

25+
/** @file
26+
* This file contains the C API of the WorldBuilder library.
27+
*
28+
* The C API is used to make the WorldBuilder library available to programs written
29+
* in C. The C API is a set of functions that can be called from C code. The
30+
* functions in the C API call the corresponding C++ functions in the WorldBuilder
31+
* library. Check the content of this file for a list of the available functions and
32+
* their documentation.
33+
*/
34+
2535
#ifdef __cplusplus
2636
extern "C" {
2737
#endif

include/world_builder/wrapper_cpp.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#include <string>
2424
#include "world_builder/deprecate.h"
2525

26+
/**
27+
* This namespace contains the C++ wrapper of the WorldBuilder library.
28+
*/
2629
namespace wrapper_cpp
2730
{
2831
/**

source/world_builder/wrapper_fortran.f90

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
!! along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
!!
1919

20+
!> This module contains the Fortran API of the World Builder library.
21+
!! The Fortran API is used to make the WorldBuilder library available to programs written
22+
!! in Fortran. The Fortran API is a set of functions that can be called from C code. The
23+
!! functions in the C API call the corresponding C++ functions in the WorldBuilder
24+
!! library. Check the content of this module for a list of the available functions and
25+
!! their documentation.
2026
MODULE WorldBuilder
2127
USE, INTRINSIC :: ISO_C_BINDING!, ONLY: C_PTR
2228
IMPLICIT NONE

0 commit comments

Comments
 (0)