Gjsify LogoGjsify Logo

Hierarchy

  • NameValueArray

Index

Constructors

Properties

name: string

Methods

  • append(name: string, value: string): void
  • Appends a new element of the name name and the value value at the end of array.

    See: camel_name_value_array_set_named

    Parameters

    • name: string

      a name

    • value: string

      a value

    Returns void

  • clear(): void
  • Compares content of the two #CamelNameValueArray and returns whether they equal. Note this is an expensive operation for large arrays.

    Parameters

    Returns boolean

  • free(): void
  • Frees the array, previously allocated by camel_name_value_array_new(), camel_name_value_array_new_sized() or camel_name_value_array_copy(). If the array is %NULL, then does nothing.

    Returns void

  • get(index: number): [boolean, string, string]
  • Returns the name and the value of the element at index index. Either of the out_name and out_value can be %NULL, to not return that part.

    Parameters

    • index: number

      an index

    Returns [boolean, string, string]

  • get_length(): number
  • get_name(index: number): string
  • get_named(compare_type: CompareType, name: string): string
  • Returns the value of the first element named name, or %NULL when there is no element of such name in the array. The compare_type determines how to compare the names.

    Parameters

    • compare_type: CompareType

      a compare type, one of #CamelCompareType

    • name: string

      a name

    Returns string

  • get_value(index: number): string
  • remove(index: number): boolean
  • remove_named(compare_type: CompareType, name: string, all_occurrences: boolean): number
  • Removes elements of the array with the given name. The compare_type determines hot to compare the names. If the all_occurrences is set to %TRUE, then every elements with the name are removed, otherwise only the first occurrence is removed.

    Parameters

    • compare_type: CompareType

      a compare type, one of #CamelCompareType

    • name: string

      a name to remove

    • all_occurrences: boolean

      whether to remove all occurrences of the name

    Returns number

  • set(index: number, name: string, value: string): boolean
  • Sets both the name and the value of the element at index index.

    Parameters

    • index: number

      an index

    • name: string

      a name

    • value: string

      a value

    Returns boolean

  • set_name(index: number, name: string): boolean
  • Sets the name of the element at index index.

    Parameters

    • index: number

      an index

    • name: string

      a name

    Returns boolean

  • set_named(compare_type: CompareType, name: string, value: string): boolean
  • Finds an element named name and sets its value to value, or appends a new element, in case no such named element exists in the array yet. In case there are more elements named with name only the first occurrence is changed. The compare_type determines how to compare the names.

    Parameters

    • compare_type: CompareType

      a compare type, one of #CamelCompareType

    • name: string

      a name

    • value: string

      a value

    Returns boolean

  • set_value(index: number, value: string): boolean
  • Sets the value of the element at index index.

    Parameters

    • index: number

      an index

    • value: string

      a value

    Returns boolean

  • Creates a new #CamelNameValueArray, which has reserved reserve_size elements. This value doesn't influence the camel_name_value_array_get_length(), which returns zero on the array returned from this function. The returned pointer should be freed with camel_name_value_array_free() when no longer needed.

    Parameters

    • reserve_size: number

      an array size to reserve

    Returns NameValueArray

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method