KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
QString_c.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11#include "QString_c.h"
12
13
14#include <iostream>
15
16#include <cassert>
17
18
19namespace Dartagnan {
20
21typedef int (*CleanupCallback)(void *thisPtr);
23
24template<typename T>
25struct ValueWrapper
26{
27 T value;
28};
29
30}
37 : ::QString(str)
38{
39}
40const char *QString_wrapper::data() const
41{
42 return ::QString::data();
43}
45{
46 return ::QString::fromUtf8(str);
47}
49{
50 return ::QString::isEmpty();
51}
55
56}
57static QString *fromPtr(void *ptr)
58{
59 return reinterpret_cast<QString *>(ptr);
60}
65extern "C" {
66void c_QString_Finalizer(void *cppObj)
67{
68 delete reinterpret_cast<KDDockWidgetsBindings_wrappersNS::QString_wrapper *>(cppObj);
69}
71{
73 return reinterpret_cast<void *>(ptr);
74}
75void *c_QString__constructor_char(const char *str)
76{
78 return reinterpret_cast<void *>(ptr);
79}
80// data() const
81const char *c_QString__data(void *thisObj)
82{
83 const auto &result = fromPtr(thisObj)->data();
84 return result;
85}
86// fromUtf8(const char * str)
87void *c_static_QString__fromUtf8_char(const char *str)
88{
89 const auto &result = new Dartagnan::ValueWrapper<QString> { KDDockWidgetsBindings_wrappersNS::QString_wrapper::fromUtf8(str) };
90 free(( char * )str);
91 return result;
92}
93// isEmpty() const
94bool c_QString__isEmpty(void *thisObj)
95{
96 const auto &result = fromPtr(thisObj)->isEmpty();
97 return result;
98}
99void c_QString__destructor(void *thisObj)
100{
101 delete fromPtr(thisObj);
102}
103}
void c_QString_Finalizer(void *cppObj)
Definition QString_c.cpp:66
bool c_QString__isEmpty(void *thisObj)
Definition QString_c.cpp:94
const char * c_QString__data(void *thisObj)
Definition QString_c.cpp:81
static QString * fromPtr(void *ptr)
Definition QString_c.cpp:57
void c_QString__destructor(void *thisObj)
Definition QString_c.cpp:99
void * c_QString__constructor()
Definition QString_c.cpp:70
void * c_static_QString__fromUtf8_char(const char *str)
Definition QString_c.cpp:87
static KDDockWidgetsBindings_wrappersNS::QString_wrapper * fromWrapperPtr(void *ptr)
Definition QString_c.cpp:61
void * c_QString__constructor_char(const char *str)
Definition QString_c.cpp:75
static QString fromUtf8(const char *str)
Definition QString_c.cpp:44
int(* CleanupCallback)(void *thisPtr)
Definition Config_c.cpp:21
static CleanupCallback s_cleanupCallback
Definition Config_c.cpp:22
QChar * data()
bool isEmpty() const const

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8