Program Listing for File preprocessor.h

Return to documentation for file (api/include/pntos/plugins/preprocessor.h)

#pragma once

#include <pntos/plugins/common.h>

#ifdef __cplusplus
extern "C" {
#endif

PNTOS_ASSUME_NONNULL_BEGIN

typedef struct PntosPreprocessor {
    PntosManagedMemory* memory;

    PntosMessageArray* PNTOS_NULLABLE (*process_pntos_message)(struct PntosPreprocessor* self,
                                                               PntosMessage* message);
} PntosPreprocessor;

typedef struct PntosPreprocessorPlugin {
    PntosCommonPlugin common;

    size_t num_preprocessors;

    char** preprocessor_identifiers;

    PntosPreprocessor* PNTOS_NULLABLE (*new_preprocessor)(struct PntosPreprocessorPlugin* self,
                                                          size_t preprocessor_index,
                                                          char* PNTOS_NULLABLE config_group);
} PntosPreprocessorPlugin;

PNTOS_ASSUME_NONNULL_END

#ifdef __cplusplus
}
#endif