# SDL Visual Test: C:/Users/DELL/Work/sdlvisualtest/visualtest/include/SDL_visualtest_sut_configparser.h Source File

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SDL_visualtest_sut_configparser.h
Go to the documentation of this file.
/* See COPYING.txt for the full license governing this code. */
#ifndef _SDL_visualtest_sut_configparser_h
#define _SDL_visualtest_sut_configparser_h
#define MAX_SUTOPTION_NAME_LEN 100
#define MAX_SUTOPTION_CATEGORY_LEN 40
#define MAX_SUTOPTION_ENUMVAL_LEN 40
#define MAX_SUTOPTION_LINE_LENGTH 256
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
SDL_SUT_OPTIONTYPE_STRING = 0,
SDL_SUT_OPTIONTYPE_INT,
SDL_SUT_OPTIONTYPE_ENUM,
SDL_SUT_OPTIONTYPE_BOOL
} SDLVisualTest_SUTOptionType;
typedef struct SDLVisualTest_SUTIntRange {
int min;
int max;
} SDLVisualTest_SUTIntRange;
typedef struct SDLVisualTest_SUTOption {
char name[MAX_SUTOPTION_NAME_LEN];
char** categories;
SDLVisualTest_SUTOptionType type;
SDL_bool required;
union {
SDLVisualTest_SUTIntRange range;
char** enum_values;
} data;
} SDLVisualTest_SUTOption;
typedef struct SDLVisualTest_SUTConfig
{
SDLVisualTest_SUTOption* options;
int num_options;
} SDLVisualTest_SUTConfig;
int SDLVisualTest_ParseSUTConfig(char* file, SDLVisualTest_SUTConfig* config);
void SDLVisualTest_FreeSUTConfig(SDLVisualTest_SUTConfig* config);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#endif /* _SDL_visualtest_sut_configparser_h */