18#ifndef QGSPROCESSINGALGORITHMP_H
19#define QGSPROCESSINGALGORITHMP_H
22#include <unordered_map>
33using namespace Qt::StringLiterals;
35#define EXCLUDE_CPPCHECK
36#ifdef EXCLUDE_CPPCHECK
38#ifndef CMAKE_SOURCE_DIR
39#define CMAKE_SOURCE_DIR ""
46namespace QgsProcessingAlgorithmPrivate
49 template<
size_t N>
struct QgsStringLiteral
51 constexpr QgsStringLiteral(
const char ( &str )[N] )
53 for (
size_t i = 0; i < N; ++i )
61 template<
typename ClassType,
int LineNum, QgsStringLiteral File>
struct QgsSourceLocationRegistrar
63 static const bool registered;
64 static bool doRegister()
68 registry[std::type_index(
typeid( ClassType ) )] = QString::fromUtf8( File.value ).mid(
sFilePrefixLength ) + u
":"_s + QString::number( LineNum );
74 template<
typename ClassType,
int LineNum, QgsStringLiteral File>
75 const bool QgsSourceLocationRegistrar<ClassType, LineNum, File>::registered = QgsSourceLocationRegistrar<ClassType, LineNum, File>::doRegister();
81#define QGS_MARK_ALGORITHM_SOURCE ( void ) QgsProcessingAlgorithmPrivate::QgsSourceLocationRegistrar<std::remove_pointer_t<decltype( this )>, __LINE__, __FILE__>::registered;
std::unordered_map< std::type_index, QString > & algorithmSourceRegistry()
constexpr int sFilePrefixLength