Files
logos-cpp-sdk/cpp-generator/experimental/lidl_gen_provider.h
Iuri Matias d633575677 add IDL parser & generator (wip) (#33)
* add IDL parser & generator (wip)

* fix fixtures issues affecting tests

* fix fixtures issues affecting tests
2026-03-31 16:29:35 -04:00

31 lines
1.2 KiB
C

#ifndef LIDL_GEN_PROVIDER_H
#define LIDL_GEN_PROVIDER_H
#include "lidl_ast.h"
#include <QString>
#include <QTextStream>
// Map a LIDL TypeExpr to the C++ std type string used in the pure implementation class
QString lidlTypeToStd(const TypeExpr& te);
// True if this type can be represented as a pure C++ std type (no Qt)
bool lidlIsStdConvertible(const TypeExpr& te);
// Generate the Qt glue header (plugin class + provider object with Q_INVOKABLE wrappers)
QString lidlMakeProviderHeader(const ModuleDecl& module,
const QString& implClass,
const QString& implHeader);
// Generate callMethod() + getMethods() dispatch source
QString lidlMakeProviderDispatch(const ModuleDecl& module);
// Full pipeline: parse .lidl, generate provider glue + dispatch + metadata
// Returns 0 on success, non-zero on error
int lidlGenerateProviderGlue(const QString& lidlPath,
const QString& implClass,
const QString& implHeader,
const QString& outputDir,
QTextStream& out, QTextStream& err);
#endif // LIDL_GEN_PROVIDER_H