ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
ALib.Compatibility.QTBoxing.H
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of the \aliblong.
4///
5/// \emoji :copyright: 2013-2025 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.inl"
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
45
46#include "ALib.Boxing.H"
47#include <functional>
48
50/// This namespace documents compatibility features of \alib_boxing_nl and the
51/// \https{QT Class Library,www.qt.io}.
52namespace qt {
53
54
55
57/// Initializes \alib_boxing_nl in respect to boxing QT string-types.
58///
59/// This method is \b not automatically invoked with function \alib{Bootstrap}, because support
60/// for boxing QT string-types is optional and provided with the inclusion of header
61/// \implude{Compatibility.QTBoxing}.
62///
63/// In general, boxing of QT string-types works well without the one-time invocation of
64/// this function at the bootstrap section of a process.
65/// This method registers box-function \alib{boxing;FAppend} for QT string
66/// types when \ref alib_boxing_customizing_identity "custom boxing is bypassed" by wrapping the
67/// types in \c std::reference_wrapper<T>.
68/// The function is implemented with the help of \alib{boxing;FAppend::WrappedAppendable}
69/// for wrapped types \b QByteArray, \b QQLatin1String and \b QString, each for character types
70/// \b nchar and \b wchar.
71///
72/// \note
73/// If invoked after bootstrap and module \alib_monomem_nl is included in the \alibbuild,
74/// mutex \alib{monomem;GLOBAL_ALLOCATOR_LOCK} has to be locked before an invocation.
86}} // namespace [alib::boxing::compatibility::qt]
87
88#endif // !defined(ALIB_QT_LIB_NOT_FOUND) // this is only set in an automated test project
89
90#endif // HPP_ALIB_COMPATIBILITY_BOXING_QT
91
#define ALIB_ASSERT_MODULE(modulename)
Definition alib.inl:248
void BootstrapRegister(typename TFDecl::Signature function)
Definition box.inl:1254
static void WrappedAppendable(const Box &self, strings::TAString< TChar, TAllocator > &target)