Klasse IdStr

Alle implementierten Schnittstellen:
PointerInterface

public class IdStr extends Record
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);
```

https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html

  • Felddetails

  • Konstruktordetails

    • IdStr

      public IdStr(PointerContainer pointer)
    • IdStr

      public IdStr()
      Returns a newly heap allocated empty string.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getFieldPointer

      public Pointer getFieldPointer()
    • asStr

      public Str 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

      public IdStr copy()
      Copies @s into newly allocated heap memory.
      Gibt zurück:
      A heap-allocated copy of @s.
    • copyInto

      public void copyInto(@Nonnull IdStr s)
      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

      public boolean isEqual(@Nonnull IdStr s2)
      Compares @s1 and @s2 for equality.
      Parameter:
      s2 - A %GstIdStr
      Gibt zurück:
      %TRUE if @s1 and @s2 are equal.
    • isEqualToStr

      public boolean isEqualToStr(@Nonnull Str s2)
      Compares @s1 and @s2 for equality.
      Parameter:
      s2 - A string
      Gibt zurück:
      %TRUE if @s1 and @s2 are equal.
    • isEqualToStr

      public boolean isEqualToStr(String s2)
      Compares @s1 and @s2 for equality.
      Parameter:
      s2 - A string
      Gibt zurück:
      %TRUE if @s1 and @s2 are equal.
    • isEqualToStrWithLen

      public boolean isEqualToStrWithLen(@Nonnull Str s2, long len)
      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 string
      len - Length of @s2.
      Gibt zurück:
      %TRUE if @s1 and @s2 are equal.
    • isEqualToStrWithLen

      public boolean isEqualToStrWithLen(String s2, long len)
      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 string
      len - Length of @s2.
      Gibt zurück:
      %TRUE if @s1 and @s2 are equal.
    • move

      public void move(@Nonnull IdStr s)
      Moves @s into @d and resets @s.
      Parameter:
      s - The source %GstIdStr
    • set

      public void set(@Nonnull Str value)
      Sets @s to the string @value.
      Parameter:
      value - A NUL-terminated string
    • set

      public void set(String value)
      Sets @s to the string @value.
      Parameter:
      value - A NUL-terminated string
    • setStaticStr

      public void setStaticStr(@Nonnull Str value)
      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

      public void setStaticStr(String value)
      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

      public void setStaticStrWithLen(@Nonnull Str value, long len)
      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 string
      len - Length of the string
    • setStaticStrWithLen

      public void setStaticStrWithLen(String value, long len)
      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 string
      len - Length of the string
    • setWithLen

      public void setWithLen(@Nonnull Str value, long len)
      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 string
      len - Length of the string
    • setWithLen

      public void setWithLen(String value, long len)
      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 string
      len - Length of the string
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()