2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2008-12-02 14:09:21 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2013-03-27 18:54:03 +01:00
|
|
|
#include <cplusplus/NameVisitor.h>
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QString>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
namespace CPlusPlus {
|
|
|
|
|
|
|
|
|
|
class Overview;
|
|
|
|
|
|
|
|
|
|
class CPLUSPLUS_EXPORT NamePrettyPrinter: protected NameVisitor
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
NamePrettyPrinter(const Overview *overview);
|
|
|
|
|
virtual ~NamePrettyPrinter();
|
|
|
|
|
|
|
|
|
|
const Overview *overview() const;
|
2009-12-01 12:46:15 +01:00
|
|
|
QString operator()(const Name *name);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
QString switchName(const QString &name = QString());
|
|
|
|
|
|
2010-09-02 11:59:01 +02:00
|
|
|
virtual void visit(const Identifier *name);
|
2009-12-01 12:46:15 +01:00
|
|
|
virtual void visit(const TemplateNameId *name);
|
|
|
|
|
virtual void visit(const DestructorNameId *name);
|
|
|
|
|
virtual void visit(const OperatorNameId *name);
|
|
|
|
|
virtual void visit(const ConversionNameId *name);
|
|
|
|
|
virtual void visit(const QualifiedNameId *name);
|
|
|
|
|
virtual void visit(const SelectorNameId *name);
|
2013-04-10 23:30:18 +02:00
|
|
|
virtual void visit(const AnonymousNameId *name);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
const Overview *_overview;
|
|
|
|
|
QString _name;
|
|
|
|
|
};
|
|
|
|
|
|
2011-02-04 09:52:39 +01:00
|
|
|
} // namespace CPlusPlus
|