Gjsify LogoGjsify Logo

Hierarchy

  • NameValueArray

Index

Constructors

  • Creates a new #CamelNameValueArray. The returned pointer should be freed with camel_name_value_array_free() when no longer needed.

    Returns NameValueArray

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
  • Creates a new copy of the array. The returned pointer should be freed with camel_name_value_array_free() when no longer needed.

    Returns NameValueArray

  • 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]

  • getLength(): number
  • getName(index: number): string
  • Returns the name of the element at index index.

    Parameters

    • index: number

      an index

    Returns string

  • getNamed(compareType: 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

    • compareType: CompareType

      a compare type, one of #CamelCompareType

    • name: string

      a name

    Returns string

  • getValue(index: number): string
  • Returns the value of the element at index index.

    Parameters

    • index: number

      an index

    Returns string

  • remove(index: number): boolean
  • Removes element at index index.

    Parameters

    • index: number

      an index to remove

    Returns boolean

  • removeNamed(compareType: CompareType, name: string, allOccurrences: 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

    • compareType: CompareType

      a compare type, one of #CamelCompareType

    • name: string

      a name to remove

    • allOccurrences: 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

  • setName(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

  • setNamed(compareType: 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

    • compareType: CompareType

      a compare type, one of #CamelCompareType

    • name: string

      a name

    • value: string

      a value

    Returns boolean

  • setValue(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. The returned pointer should be freed with camel_name_value_array_free() when no longer needed.

    Returns NameValueArray

  • 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

    • reserveSize: 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