ALib C++ Framework
by
Library Version:
2605 R0
Documentation generated by
Loading...
Searching...
No Matches
ALib
src
alib
boxing
qtboxing.hpp
Go to the documentation of this file.
1
//==================================================================================================
2
/// \file
3
/// This header-file is part of the \aliblong.
4
///
5
/// Copyright 2013-2026 A-Worx GmbH, Germany.
6
/// Published under #"mainpage_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
16
namespace
alib::boxing::compatibility
{
17
/// This namespace documents compatibility features of \alib_boxing_nl and the
18
/// \https{QT Class Library,www.qt.io}.
19
namespace
qt
{
20
21
void
BootstrapQTStringBoxing
();
22
/// Initializes \alib_boxing_nl in respect to boxing QT string-types.
23
///
24
/// This method is \b not automatically invoked with function #"Bootstrap", because support
25
/// for boxing QT string-types is optional and provided with the inclusion of header
26
/// #"F;ALib.Compatibility.QTBoxing.H".
27
///
28
/// In general, boxing of QT string-types works well without the one-time invocation of
29
/// this function at the bootstrap section of a process.
30
/// This method registers box-function #"FAppend" for QT string
31
/// types when #"alib_boxing_customizing_identity;custom boxing is bypassed" by wrapping the
32
/// types in \c std::reference_wrapper<T>.
33
/// The function is implemented with the help of #"FAppend::WrappedAppendable"
34
/// for wrapped types \b QByteArray, \b QQLatin1String and \b QString, each for character type
35
/// #"characters::nchar" and #"characters::wchar".
36
///
37
/// \note
38
/// If invoked after bootstrap and module \alib_monomem_nl is included in the \alibbuild,
39
/// mutex #"GLOBAL_ALLOCATOR_LOCK" has to be locked before an invocation.
40
inline
void
BootstrapQTStringBoxing
() {
41
#if ALIB_STRINGS
42
alib::boxing::BootstrapRegister<boxing::FAppend<nchar, lang::HeapAllocator>
, ::std::reference_wrapper<QByteArray> >(
boxing::FAppend<nchar, lang::HeapAllocator>::WrappedAppendable
<QByteArray> );
43
alib::boxing::BootstrapRegister<boxing::FAppend<wchar, lang::HeapAllocator>
, ::std::reference_wrapper<QByteArray> >(
boxing::FAppend<wchar, lang::HeapAllocator>::WrappedAppendable
<QByteArray> );
44
alib::boxing::BootstrapRegister<boxing::FAppend<nchar, lang::HeapAllocator>
, ::std::reference_wrapper<QLatin1String>>(
boxing::FAppend<nchar, lang::HeapAllocator>::WrappedAppendable
<QLatin1String> );
45
alib::boxing::BootstrapRegister<boxing::FAppend<wchar, lang::HeapAllocator>
, ::std::reference_wrapper<QLatin1String>>(
boxing::FAppend<wchar, lang::HeapAllocator>::WrappedAppendable
<QLatin1String> );
46
alib::boxing::BootstrapRegister<boxing::FAppend<nchar, lang::HeapAllocator>
, ::std::reference_wrapper<QString> >(
boxing::FAppend<nchar, lang::HeapAllocator>::WrappedAppendable
<QString> );
47
alib::boxing::BootstrapRegister<boxing::FAppend<wchar, lang::HeapAllocator>
, ::std::reference_wrapper<QString> >(
boxing::FAppend<wchar, lang::HeapAllocator>::WrappedAppendable
<QString> );
48
#endif
49
}
50
}}
// namespace [alib::boxing::compatibility::qt]
alib::boxing::compatibility::qt
Definition
qtboxing.hpp:19
alib::boxing::compatibility::qt::BootstrapQTStringBoxing
void BootstrapQTStringBoxing()
Definition
qtboxing.hpp:40
alib::boxing::compatibility
Definition
qtboxing.hpp:16
alib::boxing::BootstrapRegister
void BootstrapRegister(typename TFDecl::Signature function)
Definition
box.hpp:1166
alib::boxing::FAppend::WrappedAppendable
static void WrappedAppendable(const Box &self, strings::TAString< TChar, TAllocator > &target)