Package ch.bailu.gtk.gst
Klasse IdStr
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.gst.IdStr
- Alle implementierten Schnittstellen:
PointerInterface
A #GstIdStr is string type optimized for short strings and used for structure
names, structure field names and in other places.
Strings up to 16 bytes (including NUL terminator) are stored inline, other
strings are stored on the heap.
```cpp
GstIdStr s = GST_ID_STR_INIT;
gst_id_str_set (&s, "Hello, World!");
g_print ("%s\n", gst_id_str_as_str (&s));
gst_id_str_clear (&s);
```
names, structure field names and in other places.
Strings up to 16 bytes (including NUL terminator) are stored inline, other
strings are stored on the heap.
```cpp
GstIdStr s = GST_ID_STR_INIT;
gst_id_str_set (&s, "Hello, World!");
g_print ("%s\n", gst_id_str_as_str (&s));
gst_id_str_clear (&s);
```
https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungIdStr()
Returns a newly heap allocated empty string.IdStr
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungasStr()
void
clear()
Clears @s and sets it to the empty string.copy()
Copies @s into newly allocated heap memory.void
Copies @s into @d.void
free()
Frees @s.static ClassHandler
static int
long
getLen()
Returns the length of @s, exluding the NUL-terminator.static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
void
init()
Initializes a (usually stack-allocated) id string @s.boolean
Compares @s1 and @s2 for equality.boolean
isEqualToStr
(Str s2) Compares @s1 and @s2 for equality.boolean
isEqualToStr
(String s2) Compares @s1 and @s2 for equality.boolean
isEqualToStrWithLen
(Str s2, long len) Compares @s1 and @s2 with length @len for equality.boolean
isEqualToStrWithLen
(String s2, long len) Compares @s1 and @s2 with length @len for equality.void
Moves @s into @d and resets @s.void
Sets @s to the string @value.void
Sets @s to the string @value.void
setStaticStr
(Str value) Sets @s to the string @value.void
setStaticStr
(String value) Sets @s to the string @value.void
setStaticStrWithLen
(Str value, long len) Sets @s to the string @value of length @len.void
setStaticStrWithLen
(String value, long len) Sets @s to the string @value of length @len.void
setWithLen
(Str value, long len) Sets @s to the string @value of length @len.void
setWithLen
(String value, long len) Sets @s to the string @value of length @len.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
-
Felddetails
-
POINTER
- Siehe auch:
-
-
Konstruktordetails
-
IdStr
-
IdStr
public IdStr()Returns a newly heap allocated empty string.
-
-
Methodendetails
-
getClassHandler
-
getFieldPointer
-
asStr
- Gibt zurück:
- the NUL-terminated string representation of @s.
-
clear
public void clear()Clears @s and sets it to the empty string. -
copy
Copies @s into newly allocated heap memory.- Gibt zurück:
- A heap-allocated copy of @s.
-
copyInto
Copies @s into @d.- Parameter:
s
- The source %GstIdStr
-
free
public void free()Frees @s. This should only be called for heap-allocated #GstIdStr. -
getLen
public long getLen()Returns the length of @s, exluding the NUL-terminator. This is equivalent to
calling `strcmp()` but potentially faster.- Gibt zurück:
-
init
public void init()Initializes a (usually stack-allocated) id string @s. The newly-initialized
id string will contain an empty string by default as value. -
isEqual
Compares @s1 and @s2 for equality.- Parameter:
s2
- A %GstIdStr- Gibt zurück:
- %TRUE if @s1 and @s2 are equal.
-
isEqualToStr
Compares @s1 and @s2 for equality.- Parameter:
s2
- A string- Gibt zurück:
- %TRUE if @s1 and @s2 are equal.
-
isEqualToStr
Compares @s1 and @s2 for equality.- Parameter:
s2
- A string- Gibt zurück:
- %TRUE if @s1 and @s2 are equal.
-
isEqualToStrWithLen
Compares @s1 and @s2 with length @len for equality. @s2 does not have to be
NUL-terminated and @len should not include the NUL-terminator.
This is generally faster than gst_id_str_is_equal_to_str() if the length is
already known.- Parameter:
s2
- A stringlen
- Length of @s2.- Gibt zurück:
- %TRUE if @s1 and @s2 are equal.
-
isEqualToStrWithLen
Compares @s1 and @s2 with length @len for equality. @s2 does not have to be
NUL-terminated and @len should not include the NUL-terminator.
This is generally faster than gst_id_str_is_equal_to_str() if the length is
already known.- Parameter:
s2
- A stringlen
- Length of @s2.- Gibt zurück:
- %TRUE if @s1 and @s2 are equal.
-
move
Moves @s into @d and resets @s.- Parameter:
s
- The source %GstIdStr
-
set
Sets @s to the string @value.- Parameter:
value
- A NUL-terminated string
-
set
Sets @s to the string @value.- Parameter:
value
- A NUL-terminated string
-
setStaticStr
Sets @s to the string @value. @value needs to be valid for the remaining
lifetime of the process, e.g. has to be a static string.- Parameter:
value
- A NUL-terminated string
-
setStaticStr
Sets @s to the string @value. @value needs to be valid for the remaining
lifetime of the process, e.g. has to be a static string.- Parameter:
value
- A NUL-terminated string
-
setStaticStrWithLen
Sets @s to the string @value of length @len. @value needs to be valid for the
remaining lifetime of the process, e.g. has to be a static string.
@value must be NUL-terminated and @len should not include the
NUL-terminator.- Parameter:
value
- A stringlen
- Length of the string
-
setStaticStrWithLen
Sets @s to the string @value of length @len. @value needs to be valid for the
remaining lifetime of the process, e.g. has to be a static string.
@value must be NUL-terminated and @len should not include the
NUL-terminator.- Parameter:
value
- A stringlen
- Length of the string
-
setWithLen
Sets @s to the string @value of length @len. @value does not have to be
NUL-terminated and @len should not include the NUL-terminator.- Parameter:
value
- A stringlen
- Length of the string
-
setWithLen
Sets @s to the string @value of length @len. @value does not have to be
NUL-terminated and @len should not include the NUL-terminator.- Parameter:
value
- A stringlen
- Length of the string
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-