Gjsify LogoGjsify Logo

Hierarchy

  • ObjectBag

Index

Constructors

Properties

name: string

Methods

  • abort(key: object): void
  • Aborts a key reservation.

    Parameters

    • key: object

      a reserved key

    Returns void

  • add(key: object, object: object): void
  • Adds object to bag. The key MUST have been previously reserved using camel_object_bag_reserve().

    Parameters

    • key: object

      a reserved key

    • object: object

      a #GObject

    Returns void

  • destroy(): void
  • Frees bag. As a precaution, the function will emit a warning to standard error and return without freeing bag if bag still has reserved keys.

    Returns void

  • get(key: object): object
  • Lookup an object by key. If the key is currently reserved, the function will block until another thread commits or aborts the reservation. The caller owns the reference to the returned object. Use g_object_unref () to unreference it.

    Parameters

    • key: object

      a key

    Returns object

  • Returns a #GPtrArray of all the objects in the bag. The caller owns both the array and the object references, so to free the array use:

    |[ g_ptr_array_foreach (array, (GFunc) g_object_unref, NULL); g_ptr_array_free (array, TRUE);

    
    

    Returns GObject.Object[]

  • peek(key: object): object
  • Returns the object for key in bag, ignoring any reservations. If it isn't committed, then it isn't considered. This should only be used where reliable transactional-based state is not required.

    Unlink other "peek" operations, the caller owns the returned object reference. Use g_object_unref () to unreference it.

    Parameters

    • key: object

      an unreserved key

    Returns object

  • rekey(object: object, newKey: object): void
  • Changes the key for object to new_key, atomically.

    It is considered a programming error if object is not found in bag. In such case the function will emit a terminal warning and return.

    Parameters

    • object: object

      a #GObject

    • newKey: object

      a new key for object

    Returns void

  • remove(object: object): void
  • Removes object from bag.

    Parameters

    • object: object

      a #GObject

    Returns void

  • reserve(key: object): object
  • Reserves key in bag. If key is already reserved in another thread, then wait until the reservation has been committed.

    After reserving key, you either get a reference to the object corresponding to key (similar to camel_object_bag_get()) or you get %NULL, signifying that you MUST call either camel_object_bag_add() or camel_object_bag_abort().

    Parameters

    • key: object

      the key to reserve

    Returns object

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