From 1ea2f34f75d1f9492f958a817233e19217d200f6 Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Fri, 12 Feb 2016 10:24:43 +0100 Subject: [PATCH] Fix doxygen documentation in src, samples and tests refs #594 --- docs/Doxyfile.qmake | 3 +- samples/blackmisc/main.cpp | 2 +- samples/blackmiscdbus/main.cpp | 5 +- samples/blackmiscdbus/servicetool.h | 1 + samples/blackmiscdbus/testservice.h | 3 + samples/blackmiscquantities/main.cpp | 2 +- samples/blackmiscsim/main.cpp | 4 +- samples/cliclient/client.h | 16 +++- samples/cliclient/main.cpp | 1 + samples/cliclient/reader.h | 9 ++ samples/hotkey/main.cpp | 1 + samples/weatherdata/main.cpp | 1 + src/blackcore/audiodevicevatlib.cpp | 6 ++ src/blackcore/blackcore.h | 8 +- src/blackcore/networkvatlib.cpp | 6 ++ src/blackcore/voicechannelvatlib.cpp | 5 ++ src/blackcore/webreaderflags.cpp | 6 +- src/blackmisc/datacache.cpp | 5 ++ src/blackmisc/icons.cpp | 4 + src/blackmisc/lockfree.h | 2 + src/blackmisc/loghandler.cpp | 5 ++ src/blackmisc/logmessage.cpp | 6 ++ src/blackmisc/network/entityflags.cpp | 2 +- src/blackmisc/project.cpp | 8 ++ src/blackmisc/propertyindexvariantmap.cpp | 4 + src/blackmisc/valuecache.cpp | 6 +- src/blackmisc/variant.cpp | 11 ++- src/blackmisc/weather/metardecoder.cpp | 5 +- .../simulator/fscommon/simulatorfscommon.cpp | 1 + src/xbus/menus.cpp | 10 ++- src/xbus/messages.cpp | 5 ++ src/xbus/traffic.cpp | 10 ++- src/xbus/weather.cpp | 6 ++ tests/blackcore/blackcoretest.h | 5 ++ tests/blackcore/expect.cpp | 8 ++ tests/blackcore/expect.h | 88 ++++++++++++++++--- tests/blackcore/main.cpp | 8 ++ tests/blackcore/testblackcoremain.cpp | 8 ++ tests/blackcore/testblackcoremain.h | 10 ++- tests/blackcore/testinterpolator.cpp | 9 ++ tests/blackcore/testinterpolator.h | 14 ++- tests/blackcore/testnetwork.cpp | 8 ++ tests/blackcore/testnetwork.h | 14 ++- tests/blackcore/testreaders.cpp | 8 ++ tests/blackcore/testreaders.h | 12 ++- tests/blackgui/blackguitest.h | 4 + tests/blackgui/main.cpp | 8 ++ tests/blackgui/testblackguimain.cpp | 8 ++ tests/blackgui/testblackguimain.h | 8 +- tests/blackgui/testutils.cpp | 8 ++ tests/blackgui/testutils.h | 8 +- tests/blackmisc/blackmisctest.h | 7 +- tests/blackmisc/main.cpp | 9 ++ tests/blackmisc/testaviation.cpp | 8 ++ tests/blackmisc/testaviation.h | 14 ++- tests/blackmisc/testblackmiscmain.cpp | 8 ++ tests/blackmisc/testblackmiscmain.h | 16 +++- tests/blackmisc/testcontainers.cpp | 8 ++ tests/blackmisc/testcontainers.h | 10 ++- tests/blackmisc/testgeo.cpp | 8 ++ tests/blackmisc/testgeo.h | 10 ++- tests/blackmisc/testidentifier.cpp | 8 ++ tests/blackmisc/testidentifier.h | 10 ++- tests/blackmisc/testinput.cpp | 8 ++ tests/blackmisc/testinput.h | 10 ++- tests/blackmisc/testmath.cpp | 8 ++ tests/blackmisc/testmath.h | 14 ++- tests/blackmisc/testphysicalquantities.cpp | 8 ++ tests/blackmisc/testphysicalquantities.h | 10 ++- tests/blackmisc/testvaluecache.cpp | 11 +++ tests/blackmisc/testvaluecache.h | 10 ++- tests/blackmisc/testvalueobject.cpp | 8 ++ tests/blackmisc/testvalueobject.h | 18 +++- tests/blackmisc/testvariantandmap.cpp | 8 ++ tests/blackmisc/testvariantandmap.h | 10 ++- tests/blackmisc/testweather.cpp | 8 ++ tests/blackmisc/testweather.h | 10 ++- 77 files changed, 589 insertions(+), 73 deletions(-) diff --git a/docs/Doxyfile.qmake b/docs/Doxyfile.qmake index 08289e844..964864b9f 100644 --- a/docs/Doxyfile.qmake +++ b/docs/Doxyfile.qmake @@ -238,7 +238,8 @@ TAB_SIZE = 4 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = "threadsafe=@remarks This function is thread safe." +ALIASES = "threadsafe=@remarks This function is thread safe." \ + "fixme=\todo" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" diff --git a/samples/blackmisc/main.cpp b/samples/blackmisc/main.cpp index 498a74216..16f3ff57f 100644 --- a/samples/blackmisc/main.cpp +++ b/samples/blackmisc/main.cpp @@ -21,7 +21,7 @@ using namespace BlackMisc; using namespace BlackSample; -//! Sample tests +//! main int main(int argc, char *argv[]) { // I use QGuiApplication and not core application diff --git a/samples/blackmiscdbus/main.cpp b/samples/blackmiscdbus/main.cpp index 03913a1e0..f6d1beb2b 100644 --- a/samples/blackmiscdbus/main.cpp +++ b/samples/blackmiscdbus/main.cpp @@ -16,10 +16,7 @@ #include #include -/*! - * DBus tests, tests marshalling / unmarshalling of many value classes. - * Forks two processes and sends data via DBus among them. - */ +//! main int main(int argc, char *argv[]) { // of course the code here is containing too many lines, but as it diff --git a/samples/blackmiscdbus/servicetool.h b/samples/blackmiscdbus/servicetool.h index c292aa06c..59df12d2a 100644 --- a/samples/blackmiscdbus/servicetool.h +++ b/samples/blackmiscdbus/servicetool.h @@ -72,6 +72,7 @@ namespace BlackSample /*! * \brief Display QDBusArgument * \param arg + * \param level */ static void displayQDBusArgument(const QDBusArgument &arg, qint32 level = 0); diff --git a/samples/blackmiscdbus/testservice.h b/samples/blackmiscdbus/testservice.h index 80f45a82a..55d444282 100644 --- a/samples/blackmiscdbus/testservice.h +++ b/samples/blackmiscdbus/testservice.h @@ -30,7 +30,10 @@ #include #include +//! DBus interface for test service #define BLACKSAMPLE_TESTSERVICE_INTERFACENAME "blackmisctest.testservice" + +//! DBus object path for test service #define BLACKSAMPLE_TESTSERVICE_OBJECTPATH "/ts" namespace BlackSample diff --git a/samples/blackmiscquantities/main.cpp b/samples/blackmiscquantities/main.cpp index da850fd4a..bc1e1d1d3 100644 --- a/samples/blackmiscquantities/main.cpp +++ b/samples/blackmiscquantities/main.cpp @@ -16,7 +16,7 @@ using namespace BlackMisc; using namespace BlackSample; -//! Samples +//! main int main(int argc, char *argv[]) { QTextStream out(stdout, QIODevice::WriteOnly); diff --git a/samples/blackmiscsim/main.cpp b/samples/blackmiscsim/main.cpp index 942b8611b..def4e8384 100644 --- a/samples/blackmiscsim/main.cpp +++ b/samples/blackmiscsim/main.cpp @@ -18,9 +18,7 @@ #include #include -/*! - * Samples - */ +//! main int main(int argc, char *argv[]) { Q_UNUSED(argc); diff --git a/samples/cliclient/client.h b/samples/cliclient/client.h index 7eae2ad64..e545f4229 100644 --- a/samples/cliclient/client.h +++ b/samples/cliclient/client.h @@ -23,6 +23,13 @@ namespace BlackSample { + /*! + * \brief Simple command line interface client + * + * This class implements a simple and limited command line interace class. + * It accepts commands from the console via \sa command. Note that the class + * does not send anything on its own, not even position packets. + */ class Client : public QObject, public BlackMisc::Simulation::COwnAircraftAware, @@ -31,6 +38,7 @@ namespace BlackSample Q_OBJECT public: + //! Constructor Client(QObject *parent = nullptr); signals: @@ -72,6 +80,8 @@ namespace BlackSample void sendCustomPacketCmd(QTextStream &args); signals: //to send to INetwork + //! \name Signals to INetwork + //! @{ void presetServer(const BlackMisc::Network::CServer &server); void presetCallsign(const BlackMisc::Aviation::CCallsign &callsign); void presetRealName(const QString &name); @@ -96,8 +106,11 @@ namespace BlackSample void sendPing(const BlackMisc::Aviation::CCallsign &callsign); void sendMetarQuery(const QString &airportICAO); void sendCustomPacket(const BlackMisc::Aviation::CCallsign &callsign, const QString &packetId, const QStringList &data); + //! @} - public slots: //to receive from INetwork + public slots: + //! \name Slots connected to INetwork + //! @{ void atcPositionUpdate(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::PhysicalQuantities::CFrequency &freq, const BlackMisc::Geo::CCoordinateGeodetic &pos, const BlackMisc::PhysicalQuantities::CLength &range); void atcDisconnected(const BlackMisc::Aviation::CCallsign &callsign); @@ -117,6 +130,7 @@ namespace BlackSample void pongReceived(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::PhysicalQuantities::CTime &elapsedTime); void textMessagesReceived(const BlackMisc::Network::CTextMessageList &messages); void customPacketReceived(const BlackMisc::Aviation::CCallsign &callsign, const QString &packetId, const QStringList &data); + //! @} private: QMap> m_commands; diff --git a/samples/cliclient/main.cpp b/samples/cliclient/main.cpp index 89d6ef253..c048f179e 100644 --- a/samples/cliclient/main.cpp +++ b/samples/cliclient/main.cpp @@ -16,6 +16,7 @@ using namespace BlackSample; +//! main int main(int argc, char *argv[]) { QCoreApplication app (argc, argv); diff --git a/samples/cliclient/reader.h b/samples/cliclient/reader.h index 987ee9d2d..cee498835 100644 --- a/samples/cliclient/reader.h +++ b/samples/cliclient/reader.h @@ -18,6 +18,13 @@ namespace BlackSample { + /*! + * \brief Simple console command reader + * + * This class reads the user input per line and emits each line + * as a command signals. + * This task is running in the background and does not block. + */ class LineReader : public QThread { Q_OBJECT @@ -26,9 +33,11 @@ namespace BlackSample LineReader() {} protected: + //! Run reader in background void run(); signals: + //! User command void command(const QString &line); }; diff --git a/samples/hotkey/main.cpp b/samples/hotkey/main.cpp index 6e859e450..a061a0ea3 100644 --- a/samples/hotkey/main.cpp +++ b/samples/hotkey/main.cpp @@ -11,6 +11,7 @@ #include "blackmisc/registermetadata.h" #include +//! main int main(int argc, char *argv[]) { QApplication a(argc, argv); diff --git a/samples/weatherdata/main.cpp b/samples/weatherdata/main.cpp index 65f8a0d17..3db83edb3 100644 --- a/samples/weatherdata/main.cpp +++ b/samples/weatherdata/main.cpp @@ -18,6 +18,7 @@ using namespace BlackMisc; using namespace BlackMisc::PhysicalQuantities; +//! main int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); diff --git a/src/blackcore/audiodevicevatlib.cpp b/src/blackcore/audiodevicevatlib.cpp index 6f7e29d83..b92e705a8 100644 --- a/src/blackcore/audiodevicevatlib.cpp +++ b/src/blackcore/audiodevicevatlib.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "audiodevicevatlib.h" #include "blackmisc/logmessage.h" @@ -16,11 +18,13 @@ using namespace BlackMisc::Aviation; namespace BlackCore { + //! Cast void* to a pointer of CAudioInputDeviceVatlib CAudioInputDeviceVatlib *cbvar_cast_inputDevice(void *cbvar) { return static_cast(cbvar); } + //! Cast void* to a pointer of CAudioOutputDeviceVatlib CAudioOutputDeviceVatlib *cbvar_cast_outputDevice(void *cbvar) { return static_cast(cbvar); @@ -129,3 +133,5 @@ namespace BlackCore cbvar_cast_outputDevice(cbVar)->m_devices.push_back(outputDevice); } } + +//! \endcond diff --git a/src/blackcore/blackcore.h b/src/blackcore/blackcore.h index bf14b0629..9bea32f08 100644 --- a/src/blackcore/blackcore.h +++ b/src/blackcore/blackcore.h @@ -3,6 +3,11 @@ //! \file +/*! + * \defgroup blackcore BlackCore Library + * Backend services of the swift project, like dealing with the network or the simulators. + */ + /*! * \namespace BlackCore * Backend services of the swift project, like dealing with the network or the simulators. @@ -23,8 +28,9 @@ * Network settings traits. */ -/** +/*! * \defgroup dbus DBus related functions, classes, or definitions. + * \ingroup blackcore */ #endif // guard diff --git a/src/blackcore/networkvatlib.cpp b/src/blackcore/networkvatlib.cpp index 56998ef15..4fa0da266 100644 --- a/src/blackcore/networkvatlib.cpp +++ b/src/blackcore/networkvatlib.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "networkvatlib.h" #include "blackmisc/project.h" #include "blackmisc/logmessage.h" @@ -154,6 +156,7 @@ namespace BlackCore } } + //! Convert vatlib status code to INetwork::ConnectionStatus INetwork::ConnectionStatus convertConnectionStatus(VatConnectionStatus status) { switch (status) @@ -640,6 +643,7 @@ namespace BlackCore /********************************** shimlib callbacks ************************************/ /********************************** * * * * * * * * * * * * * * * * * * * ************************************/ + //! Cast void* to a pointer of CNetworkVatlib CNetworkVatlib *cbvar_cast(void *cbvar) { return static_cast(cbvar); @@ -1018,3 +1022,5 @@ namespace BlackCore } } // namespace + +//! \endcond diff --git a/src/blackcore/voicechannelvatlib.cpp b/src/blackcore/voicechannelvatlib.cpp index a9a9323d9..036e20a7d 100644 --- a/src/blackcore/voicechannelvatlib.cpp +++ b/src/blackcore/voicechannelvatlib.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "voicechannelvatlib.h" #include "blackmisc/logmessage.h" @@ -177,6 +179,7 @@ namespace BlackCore emit connectionStatusChanged(oldStatus, m_roomStatus); } + //! Cast void* to a pointer of CVoiceChannelVatlib CVoiceChannelVatlib *cbvar_cast_voiceChannel(void *cbvar) { return static_cast(cbvar); @@ -206,3 +209,5 @@ namespace BlackCore obj->updateRoomStatus(channel, oldStatus, newStatus); } } // ns + +//! \endcond diff --git a/src/blackcore/webreaderflags.cpp b/src/blackcore/webreaderflags.cpp index 7936f1547..fa5970656 100644 --- a/src/blackcore/webreaderflags.cpp +++ b/src/blackcore/webreaderflags.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "webreaderflags.h" using namespace BlackMisc::Network; @@ -47,7 +49,7 @@ namespace BlackCore return f; } - bool CWebReaderFlags::isFromSwiftDb(CEntityFlags::Entity entity) + bool CWebReaderFlags::isFromSwiftDb(BlackMisc::Network::CEntityFlags::Entity entity) { return isFromSwiftDb(entityToReader(entity)); } @@ -58,3 +60,5 @@ namespace BlackCore } } // namespace + +//! \endcond diff --git a/src/blackmisc/datacache.cpp b/src/blackmisc/datacache.cpp index 658ad2728..b9f226688 100644 --- a/src/blackmisc/datacache.cpp +++ b/src/blackmisc/datacache.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "datacache.h" #include "blackmisc/logmessage.h" #include "blackmisc/identifier.h" @@ -16,6 +18,7 @@ namespace BlackMisc { + class CDataCacheRevision::LockGuard { public: @@ -445,3 +448,5 @@ namespace BlackMisc return result; } } + +//! \endcond diff --git a/src/blackmisc/icons.cpp b/src/blackmisc/icons.cpp index aa0646191..831a339d0 100644 --- a/src/blackmisc/icons.cpp +++ b/src/blackmisc/icons.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "icons.h" #include "blackmisc/project.h" #include "blackmisc/fileutils.h" @@ -1173,3 +1175,5 @@ namespace BlackMisc } } // namespace + +//! \endcond diff --git a/src/blackmisc/lockfree.h b/src/blackmisc/lockfree.h index fcf6b633f..3b087ee1f 100644 --- a/src/blackmisc/lockfree.h +++ b/src/blackmisc/lockfree.h @@ -36,8 +36,10 @@ namespace BlackMisc namespace Private { + //! \cond PRIVATE //! \private BLACKMISC_EXPORT QMutex *atomicSharedPtrMutex(); + //! \endcond //! \private template diff --git a/src/blackmisc/loghandler.cpp b/src/blackmisc/loghandler.cpp index 9dfa27d98..9e881e176 100644 --- a/src/blackmisc/loghandler.cpp +++ b/src/blackmisc/loghandler.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "loghandler.h" #include "algorithm.h" #include "worker.h" @@ -23,6 +25,7 @@ namespace BlackMisc return g_handler; } + //! Qt message handler void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message) { CStatusMessage statusMessage(type, context, message); @@ -264,3 +267,5 @@ namespace BlackMisc } } } + +//! \endcond diff --git a/src/blackmisc/logmessage.cpp b/src/blackmisc/logmessage.cpp index 8337a504b..2e76ad092 100644 --- a/src/blackmisc/logmessage.cpp +++ b/src/blackmisc/logmessage.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "logmessage.h" #include "blackmiscfreefunctions.h" #include "indexsequence.h" @@ -155,11 +157,13 @@ namespace BlackMisc } } + //! Does category contain flag? bool hasFlag(const QString &category, const QString &flag) { return category.section("/", 1, -1).split("/").contains(flag); } + //! Add flag to category QString addFlag(QString category, const QString &flag) { if (category.isEmpty() || hasFlag(category, flag)) return category; @@ -188,3 +192,5 @@ namespace BlackMisc } } } // ns + +//! \endcond diff --git a/src/blackmisc/network/entityflags.cpp b/src/blackmisc/network/entityflags.cpp index 481fb9205..0dfdd4852 100644 --- a/src/blackmisc/network/entityflags.cpp +++ b/src/blackmisc/network/entityflags.cpp @@ -39,7 +39,7 @@ namespace BlackMisc } } - QString CEntityFlags::flagToString(Entity flag) + QString CEntityFlags::flagToString(BlackMisc::Network::CEntityFlags::Entity flag) { QStringList list; if (flag.testFlag(NoEntity)) list << "no data"; diff --git a/src/blackmisc/project.cpp b/src/blackmisc/project.cpp index 9ab57f4b6..87c1a90f6 100644 --- a/src/blackmisc/project.cpp +++ b/src/blackmisc/project.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "project.h" #include "blackmisc/fileutils.h" #include "blackmisc/stringutils.h" @@ -310,6 +312,7 @@ namespace BlackMisc return QProcessEnvironment::systemEnvironment().value(envVarPrivateSetupDir()); } + //! Get application directory QString getApplicationDirImpl() { QFileInfo executable(QCoreApplication::applicationFilePath()); @@ -323,6 +326,7 @@ namespace BlackMisc return s; } + //! Get swift resource directory QString getSwiftResourceDirImpl() { QDir dir(CProject::getApplicationDir()); @@ -347,6 +351,7 @@ namespace BlackMisc return dir; } + //! Get static database directory QString getSwiftStaticDbFilesDirImpl() { QString d(CProject::getSwiftResourceDir()); @@ -362,6 +367,7 @@ namespace BlackMisc return s; } + //! Get images directory QString getImagesDirImpl() { QString d(CProject::getSwiftResourceDir()); @@ -452,3 +458,5 @@ namespace BlackMisc #undef BLACK_VERSION_STR #undef BLACK_VERSION_STR_X + +//! \endcond diff --git a/src/blackmisc/propertyindexvariantmap.cpp b/src/blackmisc/propertyindexvariantmap.cpp index 1320793cb..76ff40b1e 100644 --- a/src/blackmisc/propertyindexvariantmap.cpp +++ b/src/blackmisc/propertyindexvariantmap.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "propertyindexvariantmap.h" #include "propertyindexlist.h" #include "dictionary.h" @@ -125,3 +127,5 @@ namespace BlackMisc return BlackMisc::calculateHash(h, "CPropertyIndexVariantMap"); } } // namespace + +//! \endcond diff --git a/src/blackmisc/valuecache.cpp b/src/blackmisc/valuecache.cpp index b95c9796a..26fd10097 100644 --- a/src/blackmisc/valuecache.cpp +++ b/src/blackmisc/valuecache.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "blackmisc/valuecache.h" #include "blackmisc/identifier.h" #include "blackmisc/logmessage.h" @@ -21,7 +23,7 @@ namespace BlackMisc using Private::CValuePage; - // Used in asserts to protect against signed integer overflow. + //! Used in asserts to protect against signed integer overflow. template bool isSafeToIncrement(const T &value) { return value < std::numeric_limits::max(); } @@ -557,3 +559,5 @@ namespace BlackMisc } } + +//! \endcond diff --git a/src/blackmisc/variant.cpp b/src/blackmisc/variant.cpp index e28d6560e..746e00c48 100644 --- a/src/blackmisc/variant.cpp +++ b/src/blackmisc/variant.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "variant.h" #include "blackmiscfreefunctions.h" #include "icon.h" @@ -238,9 +240,14 @@ namespace BlackMisc } } - // 2 functions required for unmarshallFromDbus + /*! + * 2 functions required for unmarshallFromDbus + * \internal + */ + //! @{ QVariant fixQVariantFromDbusArgument(const QVariant &variant, int localUserType); QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type); + //! @} void CVariant::unmarshallFromDbus(const QDBusArgument &arg) { @@ -416,3 +423,5 @@ namespace BlackMisc } } // namespace + +//! \endcond diff --git a/src/blackmisc/weather/metardecoder.cpp b/src/blackmisc/weather/metardecoder.cpp index 33c820878..638e8608e 100644 --- a/src/blackmisc/weather/metardecoder.cpp +++ b/src/blackmisc/weather/metardecoder.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "metardecoder.h" #include "blackmiscfreefunctions.h" #include "blackmisc/logmessage.h" @@ -804,7 +806,6 @@ namespace BlackMisc virtual QString getDecoderType() const override { return "WindShear"; } }; - CMetarDecoder::CMetarDecoder() { allocateDecoders(); @@ -854,3 +855,5 @@ namespace BlackMisc } // namespace } // namespace + +//! \endcond diff --git a/src/plugins/simulator/fscommon/simulatorfscommon.cpp b/src/plugins/simulator/fscommon/simulatorfscommon.cpp index c61c6a3ba..401ee6ff0 100644 --- a/src/plugins/simulator/fscommon/simulatorfscommon.cpp +++ b/src/plugins/simulator/fscommon/simulatorfscommon.cpp @@ -11,6 +11,7 @@ #include "blackmisc/logmessage.h" #include "blackmisc/simulation/fscommon/modelmappingsprovidervpilot.h" #include "blackmisc/blackmiscfreefunctions.h" +#include "blackmisc/makeunique.h" using namespace BlackMisc::PhysicalQuantities; using namespace BlackMisc::Simulation; diff --git a/src/xbus/menus.cpp b/src/xbus/menus.cpp index ee1d321e9..13eb1574e 100644 --- a/src/xbus/menus.cpp +++ b/src/xbus/menus.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "menus.h" #include "blackmisc/blackmiscfreefunctions.h" #include "blackmisc/makeunique.h" @@ -16,14 +18,16 @@ namespace XBus { - template void *voidptr_cast(T i) // "safe" cast from integer to void* + //! "safe" cast from integer to void* + template void *voidptr_cast(T i) { static_assert(std::is_integral::value, "voidptr_cast expects an integer"); typedef typename std::conditional::value, intptr_t, uintptr_t>::type intptr_type; return reinterpret_cast(static_cast(i)); } - template T intptr_cast(void *p) // "safe" cast from void* to integer + //! "safe" cast from void* to integer + template T intptr_cast(void *p) { static_assert(std::is_integral::value, "voidptr_cast returns an integer"); typedef typename std::conditional::value, intptr_t, uintptr_t>::type intptr_type; @@ -119,3 +123,5 @@ namespace XBus } } + +//! \endcond diff --git a/src/xbus/messages.cpp b/src/xbus/messages.cpp index 19d895d55..6164ec521 100644 --- a/src/xbus/messages.cpp +++ b/src/xbus/messages.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #ifndef NOMINMAX #define NOMINMAX #endif @@ -17,6 +19,7 @@ namespace XBus { + const int c_screenWidth = 1024; const int c_screenHeight = 768; const int c_boxLeft = 128; @@ -141,3 +144,5 @@ namespace XBus } } + +//! \endcond diff --git a/src/xbus/traffic.cpp b/src/xbus/traffic.cpp index 36e8f6e1b..7cfa23467 100644 --- a/src/xbus/traffic.cpp +++ b/src/xbus/traffic.cpp @@ -7,6 +7,8 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #ifndef NOMINMAX #define NOMINMAX #endif @@ -38,9 +40,11 @@ namespace XBus surfaces.lights.timeOffset = static_cast(qrand() % 0xffff); } + QString g_xplanePath; QString g_sep; + //! Init global xplane path void initXPlanePath() { char xplanePath[512]; @@ -297,7 +301,7 @@ namespace XBus } } - // memcmp function which ignores the header ("size" member) and compares only the payload (the rest of the struct) + //! memcmp function which ignores the header ("size" member) and compares only the payload (the rest of the struct) template int memcmpPayload(T *dst, T *src) { @@ -306,7 +310,7 @@ namespace XBus sizeof(*dst) - sizeof(dst->size)); } - // linearly interpolate angle in degrees + //! linearly interpolate angle in degrees template T lerpDegrees(T from, T to, double factor) { @@ -394,3 +398,5 @@ namespace XBus } } + +//! \endcond diff --git a/src/xbus/weather.cpp b/src/xbus/weather.cpp index 1db2ec641..602887636 100644 --- a/src/xbus/weather.cpp +++ b/src/xbus/weather.cpp @@ -7,12 +7,15 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE + #include "weather.h" #include namespace XBus { + //! Set cloud layer template void setCloudLayerImpl(T &layer, int base, int tops, int type, int coverage) { @@ -33,6 +36,7 @@ namespace XBus } } + //! Set wind layer template void setWindLayerImpl(T &layer, int altitude, float direction, int speed, int shearDirection, int shearSpeed, int turbulence) { @@ -56,3 +60,5 @@ namespace XBus } } + +//! \endcond diff --git a/tests/blackcore/blackcoretest.h b/tests/blackcore/blackcoretest.h index bce563b30..df4820604 100644 --- a/tests/blackcore/blackcoretest.h +++ b/tests/blackcore/blackcoretest.h @@ -10,11 +10,16 @@ #ifndef BLACKCORETEST_H #define BLACKCORETEST_H +//! \cond PRIVATE_TESTS + /*! * \namespace BlackCoreTest + * \internal * Unit tests for BlackCore. Unit tests do have their own namespace, so * the regular namespace BlackCore is completely free of unit tests. * Add any new tests to TestMain::unitMain as shown there. */ +//! \endcond + #endif // guard diff --git a/tests/blackcore/expect.cpp b/tests/blackcore/expect.cpp index 6fe7416a3..c591aa38a 100644 --- a/tests/blackcore/expect.cpp +++ b/tests/blackcore/expect.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "expect.h" #include #include @@ -108,4 +114,6 @@ void Expect::reportTimeout(const SourceLocation& srcloc, const QSet #include +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + namespace BlackCoreTest { class Expect; - //! Class representing a position in a source code file, for error reporting. Used in combination with the SOURCE_LOCATION macro. + /*! + * Class representing a position in a source code file, for error reporting. Used in combination with the SOURCE_LOCATION macro. + */ class SourceLocation { public: @@ -35,7 +41,9 @@ namespace BlackCoreTest //! Evaluates to an instance of SourceLocation representing the position where the macro is used. #define SOURCE_LOCATION (BlackCoreTest::SourceLocation(__FILE__, __LINE__)) -//! RAII class for Qt signal/slot connections. All connections are closed when object is destroyed. + /*! + * RAII class for Qt signal/slot connections. All connections are closed when object is destroyed. + */ class ConnectGuard { public: @@ -45,7 +53,7 @@ namespace BlackCoreTest //! Destructor. ~ConnectGuard() { cleanup(); } - //! Add a connection to the object. + //! Add a connection to the object.. ConnectGuard &operator+= (const QMetaObject::Connection &conn) { m_conns += conn; return *this; } //! Disconnect and remove all stored connections. @@ -74,14 +82,37 @@ namespace BlackCoreTest * \param slot A pointer-to-member-function of the subject class. * \return this object, so methods can be chained. */ - //! @{ template ExpectUnit &send(F slot) { m_sends.push_back(std::bind(slot, subject())); return *this; } + + /*! + * \copydoc send(F) + * \param arg1 + */ template ExpectUnit &send(F slot, T1 arg1) { m_sends.push_back(std::bind(slot, subject(), arg1)); return *this; } + + /*! + * \copydoc send(F,T1) + * \param arg2 + */ template ExpectUnit &send(F slot, T1 arg1, T2 arg2) { m_sends.push_back(std::bind(slot, subject(), arg1, arg2)); return *this; } + + /*! + * \copydoc send(F,T1,T2) + * \param arg3 + */ template ExpectUnit &send(F slot, T1 arg1, T2 arg2, T3 arg3) { m_sends.push_back(std::bind(slot, subject(), arg1, arg2, arg3)); return *this; } + + /*! + * \copydoc send(F,T1,T2,T3) + * \param arg4 + */ template ExpectUnit &send(F slot, T1 arg1, T2 arg2, T3 arg3, T4 arg4) { m_sends.push_back(std::bind(slot, subject(), arg1, arg2, arg3, arg4)); return *this; } + + /*! + * \copydoc send(F,T1,T2,T3,T4) + * \param arg5 + */ template ExpectUnit &send(F slot, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { m_sends.push_back(std::bind(slot, subject(), arg1, arg2, arg3, arg4, arg5)); return *this; } - //! @} /*! * Adds a signal to the list of signals which are expects to be received. @@ -183,14 +214,33 @@ namespace BlackCoreTest * Allows two or more units of expectation to be waited on simultaneously. Commonly valled via the EXPECT_WAIT macro. * \param srcloc Represents the caller's location in the source code, for error reporting. * \param timeout Time to wait in seconds. Qt event queue is processed when waiting. + * \param u1 */ - //! @{ void wait(const SourceLocation &srcloc, int timeout, const ExpectUnit &u1) { m_units.insert(&u1); wait(srcloc, timeout); } + + /*! + * \copydoc wait(const SourceLocation&,int,const ExpectUnit&) + * \param u2 + */ void wait(const SourceLocation &srcloc, int timeout, const ExpectUnit &u1, const ExpectUnit &u2) { m_units.insert(&u1); m_units.insert(&u2); wait(srcloc, timeout); } + + /*! + * \copydoc wait(const SourceLocation&,int,const ExpectUnit&,const ExpectUnit&) + * \param u3 + */ void wait(const SourceLocation &srcloc, int timeout, const ExpectUnit &u1, const ExpectUnit &u2, const ExpectUnit &u3) { m_units.insert(&u1); m_units.insert(&u2); m_units.insert(&u3); wait(srcloc, timeout); } + + /*! + * \copydoc wait(const SourceLocation&,int,const ExpectUnit&,const ExpectUnit&,const ExpectUnit&) + * \param u4 + */ void wait(const SourceLocation &srcloc, int timeout, const ExpectUnit &u1, const ExpectUnit &u2, const ExpectUnit &u3, const ExpectUnit &u4) { m_units.insert(&u1); m_units.insert(&u2); m_units.insert(&u3); m_units.insert(&u4); wait(srcloc, timeout); } + + /*! + * \copydoc wait(const SourceLocation&,int,const ExpectUnit&,const ExpectUnit&,const ExpectUnit&,const ExpectUnit&) + * \param u5 + */ void wait(const SourceLocation &srcloc, int timeout, const ExpectUnit &u1, const ExpectUnit &u2, const ExpectUnit &u3, const ExpectUnit &u4, const ExpectUnit &u5) { m_units.insert(&u1); m_units.insert(&u2); m_units.insert(&u3); m_units.insert(&u4); m_units.insert(&u5); wait(srcloc, timeout); } - //! @} private: friend class ExpectUnit; @@ -216,14 +266,30 @@ namespace BlackCoreTest * Allows two or more units of expectation to be waited on simultaneously. * \param EXP Instance of Expect on which to call wait(). * \param TIME Time to wait in seconds. Qt event queue is processed when waiting. + * \param U1, U2 */ -//! @{ #define EXPECT_WAIT_2(EXP, TIME, U1, U2) ((EXP).wait(SOURCE_LOCATION, (TIME), (U1), (U2))) + + /*! + * \copydoc EXPECT_WAIT_2(EXP,TIME,U1,U2) + * \param U3 + */ #define EXPECT_WAIT_3(EXP, TIME, U1, U2, U3) ((EXP).wait(SOURCE_LOCATION, (TIME), (U1), (U2), (U3))) + + /*! + * \copydoc EXPECT_WAIT_3(EXP,TIME,U1,U2,U3) + * \param U4 + */ #define EXPECT_WAIT_4(EXP, TIME, U1, U2, U3, U4) ((EXP).wait(SOURCE_LOCATION, (TIME), (U1), (U2), (U3), (U4))) + + /*! + * \copydoc EXPECT_WAIT_4(EXP,TIME,U1,U2,U3,U4) + * \param U5 + */ #define EXPECT_WAIT_5(EXP, TIME, U1, U2, U3, U4, U5) ((EXP).wait(SOURCE_LOCATION, (TIME), (U1), (U2), (U3), (U4), (U5))) -//! @} } // ns +//! \endcond + #endif // guard diff --git a/tests/blackcore/main.cpp b/tests/blackcore/main.cpp index 14a194ac5..7d10e649f 100644 --- a/tests/blackcore/main.cpp +++ b/tests/blackcore/main.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testblackcoremain.h" #include #include @@ -21,3 +27,5 @@ int main(int argc, char *argv[]) return CBlackCoreTestMain::unitMain(argc, argv); } + +//! \endcond diff --git a/tests/blackcore/testblackcoremain.cpp b/tests/blackcore/testblackcoremain.cpp index 43eb56fa8..f9ee1292f 100644 --- a/tests/blackcore/testblackcoremain.cpp +++ b/tests/blackcore/testblackcoremain.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testblackcoremain.h" #include "testinterpolator.h" #include "testreaders.h" @@ -36,3 +42,5 @@ namespace BlackCoreTest return status; } } // namespace + +//! \endcond diff --git a/tests/blackcore/testblackcoremain.h b/tests/blackcore/testblackcoremain.h index 7ba691bdc..7c5224080 100644 --- a/tests/blackcore/testblackcoremain.h +++ b/tests/blackcore/testblackcoremain.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKCORETEST_TESTMAIN_H #define BLACKCORETEST_TESTMAIN_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "blackmisc/valueobject.h" // for qHash overload, include before Qt stuff due GCC issue #include @@ -31,4 +35,6 @@ namespace BlackCoreTest }; } +//! \endcond + #endif // guard diff --git a/tests/blackcore/testinterpolator.cpp b/tests/blackcore/testinterpolator.cpp index c0529ef77..89d7ea5d4 100644 --- a/tests/blackcore/testinterpolator.cpp +++ b/tests/blackcore/testinterpolator.cpp @@ -7,6 +7,13 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + * \ingroup testblackcore + */ + #include "testinterpolator.h" #include "blackcore/interpolatorlinear.h" #include "blackmisc/simulation/remoteaircraftproviderdummy.h" @@ -148,3 +155,5 @@ namespace BlackCoreTest } } // namespace + +//! \endcond diff --git a/tests/blackcore/testinterpolator.h b/tests/blackcore/testinterpolator.h index 79006fe2a..586bc4833 100644 --- a/tests/blackcore/testinterpolator.h +++ b/tests/blackcore/testinterpolator.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKCORETEST_TESTINTERPOLATOR_H #define BLACKCORETEST_TESTINTERPOLATOR_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "blackmisc/aviation/aircraftsituation.h" #include "blackmisc/aviation/aircraftparts.h" @@ -20,7 +24,9 @@ namespace BlackCoreTest { - //! Interpolator classes basic tests + /*! + * Interpolator classes basic tests + */ class CTestInterpolator : public QObject { Q_OBJECT @@ -44,4 +50,6 @@ namespace BlackCoreTest } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackcore/testnetwork.cpp b/tests/blackcore/testnetwork.cpp index c6fca7f00..1eea65eed 100644 --- a/tests/blackcore/testnetwork.cpp +++ b/tests/blackcore/testnetwork.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testnetwork.h" #include "expect.h" #include "blackmisc/network/networkutils.h" @@ -91,3 +97,5 @@ namespace BlackCoreTest } } + +//! \endcond diff --git a/tests/blackcore/testnetwork.h b/tests/blackcore/testnetwork.h index 872ecc514..314925e07 100644 --- a/tests/blackcore/testnetwork.h +++ b/tests/blackcore/testnetwork.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKCORETEST_TESTNETWORK_H #define BLACKCORETEST_TESTNETWORK_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "blackcore/networkvatlib.h" #include "blackcore/data/globalsetup.h" #include "blackmisc/simulation/ownaircraftproviderdummy.h" @@ -20,7 +24,9 @@ namespace BlackCoreTest { - //! INetwork implementation classes tests + /*! + * INetwork implementation classes tests + */ class CTestNetwork : public QObject { Q_OBJECT @@ -48,4 +54,6 @@ namespace BlackCoreTest } //namespace +//! \endcond + #endif // guard diff --git a/tests/blackcore/testreaders.cpp b/tests/blackcore/testreaders.cpp index e5d8a052f..7236afbd8 100644 --- a/tests/blackcore/testreaders.cpp +++ b/tests/blackcore/testreaders.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testreaders.h" #include "expect.h" #include "blackcore/data/globalsetup.h" @@ -86,3 +92,5 @@ namespace BlackCoreTest return true; } } // ns + +//! \endcond diff --git a/tests/blackcore/testreaders.h b/tests/blackcore/testreaders.h index 0c10438ad..83cb79c86 100644 --- a/tests/blackcore/testreaders.h +++ b/tests/blackcore/testreaders.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKCORETEST_TESTREADERS_H #define BLACKCORETEST_TESTREADERS_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "blackcore/networkvatlib.h" #include "blackcore/modeldatareader.h" #include "blackcore/icaodatareader.h" @@ -19,7 +23,7 @@ namespace BlackCoreTest { - /** + /*! * Test data readers (for bookings, JSON, etc.) */ class CTestReaders : public QObject @@ -48,4 +52,6 @@ namespace BlackCoreTest } //namespace +//! \endcond + #endif // guard diff --git a/tests/blackgui/blackguitest.h b/tests/blackgui/blackguitest.h index 8084d5d53..4d49d6623 100644 --- a/tests/blackgui/blackguitest.h +++ b/tests/blackgui/blackguitest.h @@ -10,6 +10,8 @@ #ifndef BLACKGUITEST_H #define BLACKGUITEST_H +//! \cond PRIVATE_TESTS + /*! * \namespace BlackGuiTest * Unit tests for BlackGui. Unit tests do have their own namespace, so @@ -17,4 +19,6 @@ * Add any new tests to TestMain::unitMain as shown there. */ +//! \endcond + #endif // guard diff --git a/tests/blackgui/main.cpp b/tests/blackgui/main.cpp index ee951ced6..c272a1f27 100644 --- a/tests/blackgui/main.cpp +++ b/tests/blackgui/main.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testblackguimain.h" #include #include @@ -21,3 +27,5 @@ int main(int argc, char *argv[]) return CBlackGuiTestMain::unitMain(argc, argv); } + +//! \endcond diff --git a/tests/blackgui/testblackguimain.cpp b/tests/blackgui/testblackguimain.cpp index ecb14fbd3..2d8b6a739 100644 --- a/tests/blackgui/testblackguimain.cpp +++ b/tests/blackgui/testblackguimain.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testblackguimain.h" #include "testutils.h" @@ -25,3 +31,5 @@ namespace BlackCoreTest return status; } } // namespace + +//! \endcond diff --git a/tests/blackgui/testblackguimain.h b/tests/blackgui/testblackguimain.h index 8c5269de8..15285252a 100644 --- a/tests/blackgui/testblackguimain.h +++ b/tests/blackgui/testblackguimain.h @@ -7,7 +7,11 @@ * contained in the LICENSE file. */ -//! \file +//! \cond PRIVATE_TESTS + +/*! + * \file + */ #ifndef BLACKCORETEST_TESTMAIN_H #define BLACKCORETEST_TESTMAIN_H @@ -31,4 +35,6 @@ namespace BlackCoreTest }; } +//! \endcond + #endif // guard diff --git a/tests/blackgui/testutils.cpp b/tests/blackgui/testutils.cpp index 5af58569f..1f0a6edac 100644 --- a/tests/blackgui/testutils.cpp +++ b/tests/blackgui/testutils.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testutils.h" #include "blackgui/guiutility.h" @@ -26,3 +32,5 @@ namespace BlackCoreTest QVERIFY2(!CGuiUtility::lenientTitleComparison("foo", "bar"), "wrong title mismatch"); } } // ns + +//! \endcond diff --git a/tests/blackgui/testutils.h b/tests/blackgui/testutils.h index 89e50b7d8..ae719ab17 100644 --- a/tests/blackgui/testutils.h +++ b/tests/blackgui/testutils.h @@ -7,7 +7,11 @@ * contained in the LICENSE file. */ -//! \file +//! \cond PRIVATE_TESTS + +/*! + * \file + */ #ifndef BLACKCORETEST_TESTUTILS_H #define BLACKCORETEST_TESTUTILS_H @@ -35,4 +39,6 @@ namespace BlackCoreTest } //namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/blackmisctest.h b/tests/blackmisc/blackmisctest.h index f978f71c2..9bbcd5711 100644 --- a/tests/blackmisc/blackmisctest.h +++ b/tests/blackmisc/blackmisctest.h @@ -10,11 +10,16 @@ #ifndef BLACKMISCTEST_H #define BLACKMISCTEST_H +//! \cond PRIVATE_TESTS + /*! - * @namespace BlackMiscTest + * \namespace BlackMiscTest + * \internal * Unit tests for BlackMisc. Unit tests do have their own namespace, so * the regular namespace BlackMisc is completely free of unit tests. * Add any new tests to TestMain::unitMain as shown there. */ +//! \endcond + #endif // guard diff --git a/tests/blackmisc/main.cpp b/tests/blackmisc/main.cpp index ea320d5b6..47ff587ba 100644 --- a/tests/blackmisc/main.cpp +++ b/tests/blackmisc/main.cpp @@ -7,6 +7,13 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + * \internal + */ + #include "testblackmiscmain.h" #include "blackmisc/registermetadata.h" #include @@ -29,3 +36,5 @@ int main(int argc, char *argv[]) BlackMisc::registerMetadata(); return CBlackMiscTestMain::unitMain(argc, argv);; } + +//! \endcond diff --git a/tests/blackmisc/testaviation.cpp b/tests/blackmisc/testaviation.cpp index 16c4c30b2..52cc44d5f 100644 --- a/tests/blackmisc/testaviation.cpp +++ b/tests/blackmisc/testaviation.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testaviation.h" #include "blackmisc/pq/constants.h" #include "blackmisc/aviation/heading.h" @@ -184,3 +190,5 @@ namespace BlackMiscTest } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testaviation.h b/tests/blackmisc/testaviation.h index 91331b8b0..20db1b0fb 100644 --- a/tests/blackmisc/testaviation.h +++ b/tests/blackmisc/testaviation.h @@ -7,17 +7,23 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTAVIATIONBASE_H #define BLACKMISCTEST_TESTAVIATIONBASE_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include namespace BlackMiscTest { - //! Aviation classes basic tests + /*! + * Aviation classes basic tests + */ class CTestAviation : public QObject { Q_OBJECT @@ -45,4 +51,6 @@ namespace BlackMiscTest } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testblackmiscmain.cpp b/tests/blackmisc/testblackmiscmain.cpp index 706fb8922..080cae68d 100644 --- a/tests/blackmisc/testblackmiscmain.cpp +++ b/tests/blackmisc/testblackmiscmain.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testphysicalquantities.h" #include "testaviation.h" #include "testgeo.h" @@ -52,3 +58,5 @@ namespace BlackMiscTest return status; } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testblackmiscmain.h b/tests/blackmisc/testblackmiscmain.h index 7177075ab..2a021f56c 100644 --- a/tests/blackmisc/testblackmiscmain.h +++ b/tests/blackmisc/testblackmiscmain.h @@ -10,13 +10,21 @@ #ifndef BLACKMISCTEST_TESTMAIN_H #define BLACKMISCTEST_TESTMAIN_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include namespace BlackMiscTest { - //! Class firing all unit tests in this namespace. - //! Avoids clashes with other main(..) functions and allows to fire the test cases - //! simply from any other main. + /*! + * Class firing all unit tests in this namespace. + * Avoids clashes with other main(..) functions and allows to fire the test cases + * simply from any other main. + */ class CBlackMiscTestMain { public: @@ -25,4 +33,6 @@ namespace BlackMiscTest }; } +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testcontainers.cpp b/tests/blackmisc/testcontainers.cpp index 70e49cf03..f2188fd37 100644 --- a/tests/blackmisc/testcontainers.cpp +++ b/tests/blackmisc/testcontainers.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testcontainers.h" #include "testvalueobject.h" #include "blackmisc/registermetadata.h" @@ -279,3 +285,5 @@ namespace BlackMiscTest } } //namespace + +//! \endcond diff --git a/tests/blackmisc/testcontainers.h b/tests/blackmisc/testcontainers.h index 4b10e3bf6..d40acfbf3 100644 --- a/tests/blackmisc/testcontainers.h +++ b/tests/blackmisc/testcontainers.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTCONTAINERS_H #define BLACKMISCTEST_TESTCONTAINERS_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include namespace BlackMiscTest @@ -37,4 +41,6 @@ namespace BlackMiscTest } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testgeo.cpp b/tests/blackmisc/testgeo.cpp index 9121c9e8c..5d6b6ea27 100644 --- a/tests/blackmisc/testgeo.cpp +++ b/tests/blackmisc/testgeo.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testgeo.h" #include "blackmisc/geo/latitude.h" #include "blackmisc/geo/longitude.h" @@ -29,3 +35,5 @@ namespace BlackMiscTest } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testgeo.h b/tests/blackmisc/testgeo.h index 247bb91c4..652370ff8 100644 --- a/tests/blackmisc/testgeo.h +++ b/tests/blackmisc/testgeo.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTGEO_H #define BLACKMISCTEST_TESTGEO_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include namespace BlackMiscTest @@ -33,4 +37,6 @@ namespace BlackMiscTest } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testidentifier.cpp b/tests/blackmisc/testidentifier.cpp index 32b513326..4a1d922cf 100644 --- a/tests/blackmisc/testidentifier.cpp +++ b/tests/blackmisc/testidentifier.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testidentifier.h" #include "blackmisc/blackmiscfreefunctions.h" #include "blackmisc/identifierlist.h" @@ -37,3 +43,5 @@ namespace BlackMiscTest { } } //namespace + +//! \endcond diff --git a/tests/blackmisc/testidentifier.h b/tests/blackmisc/testidentifier.h index 32bf13fa2..753645a6a 100644 --- a/tests/blackmisc/testidentifier.h +++ b/tests/blackmisc/testidentifier.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTIDENTIFIER_H #define BLACKMISCTEST_TESTIDENTIFIER_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "blackmisc/identifiable.h" #include @@ -41,4 +45,6 @@ namespace BlackMiscTest } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testinput.cpp b/tests/blackmisc/testinput.cpp index 6a0fd56d2..110aabb63 100644 --- a/tests/blackmisc/testinput.cpp +++ b/tests/blackmisc/testinput.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \ingroup testblackmisc + */ + #include "testinput.h" #include "blackmisc/input/keyboardkey.h" #include "blackmisc/input/hotkeycombination.h" @@ -173,3 +179,5 @@ namespace BlackMiscTest } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testinput.h b/tests/blackmisc/testinput.h index 24e5caba9..4e46d922b 100644 --- a/tests/blackmisc/testinput.h +++ b/tests/blackmisc/testinput.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTINPUT_H #define BLACKMISCTEST_TESTINPUT_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include namespace BlackMiscTest @@ -42,4 +46,6 @@ namespace BlackMiscTest }; } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testmath.cpp b/tests/blackmisc/testmath.cpp index f1bc84fad..235d819da 100644 --- a/tests/blackmisc/testmath.cpp +++ b/tests/blackmisc/testmath.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testmath.h" #include "blackmisc/math/mathutils.h" @@ -36,3 +42,5 @@ namespace BlackMiscTest } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testmath.h b/tests/blackmisc/testmath.h index 38526d47c..8e8949a2f 100644 --- a/tests/blackmisc/testmath.h +++ b/tests/blackmisc/testmath.h @@ -7,17 +7,23 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTMATH_H #define BLACKMISCTEST_TESTMATH_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include namespace BlackMiscTest { - //! Math classes tests + /*! + * Math classes tests + */ class CTestMath : public QObject { Q_OBJECT @@ -33,4 +39,6 @@ namespace BlackMiscTest } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testphysicalquantities.cpp b/tests/blackmisc/testphysicalquantities.cpp index f3a1f1827..cbbfd8958 100644 --- a/tests/blackmisc/testphysicalquantities.cpp +++ b/tests/blackmisc/testphysicalquantities.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testphysicalquantities.h" using namespace BlackMisc::PhysicalQuantities; @@ -279,3 +285,5 @@ namespace BlackMiscTest } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testphysicalquantities.h b/tests/blackmisc/testphysicalquantities.h index 2258ddeb8..9cfdafca4 100644 --- a/tests/blackmisc/testphysicalquantities.h +++ b/tests/blackmisc/testphysicalquantities.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTPHYSICALQUANTITIESBASE_H #define BLACKMISCTEST_TESTPHYSICALQUANTITIESBASE_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include #include "blackmisc/pq/constants.h" @@ -70,4 +74,6 @@ namespace BlackMiscTest } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testvaluecache.cpp b/tests/blackmisc/testvaluecache.cpp index 45a3d049f..2dc8995d5 100644 --- a/tests/blackmisc/testvaluecache.cpp +++ b/tests/blackmisc/testvaluecache.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testvaluecache.h" #include "blackmisc/worker.h" #include "blackmisc/identifier.h" @@ -55,6 +61,7 @@ namespace BlackMiscTest QVERIFY(cache.getAllValues() == testDataCombined); } + //! \cond PRIVATE void waitForQueueOf(QObject *object) { if (object->thread() != QThread::currentThread()) @@ -96,6 +103,7 @@ namespace BlackMiscTest singleShotAndWait(&user2, [ & ] { QVERIFY(user2.m_value2.get() == 42); }); QVERIFY(user1.m_value2.get() == 42); } + //! \endcond void CTestValueCache::localOnly() { @@ -231,6 +239,7 @@ namespace BlackMiscTest QCOMPARE(cache2.getAllValues(), testData); } + //! Is value between 0 - 100? bool validator(int value) { return value >= 0 && value <= 100; @@ -260,3 +269,5 @@ namespace BlackMiscTest return false; } } // ns + +//! \endcond diff --git a/tests/blackmisc/testvaluecache.h b/tests/blackmisc/testvaluecache.h index 7407f81a3..f7ac757a5 100644 --- a/tests/blackmisc/testvaluecache.h +++ b/tests/blackmisc/testvaluecache.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTVALUECACHE_H #define BLACKMISCTEST_TESTVALUECACHE_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "blackmisc/valuecache.h" #include #include @@ -77,4 +81,6 @@ namespace BlackMiscTest } +//! \endcond + #endif diff --git a/tests/blackmisc/testvalueobject.cpp b/tests/blackmisc/testvalueobject.cpp index 6cb7f9027..cc6dd23e5 100644 --- a/tests/blackmisc/testvalueobject.cpp +++ b/tests/blackmisc/testvalueobject.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testvalueobject.h" #include "blackmisc/blackmiscfreefunctions.h" #include @@ -63,3 +69,5 @@ namespace BlackMisc } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testvalueobject.h b/tests/blackmisc/testvalueobject.h index cab738f08..7511166e0 100644 --- a/tests/blackmisc/testvalueobject.h +++ b/tests/blackmisc/testvalueobject.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISC_TESTVALUEOBJECT_H #define BLACKMISC_TESTVALUEOBJECT_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "blackmisc/propertyindex.h" #include "blackmisc/sequence.h" #include "blackmisc/collection.h" @@ -89,9 +93,17 @@ Q_DECLARE_METATYPE(BlackMisc::CNotHashable) // We need to typedef because 'commas' confuse the Q_DECLARE_METATYPE macro // https://bugreports.qt-project.org/browse/QTBUG-11485 + +//! Test value object dictionary using ordered container typedef BlackMisc::CDictionary CValueObjectDictionary; + +//! Test value object dictionary using unordered container typedef BlackMisc::CDictionary CValueObjectHashDictionary; + +//! Test value object dictionary using ordered container with not hashable key typedef BlackMisc::CDictionary CNotHashableDictionary; + +//! Test value object dictionary using unordered container with not hashable key typedef BlackMisc::CDictionary CNotHashableMapDictionary; Q_DECLARE_METATYPE(CValueObjectDictionary) Q_DECLARE_METATYPE(CNotHashableDictionary) @@ -104,4 +116,6 @@ static_assert(std::is_same to use QMap"); #endif // ! Q_CC_MSVC +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testvariantandmap.cpp b/tests/blackmisc/testvariantandmap.cpp index 74bdeab3d..3bf31208d 100644 --- a/tests/blackmisc/testvariantandmap.cpp +++ b/tests/blackmisc/testvariantandmap.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testvariantandmap.h" #include "blackmisc/aviation/atcstation.h" #include "blackmisc/propertyindexallclasses.h" @@ -115,3 +121,5 @@ namespace BlackMiscTest } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testvariantandmap.h b/tests/blackmisc/testvariantandmap.h index 46cea8a26..a597022d1 100644 --- a/tests/blackmisc/testvariantandmap.h +++ b/tests/blackmisc/testvariantandmap.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTVARIANTANDMAP_H #define BLACKMISCTEST_TESTVARIANTANDMAP_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "blackmisc/pq/constants.h" #include "blackmisc/aviation/atcstation.h" #include @@ -36,4 +40,6 @@ namespace BlackMiscTest } // namespace +//! \endcond + #endif // guard diff --git a/tests/blackmisc/testweather.cpp b/tests/blackmisc/testweather.cpp index c12be9937..7e64299ea 100644 --- a/tests/blackmisc/testweather.cpp +++ b/tests/blackmisc/testweather.cpp @@ -7,6 +7,12 @@ * contained in the LICENSE file. */ +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include "testweather.h" #include "blackmisc/weather/metardecoder.h" @@ -81,3 +87,5 @@ namespace BlackMiscTest } } // namespace + +//! \endcond diff --git a/tests/blackmisc/testweather.h b/tests/blackmisc/testweather.h index 273a783a9..b7543e572 100644 --- a/tests/blackmisc/testweather.h +++ b/tests/blackmisc/testweather.h @@ -7,11 +7,15 @@ * contained in the LICENSE file. */ -//! \file - #ifndef BLACKMISCTEST_TESTWEATHER_H #define BLACKMISCTEST_TESTWEATHER_H +//! \cond PRIVATE_TESTS + +/*! + * \file + */ + #include namespace BlackMiscTest @@ -33,4 +37,6 @@ namespace BlackMiscTest } // namespace +//! \endcond + #endif // guard