Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More GRASS direct functions
  • Loading branch information
blazek committed Dec 18, 2012
1 parent 9fce669 commit ce4b056
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 34 deletions.
64 changes: 44 additions & 20 deletions src/providers/grass/CMakeLists.txt
Expand Up @@ -109,17 +109,27 @@ SET ( FUNCTIONS
"G_free_tokens"
"G_fseek"
"G_ftell"
"G__getenv"
"G__getenv2"
"G_get_cat"
"G_get_cats_title"
"G_get_c_raster_cat"
"G_get_color"
"G_get_color_range"
"G_get_d_color_range"
"G_get_d_raster_cat"
"G_get_fp_range_min_max"
"G_get_f_raster_cat"
"G_get_gisrc_mode"
"G_get_histogram_cat"
"G_getl"
"G_getl2"
"G_get_range_min_max"
"G_get_raster_cat"
"G_get_raster_row_colors"
"G_get_raster_value_c"
"G_get_raster_value_d"
"G_get_raster_value_f"
"G_get_set_window"
"G_gettext"
"G_get_window"
Expand All @@ -135,21 +145,34 @@ SET ( FUNCTIONS
"G__init_null_patterns"
"G_init_range"
"G_init_raster_cats"
"G_interp_linear"
"G_interp_bilinear"
"G_interp_cubic"
"G_interp_bicubic"
"G_is_absolute_path"
"G_is_c_null_value"
"G_is_d_null_value"
"G_is_f_null_value"
"G_is_null_value"
"G_lat_scan"
"G_llres_scan"
"G_lon_scan"
"G_lookup_colors"
"G_lookup_c_raster_colors"
"G_lookup_d_raster_colors"
"G_lookup_f_raster_colors"
"G_lookup_raster_colors"
"G__ls"
"G_ls"
"G_ls_format"
"G__malloc"
"G_make_gyr_fp_colors"
"G_make_random_colors"
"G_mark_colors_as_fp"
"G_mkdir"
"G_northing_to_row"
"G_number_of_tokens"
"G__null_bitstream_size"
"G__projection_name"
"G_percent"
"G_program_name"
Expand All @@ -159,7 +182,9 @@ SET ( FUNCTIONS
"G_quant_get_limits"
"G_quant_init"
"G_quant_round"
"G_quant_set_neg_infinite_rule"
"G_putenv"
"G_raster_cmp"
"G_raster_size"
"G_read_key_value_file"
"G__realloc"
Expand Down Expand Up @@ -201,6 +226,8 @@ SET ( FUNCTIONS
"G_str_to_sql"
"G_str_to_upper"
"G_suppress_masking"
"G_suppress_warnings"
"G_system"
"G_tokenize"
"G_trim_decimal"
"G_update_fp_range"
Expand All @@ -221,26 +248,6 @@ SET ( FUNCTIONS
"G_zero_raster_buf"
)

# If a function, say G_1 called in true GRASS gis lib (loaded by QLibrary)
# calls another function G_2 which does not have to be reimplemented in gis fake lib:
# - on Linux: G_2 is resolved in original GRASS true gis lib and it is not necessary
# to add it to functions mapped in fake lib
# - on Windows: it seems that dynamic linker is searching for G_2 in the first loaded
# module of the same name, i.e. in our fake library, not in the original
# true GRASS gis lib, so we have to add all functions called in true lib
# also to mapped functions in fake lib
# Maybe that above is nonsese, but on Linux symbols are resolved when called, but on
# Windows, all symbols are resolved at beginning and thus not all missing symbols are
# always catched on Linux if testing with different data

IF(MSVC)
SET ( FUNCTIONS
${FUNCTIONS}
"G__getenv"
"G__getenv2"
"G_get_gisrc_mode"
)
ENDIF(MSVC)

# List of functions which are implemented in qgsgrassgislib.cpp and
# thus we only need prototype
Expand Down Expand Up @@ -280,20 +287,26 @@ SET ( FUNCTION_PROTOTYPES
"G_geodesic_distance_lon_to_lon"
"G_geodesic_distance"
"G_get_cellhd"
"G_get_cell_title"
"G_get_c_raster_row"
"G_get_c_raster_row_nomask"
"G_get_d_raster_row"
"G_get_d_raster_row_nomask"
"G_get_ellipsoid_parameters"
"G_get_f_raster_row"
"G_get_f_raster_row_nomask"
"G_get_map_row"
"G_get_map_row_nomask"
"G_get_null_value_row"
"G_get_projinfo"
"G_get_raster_map_type"
"G_get_raster_row"
"G_get_raster_row_nomask"
"G_get_reclass"
"G__gisinit"
"G_gisdbase"
"G_important_message"
"G__insert_color_into_lookup"
"G_legal_filename"
"G_location"
"G_location_path"
Expand All @@ -303,15 +316,22 @@ SET ( FUNCTION_PROTOTYPES
"G_mapset"
"G_maskfd"
"G_message"
"G__name_is_fully_qualified"
"G_number_of_cats"
"G_open_cell_new"
"G_open_cell_old"
"G_open_fp_cell_new"
"G_open_new"
"G_open_raster_new"
"G_parser"
"G_put_cell_title"
"G_put_c_raster_row"
"G_put_f_raster_row"
"G_put_d_raster_row"
"G_put_raster_row"
"G_quantize_fp_map_range"
"G_raster_map_is_fp"
"G_raster_map_type"
"G_read_cats"
"G_read_colors"
"G_read_fp_range"
Expand All @@ -320,22 +340,26 @@ SET ( FUNCTION_PROTOTYPES
"G_read_raster_cats"
"G_remove"
"G_rename"
"G_round_fp_map"
"G_set_cats_title"
"G_set_error_routine"
"G_set_geodesic_distance_lat1"
"G_set_geodesic_distance_lat2"
"G_set_quant_rules"
"G_short_history"
"G_snprintf"
"G_spawn"
"G_spawn_ex"
"G__temp_element"
"G_tempfile"
"G_unopen_cell"
"G_vasprintf"
"G_verbose_message"
"G_warning"
"G_write_colors"
"G_write_history"
"G_write_raster_cats"
"G_write_cats"
)

SET ( FUNCTIONS_ALL
Expand Down

0 comments on commit ce4b056

Please sign in to comment.