| Cutterリファレンスマニュアル | ||||
|---|---|---|---|---|
| Top | 説明 | ||||
#define gcut_take_object (object) #define gcut_take_error (error) const GList * gcut_take_list (const GList *list, CutDestroyFunction destroy_function); #define gcut_take_hash_table (hash_table) GList * gcut_list_string_new (const gchar *value, ...); GList * gcut_list_string_new_array (const gchar **strings); const GList * gcut_take_new_list_string (const gchar *value, ...); #define gcut_take_new_list_string_backward_compatibility(value, ...) const GList * gcut_take_new_list_string_array (const gchar **strings); void gcut_list_string_free (GList *list); GHashTable * gcut_hash_table_string_string_new (const gchar *key, ...); GHashTable * gcut_hash_table_string_string_new_va_list (const gchar *key, va_list args); GHashTable * gcut_take_new_hash_table_string_string (const gchar *key, ...);
テストを書くためには、テスト環境を前処理・後処理するコードや、検証する結果を準備するコードなどたくさんのコードを書く必要があります。Cutterはもっと簡単にテストを書くためにユーティリティを提供します。
このユーティリティはGLibと一緒に使います。
#define gcut_take_object(object)
objectの所有権をCutterに渡し、objectを返します。
|
Cutterに所有権を渡すGObject。 |
1.0.3から
#define gcut_take_error(error)
Cutterにerrorの所有権を渡し、errorそれ自身を返します。
|
Cutterに所有権を渡すGError。 |
1.0.3から
const GList * gcut_take_list (const GList *list, CutDestroyFunction destroy_function);
listの所有権をCutterに渡し、listそれ自身を返します。
|
Cutterに所有権を渡すGList。 |
|
the destroy function that destroys the
elements of list, or NULL.
|
戻り値 : |
Cutterが所有権を持つGList。g_list_free()しないでください。 |
1.0.3から
#define gcut_take_hash_table(hash_table)
hash_tableの所有権をCutterに渡し、hash_tableそれ自身を返します。
|
Cutterに所有権を渡すGHashTable。 |
1.0.4から
GList * gcut_list_string_new (const gchar *value, ...);
渡された文字列からリストを作ります。
|
最初の文字列。 |
|
リストの残りの文字列。NULL終端。 |
戻り値 : |
渡された文字列を含むGList。gcut_list_string_free()で開放すること。 |
1.0.3から
GList * gcut_list_string_new_array (const gchar **strings);
渡された文字列配列からリストを作ります。
|
文字列の配列。NULL終端。 |
戻り値 : |
渡された文字列配列と同じ内容のGList。gcut_list_string_free()で開放すること。 |
1.0.6から
const GList * gcut_take_new_list_string (const gchar *value, ...);
渡された文字列からリストを作ります。作られたリストはCutterが所有権を持ちます。
1.0.5から
#define gcut_take_new_list_string_backward_compatibility(value, ...)
gcut_take_new_list_string_backward_compatibility is deprecated and should not be used in newly-written code.
|
|
|
const GList * gcut_take_new_list_string_array (const gchar **strings);
渡された文字列の配列からリストを作ります。Cutterが所有権を持ちます。
1.0.6から
void gcut_list_string_free (GList *list);
listとlist内にある文字列を開放します。
|
開放する文字列のリスト。 |
1.0.3から
GHashTable * gcut_hash_table_string_string_new (const gchar *key, ...);
引数で指定されたキーと値のペアから、文字列のキーと値を持つハッシュテーブルを作成します。
|
最初のキー文字列。 |
|
残りの引数のNULL終端のリスト。まず、最初のキーの文字列値を指定します。続いて、任意の数だけキー・値のペアを指定します。最後にNULLを指定しなければいけません。 |
戻り値 : |
渡されたキー・値を持つGHashTable。g_hash_table_unref()で開放してください。 |
1.0.4から
GHashTable * gcut_hash_table_string_string_new_va_list (const gchar *key, va_list args);
引数で指定されたキーと値のペアから、文字列のキーと値を持つハッシュテーブルを作成します。
|
最初のキー文字列。 |
|
残りの引数のNULL終端のリスト。まず、最初のキーの文字列値を指定します。続いて、任意の数だけキー・値のペアを指定します。最後にNULLを指定しなければいけません。 |
戻り値 : |
渡されたキー・値を持つGHashTable。g_hash_table_unref()で開放してください。 |
1.0.5から
GHashTable * gcut_take_new_hash_table_string_string (const gchar *key, ...);
渡されたキー・値のペアから文字列のキー・値を持つハッシュテーブルを作成します。作成されたハッシュテーブルはCutterが所有権を持つので、g_hash_table_unref()を呼ばないでください。
|
最初のキー文字列。 |
|
A NULL-terminated list of rest arguments. The
string value of the first key, followed optionally
by more key/value pairs. It must end with NULL.
|
戻り値 : |
渡されたキー・値を持つGHashTable。 |
1.0.5から