Snoopy Version 6.0 (Albert)
libconfig.h File Reference
#include <stdio.h>
Include dependency graph for libconfig.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  config_value_t
struct  config_setting_t
struct  config_list_t
struct  config_t

Defines

#define LIBCONFIG_API
#define CONFIG_TYPE_NONE   0
#define CONFIG_TYPE_GROUP   1
#define CONFIG_TYPE_INT   2
#define CONFIG_TYPE_INT64   3
#define CONFIG_TYPE_FLOAT   4
#define CONFIG_TYPE_STRING   5
#define CONFIG_TYPE_BOOL   6
#define CONFIG_TYPE_ARRAY   7
#define CONFIG_TYPE_LIST   8
#define CONFIG_FORMAT_DEFAULT   0
#define CONFIG_FORMAT_HEX   1
#define CONFIG_OPTION_AUTOCONVERT   0x01
#define CONFIG_TRUE   (1)
#define CONFIG_FALSE   (0)
#define config_setting_type(S)   ((S)->type)
#define config_setting_is_group(S)   ((S)->type == CONFIG_TYPE_GROUP)
#define config_setting_is_array(S)   ((S)->type == CONFIG_TYPE_ARRAY)
#define config_setting_is_list(S)   ((S)->type == CONFIG_TYPE_LIST)
#define config_setting_is_aggregate(S)
#define config_setting_is_number(S)
#define config_setting_is_scalar(S)
#define config_setting_name(S)   ((S)->name)
#define config_setting_parent(S)   ((S)->parent)
#define config_setting_is_root(S)   ((S)->parent ? CONFIG_FALSE : CONFIG_TRUE)
#define config_setting_get_hook(S)   ((S)->hook)
#define config_root_setting(C)   ((C)->root)
#define config_setting_source_line(C)   ((C)->line)
#define config_error_text(C)   ((C)->error_text)
#define config_error_line(C)   ((C)->error_line)

Typedefs

typedef union config_value_t config_value_t
typedef struct config_setting_t config_setting_t
typedef struct config_list_t config_list_t
typedef struct config_t config_t

Functions

LIBCONFIG_API int config_read (config_t *config, FILE *stream)
LIBCONFIG_API void config_write (const config_t *config, FILE *stream)
LIBCONFIG_API void config_set_auto_convert (config_t *config, int flag)
LIBCONFIG_API int config_get_auto_convert (const config_t *config)
LIBCONFIG_API int config_read_file (config_t *config, const char *filename)
LIBCONFIG_API int config_write_file (config_t *config, const char *filename)
LIBCONFIG_API void config_set_destructor (config_t *config, void(*destructor)(void *))
LIBCONFIG_API void config_init (config_t *config)
LIBCONFIG_API void config_destroy (config_t *config)
LIBCONFIG_API long config_setting_get_int (const config_setting_t *setting)
LIBCONFIG_API long long config_setting_get_int64 (const config_setting_t *setting)
LIBCONFIG_API double config_setting_get_float (const config_setting_t *setting)
LIBCONFIG_API int config_setting_get_bool (const config_setting_t *setting)
LIBCONFIG_API const char * config_setting_get_string (const config_setting_t *setting)
LIBCONFIG_API int config_setting_lookup_int (const config_setting_t *setting, const char *name, long *value)
LIBCONFIG_API int config_setting_lookup_int64 (const config_setting_t *setting, const char *name, long long *value)
LIBCONFIG_API int config_setting_lookup_float (const config_setting_t *setting, const char *name, double *value)
LIBCONFIG_API int config_setting_lookup_bool (const config_setting_t *setting, const char *name, int *value)
LIBCONFIG_API int config_setting_lookup_string (const config_setting_t *setting, const char *name, const char **value)
LIBCONFIG_API int config_setting_set_int (config_setting_t *setting, long value)
LIBCONFIG_API int config_setting_set_int64 (config_setting_t *setting, long long value)
LIBCONFIG_API int config_setting_set_float (config_setting_t *setting, double value)
LIBCONFIG_API int config_setting_set_bool (config_setting_t *setting, int value)
LIBCONFIG_API int config_setting_set_string (config_setting_t *setting, const char *value)
LIBCONFIG_API int config_setting_set_format (config_setting_t *setting, short format)
LIBCONFIG_API short config_setting_get_format (config_setting_t *setting)
LIBCONFIG_API long config_setting_get_int_elem (const config_setting_t *setting, int idx)
LIBCONFIG_API long long config_setting_get_int64_elem (const config_setting_t *setting, int idx)
LIBCONFIG_API double config_setting_get_float_elem (const config_setting_t *setting, int idx)
LIBCONFIG_API int config_setting_get_bool_elem (const config_setting_t *setting, int idx)
LIBCONFIG_API const char * config_setting_get_string_elem (const config_setting_t *setting, int idx)
LIBCONFIG_API config_setting_tconfig_setting_set_int_elem (config_setting_t *setting, int idx, long value)
LIBCONFIG_API config_setting_tconfig_setting_set_int64_elem (config_setting_t *setting, int idx, long long value)
LIBCONFIG_API config_setting_tconfig_setting_set_float_elem (config_setting_t *setting, int idx, double value)
LIBCONFIG_API config_setting_tconfig_setting_set_bool_elem (config_setting_t *setting, int idx, int value)
LIBCONFIG_API config_setting_tconfig_setting_set_string_elem (config_setting_t *setting, int idx, const char *value)
LIBCONFIG_API int config_setting_index (const config_setting_t *setting)
LIBCONFIG_API int config_setting_length (const config_setting_t *setting)
LIBCONFIG_API config_setting_tconfig_setting_get_elem (const config_setting_t *setting, unsigned int idx)
LIBCONFIG_API config_setting_tconfig_setting_get_member (const config_setting_t *setting, const char *name)
LIBCONFIG_API config_setting_tconfig_setting_add (config_setting_t *parent, const char *name, int type)
LIBCONFIG_API int config_setting_remove (config_setting_t *parent, const char *name)
LIBCONFIG_API int config_setting_remove_elem (config_setting_t *parent, unsigned int idx)
LIBCONFIG_API void config_setting_set_hook (config_setting_t *setting, void *hook)
LIBCONFIG_API config_setting_tconfig_lookup (const config_t *config, const char *path)
LIBCONFIG_API int config_lookup_int (const config_t *config, const char *path, long *value)
LIBCONFIG_API int config_lookup_int64 (const config_t *config, const char *path, long long *value)
LIBCONFIG_API int config_lookup_float (const config_t *config, const char *path, double *value)
LIBCONFIG_API int config_lookup_bool (const config_t *config, const char *path, int *value)
LIBCONFIG_API int config_lookup_string (const config_t *config, const char *path, const char **value)

Define Documentation

#define config_error_line (   C)    ((C)->error_line)
#define config_error_text (   C)    ((C)->error_text)
#define CONFIG_FALSE   (0)
#define CONFIG_FORMAT_DEFAULT   0
#define CONFIG_FORMAT_HEX   1
#define CONFIG_OPTION_AUTOCONVERT   0x01
#define config_root_setting (   C)    ((C)->root)
#define config_setting_get_hook (   S)    ((S)->hook)
#define config_setting_is_aggregate (   S)
Value:
(((S)->type == CONFIG_TYPE_GROUP) || ((S)->type == CONFIG_TYPE_LIST)  \
   || ((S)->type == CONFIG_TYPE_ARRAY))
#define config_setting_is_array (   S)    ((S)->type == CONFIG_TYPE_ARRAY)
#define config_setting_is_group (   S)    ((S)->type == CONFIG_TYPE_GROUP)
#define config_setting_is_list (   S)    ((S)->type == CONFIG_TYPE_LIST)
#define config_setting_is_number (   S)
Value:
(((S)->type == CONFIG_TYPE_INT)                                       \
   || ((S)->type == CONFIG_TYPE_INT64)                                  \
   || ((S)->type == CONFIG_TYPE_FLOAT))
#define config_setting_is_root (   S)    ((S)->parent ? CONFIG_FALSE : CONFIG_TRUE)
#define config_setting_is_scalar (   S)
Value:
(((S)->type == CONFIG_TYPE_BOOL) || ((S)->type == CONFIG_TYPE_STRING) \
   || config_setting_is_number(S))
#define config_setting_name (   S)    ((S)->name)
#define config_setting_parent (   S)    ((S)->parent)
#define config_setting_source_line (   C)    ((C)->line)
#define config_setting_type (   S)    ((S)->type)
#define CONFIG_TRUE   (1)
#define CONFIG_TYPE_ARRAY   7
#define CONFIG_TYPE_BOOL   6
#define CONFIG_TYPE_FLOAT   4
#define CONFIG_TYPE_GROUP   1
#define CONFIG_TYPE_INT   2
#define CONFIG_TYPE_INT64   3
#define CONFIG_TYPE_LIST   8
#define CONFIG_TYPE_NONE   0
#define CONFIG_TYPE_STRING   5
#define LIBCONFIG_API

Typedef Documentation

typedef struct config_list_t config_list_t
typedef struct config_t config_t

Function Documentation

LIBCONFIG_API void config_destroy ( config_t config)

Here is the caller graph for this function:

LIBCONFIG_API int config_get_auto_convert ( const config_t config)

Here is the caller graph for this function:

LIBCONFIG_API void config_init ( config_t config)

Here is the caller graph for this function:

LIBCONFIG_API config_setting_t* config_lookup ( const config_t config,
const char *  path 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_lookup_bool ( const config_t config,
const char *  path,
int *  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_lookup_float ( const config_t config,
const char *  path,
double *  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_lookup_int ( const config_t config,
const char *  path,
long *  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_lookup_int64 ( const config_t config,
const char *  path,
long long *  value 
)

Here is the call graph for this function:

LIBCONFIG_API int config_lookup_string ( const config_t config,
const char *  path,
const char **  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_read ( config_t config,
FILE *  stream 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_read_file ( config_t config,
const char *  filename 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API void config_set_auto_convert ( config_t config,
int  flag 
)
LIBCONFIG_API void config_set_destructor ( config_t config,
void(*)(void *)  destructor 
)
LIBCONFIG_API config_setting_t* config_setting_add ( config_setting_t parent,
const char *  name,
int  type 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_setting_get_bool ( const config_setting_t setting)

Here is the caller graph for this function:

LIBCONFIG_API int config_setting_get_bool_elem ( const config_setting_t setting,
int  idx 
)

Here is the call graph for this function:

LIBCONFIG_API config_setting_t* config_setting_get_elem ( const config_setting_t setting,
unsigned int  idx 
)

Here is the caller graph for this function:

LIBCONFIG_API double config_setting_get_float ( const config_setting_t setting)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API double config_setting_get_float_elem ( const config_setting_t setting,
int  idx 
)

Here is the call graph for this function:

LIBCONFIG_API short config_setting_get_format ( config_setting_t setting)
LIBCONFIG_API long config_setting_get_int ( const config_setting_t setting)

Here is the caller graph for this function:

LIBCONFIG_API long long config_setting_get_int64 ( const config_setting_t setting)

Here is the caller graph for this function:

LIBCONFIG_API long long config_setting_get_int64_elem ( const config_setting_t setting,
int  idx 
)

Here is the call graph for this function:

LIBCONFIG_API long config_setting_get_int_elem ( const config_setting_t setting,
int  idx 
)

Here is the call graph for this function:

LIBCONFIG_API config_setting_t* config_setting_get_member ( const config_setting_t setting,
const char *  name 
)

Here is the caller graph for this function:

LIBCONFIG_API const char* config_setting_get_string ( const config_setting_t setting)

Here is the caller graph for this function:

LIBCONFIG_API const char* config_setting_get_string_elem ( const config_setting_t setting,
int  idx 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_setting_index ( const config_setting_t setting)

Here is the call graph for this function:

LIBCONFIG_API int config_setting_length ( const config_setting_t setting)

Here is the caller graph for this function:

LIBCONFIG_API int config_setting_lookup_bool ( const config_setting_t setting,
const char *  name,
int *  value 
)

Here is the call graph for this function:

LIBCONFIG_API int config_setting_lookup_float ( const config_setting_t setting,
const char *  name,
double *  value 
)

Here is the call graph for this function:

LIBCONFIG_API int config_setting_lookup_int ( const config_setting_t setting,
const char *  name,
long *  value 
)

Here is the call graph for this function:

LIBCONFIG_API int config_setting_lookup_int64 ( const config_setting_t setting,
const char *  name,
long long *  value 
)

Here is the call graph for this function:

LIBCONFIG_API int config_setting_lookup_string ( const config_setting_t setting,
const char *  name,
const char **  value 
)

Here is the call graph for this function:

LIBCONFIG_API int config_setting_remove ( config_setting_t parent,
const char *  name 
)
LIBCONFIG_API int config_setting_remove_elem ( config_setting_t parent,
unsigned int  idx 
)
LIBCONFIG_API int config_setting_set_bool ( config_setting_t setting,
int  value 
)

Here is the caller graph for this function:

LIBCONFIG_API config_setting_t* config_setting_set_bool_elem ( config_setting_t setting,
int  idx,
int  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_setting_set_float ( config_setting_t setting,
double  value 
)

Here is the caller graph for this function:

LIBCONFIG_API config_setting_t* config_setting_set_float_elem ( config_setting_t setting,
int  idx,
double  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_setting_set_format ( config_setting_t setting,
short  format 
)

Here is the caller graph for this function:

LIBCONFIG_API void config_setting_set_hook ( config_setting_t setting,
void *  hook 
)
LIBCONFIG_API int config_setting_set_int ( config_setting_t setting,
long  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_setting_set_int64 ( config_setting_t setting,
long long  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API config_setting_t* config_setting_set_int64_elem ( config_setting_t setting,
int  idx,
long long  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API config_setting_t* config_setting_set_int_elem ( config_setting_t setting,
int  idx,
long  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API int config_setting_set_string ( config_setting_t setting,
const char *  value 
)

Here is the caller graph for this function:

LIBCONFIG_API config_setting_t* config_setting_set_string_elem ( config_setting_t setting,
int  idx,
const char *  value 
)

Here is the call graph for this function:

Here is the caller graph for this function:

LIBCONFIG_API void config_write ( const config_t config,
FILE *  stream 
)
LIBCONFIG_API int config_write_file ( config_t config,
const char *  filename 
)