Top | ![]() |
![]() |
![]() |
![]() |
GHashTable用の検証ユーティリティGHashTable用の検証ユーティリティ — GHashTableに関する検証をもっと簡単に書くためのユーティリティ。 |
gboolean gcut_hash_table_equal (GHashTable *hash1
,GHashTable *hash2
,GEqualFunc equal_func
);
Compares two GHashTable, hash1
and
hash2
. equal_func
is called for each values of
the same key of hash1
and hash2
.
例:
1 |
TODO |
TRUE if all same key's values of hash1
and
hash2
are reported TRUE by equal_func
, FALSE
otherwise.
Since: 1.0.5
gchar * gcut_hash_table_inspect (GHashTable *hash
,GCutInspectFunction key_inspect_func
,GCutInspectFunction value_inspect_func
,gpointer user_data
);
Inspects hash
. Each key of hash
is inspected by
key_inspect_func
and each value of hash
is inspected by
value_inspect_func
. The returned string should be freed
when no longer needed.
例:
1 |
TODO |
hash |
詳細を示すGHashTable。 |
|
key_inspect_func |
各キーの詳細を示す関数。 |
|
value_inspect_func |
各値の詳細を示す関数。 |
|
user_data |
関数に渡すユーザ用データ。 |
Since: 1.0.5
gchar * gcut_hash_table_inspect_sorted (GHashTable *hash
,GCutInspectFunction key_inspect_func
,GCutInspectFunction value_inspect_func
,GCompareFunc key_compare_func
,gpointer user_data
);
Sorts hash
as key by key_compare_func
and inspects
it. Each key of hash
is inspected by key_inspect_func
and each value of hash
is inspected by
value_inspect_func
. The returned string should be freed
when no longer needed.
key_compare_func
がNULL
ならhash
を並び替えません。これはgcut_hash_table_inspect()
と同じ動作です。
例:
1 |
TODO |
hash |
並び替えて詳細を示すGHashTable。 |
|
key_inspect_func |
各キーの詳細を示す関数。 |
|
value_inspect_func |
各値の詳細を示す関数。 |
|
key_compare_func |
各キーを比較する関数。 |
|
user_data |
関数に渡すユーザ用データ。 |
Since: 1.0.9
gboolean gcut_hash_table_string_equal (GHashTable *hash1
,GHashTable *hash2
);
Compares two GHashTable, hash1
and
hash2
. hash1
and hash2
should have string key and
string value.
Since: 1.0.5
gchar *
gcut_hash_table_string_string_inspect (GHashTable *hash
);
Inspects hash
. hash
should have string key and string
value. The returned string should be freed when no longer
needed.
Since: 1.0.5
GHashTable *
gcut_hash_table_string_string_copy (GHashTable *hash
);
Copy hash
. hash
should have string key and string
value. The returned hash
should be freed by
g_hash_table_unref()
.
Since: 1.0.8