GDS-Render v1.2.1
layer-settings.h File Reference

LayerSettings class header file. More...

#include <gtk/gtk.h>
Include dependency graph for layer-settings.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  layer_info
 Layer information. More...
 

Macros

#define GDS_RENDER_TYPE_LAYER_SETTINGS   (layer_settings_get_type())
 
#define CSV_LINE_MAX_LEN   (1024)
 Maximum length of a layer mapping CSV line. More...
 

Functions

LayerSettings * layer_settings_new ()
 New LayerSettings object. More...
 
int layer_settings_append_layer_info (LayerSettings *settings, struct layer_info *info)
 layer_settings_append_layer_info More...
 
void layer_settings_clear (LayerSettings *settings)
 Clear all layers in this settings object. More...
 
int layer_settings_remove_layer (LayerSettings *settings, int layer)
 Remove a specific layer number from the layer settings. More...
 
GList * layer_settings_get_layer_info_list (LayerSettings *settings)
 Get a GList with layer_info structs. More...
 
int layer_settings_to_csv (LayerSettings *settings, const char *path)
 Write layer settings to a CSV file. More...
 
int layer_settings_load_from_csv (LayerSettings *settings, const char *path)
 Load new layer Settings from CSV. More...
 

Detailed Description

LayerSettings class header file.

Author
Mario Hüttel mario.nosp@m..hue.nosp@m.ttel@.nosp@m.gmx..nosp@m.net

Definition in file layer-settings.h.

Macro Definition Documentation

◆ CSV_LINE_MAX_LEN

#define CSV_LINE_MAX_LEN   (1024)

Maximum length of a layer mapping CSV line.

Definition at line 56 of file layer-settings.h.

◆ GDS_RENDER_TYPE_LAYER_SETTINGS

#define GDS_RENDER_TYPE_LAYER_SETTINGS   (layer_settings_get_type())

Definition at line 51 of file layer-settings.h.

Function Documentation

◆ layer_settings_append_layer_info()

int layer_settings_append_layer_info ( LayerSettings *  settings,
struct layer_info info 
)

layer_settings_append_layer_info

Parameters
settingsLayerSettings object.
infoInfo to append
Returns
Error code. 0 if successful
Note
info is copied internally. You can free this struct afterwards.

Definition at line 111 of file layer-settings.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layer_settings_clear()

void layer_settings_clear ( LayerSettings *  settings)

Clear all layers in this settings object.

Parameters
settingsLayerSettings object

Definition at line 128 of file layer-settings.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layer_settings_get_layer_info_list()

GList * layer_settings_get_layer_info_list ( LayerSettings *  settings)

Get a GList with layer_info structs.

This function returns a GList with all layer_info structs in rendering order (bottom to top) that shall be rendered.

Parameters
settingsLayerSettings object
Returns
GList with struct layer_info elements.

Definition at line 166 of file layer-settings.c.

Here is the caller graph for this function:

◆ layer_settings_load_from_csv()

int layer_settings_load_from_csv ( LayerSettings *  settings,
const char *  path 
)

Load new layer Settings from CSV.

This function loads the layer information from a CSV file. All data inside the settings is cleared beforehand.

Parameters
settingsSettings to write to.
pathCSV file path
Returns
0 if successful

Definition at line 310 of file layer-settings.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layer_settings_new()

LayerSettings * layer_settings_new ( )

New LayerSettings object.

Returns
New object

Definition at line 106 of file layer-settings.c.

Here is the caller graph for this function:

◆ layer_settings_remove_layer()

int layer_settings_remove_layer ( LayerSettings *  settings,
int  layer 
)

Remove a specific layer number from the layer settings.

Parameters
settingsLayerSettings object
layerLayer number
Returns
Error code. 0 if successful

Definition at line 137 of file layer-settings.c.

Here is the call graph for this function:

◆ layer_settings_to_csv()

int layer_settings_to_csv ( LayerSettings *  settings,
const char *  path 
)

Write layer settings to a CSV file.

This function writes the layer settings to a CSV file according to the layer mapping specification (Layer Mapping File Specification)

Parameters
settingsLayerSettings object
pathOutput path for CSV file.
Returns
0 if successful

Definition at line 196 of file layer-settings.c.

Here is the call graph for this function:
Here is the caller graph for this function: