Skip to content

Commit 03cd55a

Browse files
authored
Merge pull request #654 from ax3l/doc-doxygenWarnings
Doxygen: Fix Many Warnings
2 parents b58a3a5 + a808055 commit 03cd55a

17 files changed

+140
-26
lines changed

.github/workflows/source.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ on: [push, pull_request]
44

55
jobs:
66
style:
7-
87
runs-on: ubuntu-latest
9-
108
steps:
119
- uses: actions/checkout@v1
1210
- name: TABs
1311
run: .github/workflows/source/hasTabs
1412
- name: End-of-Line whitespaces
1513
run: .github/workflows/source/hasEOLwhiteSpace
14+
15+
documentation:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Install
20+
run: sudo apt-get install -y --no-install-recommends doxygen
21+
- name: Doxygen
22+
run: .github/workflows/source/buildDoxygen

.github/workflows/source/buildDoxygen

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2020 Axel Huebl
4+
#
5+
# License: LGPLv3+
6+
7+
# search recursive inside a folder if a file contains tabs
8+
#
9+
# @result 0 if no files are found, else 1
10+
#
11+
12+
set -eu -o pipefail
13+
14+
cd docs
15+
echo "WARN_AS_ERROR = YES" >> Doxyfile
16+
doxygen

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ if(openPMD_HAVE_PYTHON)
532532
src/binding/python/RecordComponent.cpp
533533
src/binding/python/MeshRecordComponent.cpp
534534
src/binding/python/Series.cpp
535+
src/binding/python/UnitDimension.cpp
535536
)
536537
target_link_libraries(openPMD.py PRIVATE openPMD)
537538

docs/Doxyfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
PROJECT_NAME = "openPMD-api"
22
XML_OUTPUT = xml
3-
INPUT = ../
4-
EXCLUDE_PATTERNS = */share/openPMD/thirdParty/*
3+
INPUT = ../src ../include
4+
EXCLUDE_PATTERNS = *CommonADIOS1IOHandler.cpp *benchmark*
5+
6+
# TAGFILES += "cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/"
7+
BUILTIN_STL_SUPPORT = YES
8+
59
GENERATE_LATEX = NO
610
GENERATE_MAN = NO
711
GENERATE_RTF = NO
@@ -14,13 +18,17 @@ JAVADOC_AUTOBRIEF = YES
1418
USE_MDFILE_AS_MAINPAGE = README.md
1519

1620
# "enable" all frontends and backends
17-
PREDEFINED = openPMD_HAVE_MPI=1 \
21+
MACRO_EXPANSION = YES
22+
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \
23+
openPMD_HAVE_MPI=1 \
1824
openPMD_HAVE_HDF5=1 \
1925
openPMD_HAVE_ADIOS1=1 \
2026
openPMD_HAVE_ADIOS2=1 \
2127
openPMD_HAVE_PYTHON=1 \
2228
OPENPMD_private:=private \
23-
OPENPMD_protected:=protected
29+
OPENPMD_protected:=protected \
30+
__attribute__(x)= \
31+
__declspec(x)=
2432

2533
# ideally, you want to warn on missing doc coverage!
2634
WARN_IF_UNDOCUMENTED = NO

include/openPMD/IO/ADIOS/ADIOS2IOHandler.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ class ADIOS2IOHandlerImpl
223223

224224
/**
225225
* @brief nameOfAttribute
226-
* @param The Writable at whose level the attribute lies.
227-
* @param The openPMD name of the attribute.
226+
* @param writable The Writable at whose level the attribute lies.
227+
* @param attribute The openPMD name of the attribute.
228228
* @return The ADIOS2 name of the attribute, consisting of
229229
* the variable that the attribute is associated with
230230
* (possibly the empty string, representing no variable)

include/openPMD/IO/AbstractIOHandlerImplCommon.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class AbstractIOHandlerImplCommon : public AbstractIOHandlerImpl
9797
/**
9898
* Figure out the file position of the writable and extend it.
9999
* @param writable The writable.
100-
* @param write The extension string.
100+
* @param extend The extension string.
101101
* @return The current file position.
102102
*/
103103
virtual std::shared_ptr< FilePositionType >

include/openPMD/UnitDimension.hpp

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* Copyright 2020 Axel Huebl
2+
*
3+
* This file is part of openPMD-api.
4+
*
5+
* openPMD-api is free software: you can redistribute it and/or modify
6+
* it under the terms of of either the GNU General Public License or
7+
* the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* openPMD-api is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License and the GNU Lesser General Public License
15+
* for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* and the GNU Lesser General Public License along with openPMD-api.
19+
* If not, see <http://www.gnu.org/licenses/>.
20+
*/
21+
#pragma once
22+
23+
#include <cstdint>
24+
25+
26+
namespace openPMD
27+
{
28+
/** Physical dimension of a record
29+
*
30+
* Dimensional base quantities of the international system of quantities
31+
*/
32+
enum class UnitDimension : uint8_t
33+
{
34+
L = 0, //!< length
35+
M, //!< mass
36+
T, //!< time
37+
I, //!< electric current
38+
theta, //!< thermodynamic temperature
39+
N, //!< amount of substance
40+
J //!< luminous intensity
41+
};
42+
} // namespace openPMD

include/openPMD/backend/BaseRecord.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include "openPMD/backend/Container.hpp"
2424
#include "openPMD/RecordComponent.hpp"
25+
#include "openPMD/UnitDimension.hpp"
2526

2627
#include <array>
2728
#include <string>
@@ -30,10 +31,6 @@
3031

3132
namespace openPMD
3233
{
33-
enum class UnitDimension : uint8_t
34-
{
35-
L = 0, M, T, I, theta, N, J
36-
};
3734

3835
template< typename T_elem >
3936
class BaseRecord : public Container< T_elem >

include/openPMD/backend/BaseRecordComponent.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class BaseRecordComponent : public Attributable
6464
namespace detail
6565
{
6666
/**
67-
* Functor template to be used in combination with <switchType>"()"
67+
* Functor template to be used in combination with switchType::operator()
6868
* to set a default value for constant record components via the
6969
* respective type's default constructor.
7070
* Used to implement empty datasets in subclasses of BaseRecordComponent

include/openPMD/backend/Container.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace traits
4141
/** Container Element Creation Policy
4242
*
4343
* The operator() of this policy is called after the container
44-
* ::insert of a new element. The passed parameter is an iterator to the
44+
* insert() of a new element. The passed parameter is an iterator to the
4545
* newly added element.
4646
*/
4747
template< typename U >

0 commit comments

Comments
 (0)