1#ifndef _ASSETS_PREPROCESSOR_H_
2#define _ASSETS_PREPROCESSOR_H_
char * text
Buffer holding text data.
processorType_t type
The type of this asset processor.
Definition assets_preprocessor.h:763
bool(* processFn_t)(processorInput_t *arg)
A function that performs asset processing on a file.
Definition assets_preprocessor.h:746
size_t length
Length of binary data.
processorFileData_t out
Holds the output data in whichever format was configured for the processor.
Definition assets_preprocessor.h:732
char * section
The section name only.
Definition assets_preprocessor.h:687
char * value
The value string.
Definition assets_preprocessor.h:697
const char * exec
An executable command to call for processing matching files.
processorFormat_t outFmt
The format this processor returns its output data in. Ignored for exec.
Definition assets_preprocessor.h:760
char * name
The key name.
Definition assets_preprocessor.h:692
FILE * file
Holds file handle for FMT_FILE or FMT_FILE_BIN formats.
Definition assets_preprocessor.h:640
const char * inFilename
Holds the input filename for convenience and error reporting.
Definition assets_preprocessor.h:735
processorFormat_t inFmt
The format this processor accepts its input data in. Ignored for exec.
Definition assets_preprocessor.h:757
optPair_t * pairs
The array of options.
Definition assets_preprocessor.h:717
const assetProcessor_t * processor
A pointer to the processor used to transform the files.
Definition assets_preprocessor.h:787
uint8_t * data
Buffer holding binary data.
const char * name
A name for this asset processor, if referenced.
Definition assets_preprocessor.h:754
char ** lines
Array of string pointers for each line.
const processorOptions_t * options
Holds a pointer to any configuration options in use for this file.
Definition assets_preprocessor.h:738
const char * inExt
The input file extension to match.
Definition assets_preprocessor.h:781
size_t textSize
The size of the text data, including NUL terminator.
const char * outExt
The output file extension to write.
Definition assets_preprocessor.h:784
processFn_t function
A function to call for processing matching files.
processorFormat_t
The format that this asset processor accepts or returns its data in.
Definition assets_preprocessor.h:617
@ FMT_FILE_BIN
An opened file handle (in binary mode) is passed for the file.
Definition assets_preprocessor.h:621
@ FMT_DATA
A buffer containing a file's raw binary data is passed.
Definition assets_preprocessor.h:623
@ FMT_LINES
A text file's data is passed as an array of one string per line.
Definition assets_preprocessor.h:627
@ FMT_FILE
An opened file handle is passed for the file.
Definition assets_preprocessor.h:619
@ FMT_TEXT
A text file's data is passed as an ordinary string.
Definition assets_preprocessor.h:625
const processorFileData_t in
Holds the input data in whichever format was configured for the processor.
Definition assets_preprocessor.h:729
size_t optionCount
The number of options contained in this list.
Definition assets_preprocessor.h:712
size_t lineCount
The number of string pointers in the array.
processorType_t
Specifies which type of asset processor is being defined.
Definition assets_preprocessor.h:605
@ EXEC
Processor that executes a shell command to process assets.
Definition assets_preprocessor.h:610
@ FUNCTION
Processor that calls a function pointer to process assets.
Definition assets_preprocessor.h:607
Defines an asset processor.
Definition assets_preprocessor.h:752
Associates an input and output extension to a processor.
Definition assets_preprocessor.h:779
Holds a single key-value pair.
Definition assets_preprocessor.h:682
Holds a list of key-value option pairs.
Definition assets_preprocessor.h:708
Holds processor input or output data.
Definition assets_preprocessor.h:635