![]() |
![]() |
![]() |
Libral, the Rubrica Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
lookuplookup |
RLookupTable; RPairTable; gint r_lookup_table_str2enum (RLookupTable *table, gchar *str); gchar* r_lookup_table_enum2str (RLookupTable *table, gint value); gchar* r_lookup_table_str2lbl (RLookupTable *table, gchar *str); gchar* r_lookup_table_enum2lbl (RLookupTable *table, gint value); gint r_lookup_table_get_pair_left (RPairTable *table, gint item); gint r_lookup_table_get_pair_right (RPairTable *table, gint item); gchar* r_lookup_table_pair2str (RPairTable *table, gint item);
typedef struct { gchar* str; /* a string */ gchar* lbl; /* the string translation */ gint val; /* the value associated to the string */ } RLookupTable;
typedef struct { gchar* str; /* a string */ gint left; /* first value associated to str */ gint right; /* second value associated to str */ } RPairTable;
gint r_lookup_table_str2enum (RLookupTable *table, gchar *str);
look for the value associated to the given string
|
a RLookupTable |
|
a gchar* |
Returns : |
a gint |
gchar* r_lookup_table_enum2str (RLookupTable *table, gint value);
look for the string associated to the given value
|
a RLookupTable |
|
a gint |
Returns : |
a string |
gchar* r_lookup_table_str2lbl (RLookupTable *table, gchar *str);
look for the localization associated to the given string
|
a RLookupTable |
|
a gchar* |
Returns : |
a gchar* |
gchar* r_lookup_table_enum2lbl (RLookupTable *table, gint value);
look for the localization associated to the given value
|
a RLookupTable |
|
a gint |
Returns : |
a gchar* |
gint r_lookup_table_get_pair_left (RPairTable *table, gint item);
look for the value associated to the given item in the table
|
a RPairTable |
|
a gint (the right value in the table) |
Returns : |
a gint |
gint r_lookup_table_get_pair_right (RPairTable *table, gint item);
look for the value associated to the given item in the table
|
a RPairTable |
|
a gint (the left value in the table) |
Returns : |
a gint |
gchar* r_lookup_table_pair2str (RPairTable *table, gint item);
look for the string associated to the given item in the table
|
a RPairTable |
|
a gint |
Returns : |
a gchar* |