Package ch.bailu.gtk.glib
Klasse StrvBuilder
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.glib.StrvBuilder
- Alle implementierten Schnittstellen:
PointerInterface
`GStrvBuilder` is a helper object to build a %NULL-terminated string arrays.
The following example shows how to build a two element array:
```c
g_autoptr(GStrvBuilder) builder = g_strv_builder_new ();
g_strv_builder_add (builder, "hello");
g_strv_builder_add (builder, "world");
g_auto(GStrv) array = g_strv_builder_end (builder);
g_assert_true (g_strv_equal (array, (const char *[]) { "hello", "world", NULL }));
```
The following example shows how to build a two element array:
```c
g_autoptr(GStrvBuilder) builder = g_strv_builder_new ();
g_strv_builder_add (builder, "hello");
g_strv_builder_add (builder, "world");
g_auto(GStrv) array = g_strv_builder_end (builder);
g_assert_true (g_strv_equal (array, (const char *[]) { "hello", "world", NULL }));
```
-
Feldübersicht
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new #GStrvBuilder with a reference count of 1.StrvBuilder
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Add a string to the end of the array.void
Add a string to the end of the array.void
Appends all the given strings to the builder.void
Appends all the strings in the given vector to the builder.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
ref()
Atomically increments the reference count of @builder by one.void
Add a string to the end of the array.void
unref()
Decreases the reference count on @builder.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
StrvBuilder
-
StrvBuilder
public StrvBuilder()Creates a new #GStrvBuilder with a reference count of 1.
Use g_strv_builder_unref() on the returned value when no longer needed.
-
-
Methodendetails
-
getClassHandler
-
add
Add a string to the end of the array.
Since 2.68- Parameter:
value
- a string.
-
add
Add a string to the end of the array.
Since 2.68- Parameter:
value
- a string.
-
addMany
Appends all the given strings to the builder.
Since 2.70- Parameter:
_ellipsis
- one or more strings followed by %NULL
-
addv
Appends all the strings in the given vector to the builder.
Since 2.70- Parameter:
value
- the vector of strings to add
-
ref
Atomically increments the reference count of @builder by one.
This function is thread-safe and may be called from any thread.- Gibt zurück:
- The passed in #GStrvBuilder
-
take
Add a string to the end of the array. After @value belongs to the
#GStrvBuilder and may no longer be modified by the caller.
Since 2.80- Parameter:
value
- a string. Ownership of the string is transferred to the #GStrvBuilder
-
unref
public void unref()Decreases the reference count on @builder.
In the event that there are no more references, releases all memory
associated with the #GStrvBuilder. -
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-