<commit_before>/****************************************************************************
**
** Copyright (C) Qxt Foundation. Some rights reserved.
**
** This file is part of the QxtCore module of the Qt eXTension library
**
** This library is free software; you can redistribute it and/or modify it
** under the terms of th Common Public License, version 1.0, as published by
** IBM.
**
** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY
** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR
** FITNESS FOR A PARTICULAR PURPOSE.
**
** You should have received a copy of the CPL along with this file.
** See the LICENSE file and the cpl1.0.txt file included with the source
** distribution for more information. If you did not receive a copy of the
** license, contact the Qxt Foundation.
**
** <http://libqxt.sourceforge.net>  <<EMAIL>>
**
****************************************************************************/
#ifndef QXTMETAOBJECT_H
#define QXTMETAOBJECT_H

#include <QMetaObject>
#include <QVariant>
#include <QGenericArgument>
#include "qxtnullable.h"
class QByteArray;
class QxtBoundArgument;
class QxtBoundFunction;

#define QXT_PROTO_10ARGS(T) T p1 = T(), T p2 = T(), T p3 = T(), T p4 = T(), \
        T p5 = T(), T p6 = T(), T p7 = T(), T p8 = T(), T p9 = T(), T p10 = T()
#define QXT_IMPL_10ARGS(T) T p1, T p2, T p3, T p4, T p5, T p6, T p7, T p8, T p9, T p10
namespace QxtMetaObject
{
QByteArray QXT_CORE_EXPORT methodName(const char* method);
QByteArray QXT_CORE_EXPORT methodSignature(const char* method);

bool QXT_CORE_EXPORT isSignalOrSlot (const char* method);


QxtBoundFunction QXT_CORE_EXPORT * bind(QObject* recv, const char* invokable, QXT_PROTO_10ARGS(QVariant));
QxtBoundFunction QXT_CORE_EXPORT * bind(QObject* recv, const char* invokable, QXT_PROTO_10ARGS(QGenericArgument));
// Disabled for 0.2.4
//template <typename FP>
//QxtBoundFunction* bindFunction(FP funcPointer, QXT_PROTO_10ARGS(QGenericArgument));
//template <class T, typename FP>
//QxtBoundFunction* bindMethod(T recv, FP funcPointer, QXT_PROTO_10ARGS(QGenericArgument));
bool QXT_CORE_EXPORTconnect(QObject* sender, const char* signal, QxtBoundFunction* slot,
                            Qt::ConnectionType type = Qt::AutoConnection);
}

#define QXT_BIND(i) QGenericArgument("QxtBoundArgument", reinterpret_cast<void*>(i))

#endif // QXTMETAOBJECT_H<commit_msg>moved QXT_CORE_EXPORT to the beginning of the line<commit_after>/****************************************************************************
**
** Copyright (C) Qxt Foundation. Some rights reserved.
**
** This file is part of the QxtCore module of the Qt eXTension library
**
** This library is free software; you can redistribute it and/or modify it
** under the terms of th Common Public License, version 1.0, as published by
** IBM.
**
** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY
** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR
** FITNESS FOR A PARTICULAR PURPOSE.
**
** You should have received a copy of the CPL along with this file.
** See the LICENSE file and the cpl1.0.txt file included with the source
** distribution for more information. If you did not receive a copy of the
** license, contact the Qxt Foundation.
**
** <http://libqxt.sourceforge.net>  <<EMAIL>>
**
****************************************************************************/
#ifndef QXTMETAOBJECT_H
#define QXTMETAOBJECT_H

#include <QMetaObject>
#include <QVariant>
#include <QGenericArgument>
#include "qxtnullable.h"
class QByteArray;
class QxtBoundArgument;
class QxtBoundFunction;

#define QXT_PROTO_10ARGS(T) T p1 = T(), T p2 = T(), T p3 = T(), T p4 = T(), \
        T p5 = T(), T p6 = T(), T p7 = T(), T p8 = T(), T p9 = T(), T p10 = T()
#define QXT_IMPL_10ARGS(T) T p1, T p2, T p3, T p4, T p5, T p6, T p7, T p8, T p9, T p10
namespace QxtMetaObject
{
QXT_CORE_EXPORT QByteArray methodName(const char* method);
QXT_CORE_EXPORT QByteArray methodSignature(const char* method);

QXT_CORE_EXPORT bool isSignalOrSlot (const char* method);


QXT_CORE_EXPORT QxtBoundFunction* bind(QObject* recv, const char* invokable, QXT_PROTO_10ARGS(QVariant));
QXT_CORE_EXPORT QxtBoundFunction* bind(QObject* recv, const char* invokable, QXT_PROTO_10ARGS(QGenericArgument));
// Disabled for 0.2.4
//template <typename FP>
//QxtBoundFunction* bindFunction(FP funcPointer, QXT_PROTO_10ARGS(QGenericArgument));
//template <class T, typename FP>
//QxtBoundFunction* bindMethod(T recv, FP funcPointer, QXT_PROTO_10ARGS(QGenericArgument));
QXT_CORE_EXPORT bool connect(QObject* sender, const char* signal, QxtBoundFunction* slot,
                             Qt::ConnectionType type = Qt::AutoConnection);
}

#define QXT_BIND(i) QGenericArgument("QxtBoundArgument", reinterpret_cast<void*>(i))

#endif // QXTMETAOBJECT_H
{'fraction_non_alphanumeric': 0.1624874623871615, 'fraction_numerical': 0.016449348044132398, 'mean_word_length': 5.375959079283888, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5076380', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1529, 'n_words': 547}