GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Key_Value management. More...
#include <string.h>
#include <stdlib.h>
#include <grass/gis.h>
Go to the source code of this file.
Functions | |
struct Key_Value * | G_create_key_value (void) |
Allocate and initialize Key_Value structure. More... | |
int | G_set_key_value (const char *key, const char *value, struct Key_Value *kv) |
Set value for given key. More... | |
char * | G_find_key_value (const char *key, const struct Key_Value *kv) |
Find given key. More... | |
int | G_free_key_value (struct Key_Value *kv) |
Free allocated Key_Value structure. More... | |
Key_Value management.
(C) 2001-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file key_value1.c.
struct Key_Value* G_create_key_value | ( | void | ) |
Allocate and initialize Key_Value structure.
Definition at line 25 of file key_value1.c.
References NULL.
Referenced by G3d_writeHeader(), G__write_fp_format(), G_fread_key_value(), GPJ_get_ellipsoid_params(), and GPJ_osr_to_grass().
char* G_find_key_value | ( | const char * | key, |
const struct Key_Value * | kv | ||
) |
Find given key.
[in] | key | key to be found |
[in] | kv | Key_value structure |
Definition at line 128 of file key_value1.c.
Referenced by G3d_keyGetDouble(), G3d_keyGetInt(), G3d_keyGetString(), G3d_keyGetValue(), G__check_fp_type(), G_ask_proj_name(), G_compare_projections(), G_get_datumparams_from_projinfo(), G_get_gdal_link(), G_lookup_key_value_from_file(), GPJ__get_datum_params(), GPJ__get_ellipsoid_params(), GPJ_grass_to_osr(), and pj_get_kv().
int G_free_key_value | ( | struct Key_Value * | kv | ) |
Free allocated Key_Value structure.
[in] | kv | Key_Value structure |
Definition at line 145 of file key_value1.c.
Referenced by G3d_readHeader(), G3d_readWindow(), G3d_writeHeader(), G__check_fp_type(), G__write_fp_format(), G_database_datum_name(), G_fread_key_value(), G_get_ellipsoid_parameters(), G_lookup_key_value_from_file(), G_update_key_value_file(), GPJ_get_datum_params(), GPJ_get_ellipsoid_params(), and GPJ_osr_to_grass().
int G_set_key_value | ( | const char * | key, |
const char * | value, | ||
struct Key_Value * | kv | ||
) |
Set value for given key.
If key has spaces in it, this will break the logic so rule is: NO SPACES IN key.
[in] | key | key to be set up |
[in] | value | value for given key |
[in,out] | kv | Key_value structure to be modified |
Definition at line 55 of file key_value1.c.
References G_free(), n, NULL, and tools::size.
Referenced by G3d_keySetDouble(), G3d_keySetInt(), G3d_keySetString(), G3d_keySetValue(), G__write_fp_format(), G_fread_key_value(), G_update_key_value_file(), and GPJ_osr_to_grass().