2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-10-18 17:13:33 +02:00
|
|
|
**
|
2014-01-07 13:27:11 +01:00
|
|
|
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
|
2012-10-02 09:12:39 +02:00
|
|
|
** Contact: http://www.qt-project.org/legal
|
2011-10-18 17:13:33 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-10-18 17:13:33 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
2014-10-01 13:21:18 +02:00
|
|
|
** conditions see http://www.qt.io/licensing. For further information
|
|
|
|
|
** use the contact form at http://www.qt.io/contact-us.
|
2011-10-18 17:13:33 +02:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
2014-10-01 13:21:18 +02:00
|
|
|
** General Public License version 2.1 or version 3 as published by the Free
|
|
|
|
|
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
|
|
|
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
|
|
|
** following information to ensure the GNU Lesser General Public License
|
|
|
|
|
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2012-10-02 09:12:39 +02:00
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2011-10-18 17:13:33 +02:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-10-18 17:13:33 +02:00
|
|
|
|
2011-07-08 09:56:02 +02:00
|
|
|
#ifndef CPPTOOLSREUSE_H
|
|
|
|
|
#define CPPTOOLSREUSE_H
|
|
|
|
|
|
|
|
|
|
#include "cpptools_global.h"
|
|
|
|
|
|
2014-06-10 16:05:14 -04:00
|
|
|
#include <cplusplus/CppDocument.h>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QChar;
|
|
|
|
|
class QStringRef;
|
|
|
|
|
class QTextCursor;
|
|
|
|
|
QT_END_NAMESPACE
|
2011-07-08 09:56:02 +02:00
|
|
|
|
2011-11-14 13:14:39 +01:00
|
|
|
namespace CPlusPlus {
|
2014-06-10 16:05:14 -04:00
|
|
|
class Macro;
|
2011-11-14 13:14:39 +01:00
|
|
|
class Symbol;
|
|
|
|
|
class LookupContext;
|
2013-04-02 11:28:11 +02:00
|
|
|
} // namespace CPlusPlus
|
2011-11-14 13:14:39 +01:00
|
|
|
|
2011-07-08 09:56:02 +02:00
|
|
|
namespace CppTools {
|
|
|
|
|
|
|
|
|
|
void CPPTOOLS_EXPORT moveCursorToEndOfIdentifier(QTextCursor *tc);
|
2012-02-16 15:09:56 +01:00
|
|
|
void CPPTOOLS_EXPORT moveCursorToStartOfIdentifier(QTextCursor *tc);
|
2011-07-08 09:56:02 +02:00
|
|
|
|
2014-06-10 16:05:14 -04:00
|
|
|
bool CPPTOOLS_EXPORT isQtKeyword(const QStringRef &text);
|
2011-11-14 13:14:39 +01:00
|
|
|
|
2014-05-08 09:48:27 -04:00
|
|
|
bool CPPTOOLS_EXPORT isValidAsciiIdentifierChar(const QChar &ch);
|
|
|
|
|
bool CPPTOOLS_EXPORT isValidFirstIdentifierChar(const QChar &ch);
|
|
|
|
|
bool CPPTOOLS_EXPORT isValidIdentifierChar(const QChar &ch);
|
2011-12-21 18:24:14 +01:00
|
|
|
bool CPPTOOLS_EXPORT isValidIdentifier(const QString &s);
|
|
|
|
|
|
2014-06-10 16:05:14 -04:00
|
|
|
QString CPPTOOLS_EXPORT identifierUnderCursor(QTextCursor *cursor);
|
|
|
|
|
|
|
|
|
|
bool CPPTOOLS_EXPORT isOwnershipRAIIType(CPlusPlus::Symbol *symbol,
|
|
|
|
|
const CPlusPlus::LookupContext &context);
|
|
|
|
|
|
|
|
|
|
const CPlusPlus::Macro CPPTOOLS_EXPORT *findCanonicalMacro(const QTextCursor &cursor,
|
|
|
|
|
CPlusPlus::Document::Ptr document);
|
2010-11-03 11:02:25 +01:00
|
|
|
|
2012-10-10 21:00:48 +02:00
|
|
|
QString CPPTOOLS_EXPORT correspondingHeaderOrSource(const QString &fileName, bool *wasHeader = 0);
|
2014-05-19 11:17:39 -04:00
|
|
|
void CPPTOOLS_EXPORT switchHeaderSource();
|
2012-10-10 21:00:48 +02:00
|
|
|
|
2011-07-08 09:56:02 +02:00
|
|
|
} // CppTools
|
|
|
|
|
|
|
|
|
|
#endif // CPPTOOLSREUSE_H
|