ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
qt_boxing.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of the \aliblong.
4///
5/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7///
8/// <b>Legal Notice:</b>
9/// This is an optional extension header to provide compatibility between ALib and
10/// the QT class library.
11/// All information about QT is found at https://www.qt.io
12/// ALib otherwise does not use or rely on QT.
13/// The use of QT is bound to the QT license restrictions.
14//==================================================================================================
15#ifndef HPP_ALIB_COMPATIBILITY_BOXING_QT
16#define HPP_ALIB_COMPATIBILITY_BOXING_QT 1
17#pragma once
18#if !defined(DOXYGEN)
19# include "alib/alib.hpp"
20#endif
21
23
24#if !defined(ALIB_QT_LIB_NOT_FOUND) // this is only set in an automated test project
25
26#if defined(__clang__)
27 #pragma clang diagnostic push
28 #pragma clang diagnostic ignored "-Wreserved-id-macro"
29 #pragma clang diagnostic ignored "-Wredundant-parens"
30 #pragma clang diagnostic ignored "-Wcovered-switch-default"
31 #pragma clang diagnostic ignored "-Wsign-conversion"
32 #pragma clang diagnostic ignored "-Wdeprecated"
33 #pragma clang diagnostic ignored "-Wunused-variable"
34 #pragma clang diagnostic ignored "-Wcomma"
35 #pragma clang diagnostic ignored "-Wduplicate-enum"
36#endif
37#include <QtCore/QString>
38#include <QtCore/QVector>
39
40#if defined(__clang__)
41 #pragma clang diagnostic pop
42#endif
43
44#if ALIB_CHARACTERS
46#endif
48#include <functional>
49
51/// This namespace documents compatibility features of \alib_boxing_nl and the
52/// \https{QT Class Library,www.qt.io}.
53namespace qt {
54
55
56
58/// Initializes \alib_boxing_nl in respect to boxing QT string-types.
59///
60/// This method is \b not automatically invoked with function \alib{Bootstrap}, because support
61/// for boxing QT string-types is optional and provided with the inclusion of header
62/// \alibheader{compatibility/qt_boxing.hpp}.
63///
64/// In general, boxing of QT string-types works well without the one-time invocation of
65/// this function at the bootstrap section of a process.
66/// This method registers box-function \alib{boxing;FAppend} for QT string
67/// types when \ref alib_boxing_customizing_identity "custom boxing is bypassed" by wrapping the
68/// types in \c std::reference_wrapper<T>.
69/// The function is implemented with the help of \alib{boxing;FAppend::WrappedAppendable}
70/// for wrapped types \b QByteArray, \b QQLatin1String and \b QString, each for character types
71/// \b nchar and \b wchar.
72///
73/// \note
74/// If invoked after bootstrap and module \alib_monomem_nl is included in the \alibdist,
75/// mutex \alib{monomem;GLOBAL_ALLOCATOR_LOCK} has to be locked before an invocation.
87}} // namespace [alib::boxing::compatibility::qt]
88
89#endif // !defined(ALIB_QT_LIB_NOT_FOUND) // this is only set in an automated test project
90
91#endif // HPP_ALIB_COMPATIBILITY_BOXING_QT
92
#define ALIB_ASSERT_MODULE(modulename)
Definition alib.hpp:223
void BootstrapRegister(typename TFDecl::Signature function)
Definition boxing.hpp:112