RB.StringValueMap

g GObject.Object GObject.Object RB.StringValueMap RB.StringValueMap GObject.Object->RB.StringValueMap

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get (key, out)

peek (key)

remove (key)

set (key, value)

size ()

steal_hashtable ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class RB.StringValueMap(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

RB.StringValueMapClass

classmethod new()
Returns:

new empty RB.StringValueMap

Return type:

RB.StringValueMap

Creates a new RB.StringValueMap

get(key, out)
Parameters:
  • key (str) – key to retrieve

  • out (GObject.Value) – returns a copy of the value in the map

Returns:

True if the value was found

Return type:

bool

Locates and copies the value associated with the key.

peek(key)
Parameters:

key (str) – key to retrieve

Returns:

the GObject.Value associated with the key

Return type:

GObject.Value

Locates the value associated with the key. This returns the GObject.Value stored in the map, so it cannot be modified.

remove(key)
Parameters:

key (str) – key to remove

Returns:

True if the value was found and removed

Return type:

bool

Removes a value from the map.

set(key, value)
Parameters:

Inserts a value into the map. The value is copied.

size()
Returns:

number of entries

Return type:

int

Returns the number of entries in the map.

steal_hashtable()
Returns:

GLib.HashTable from the map

Return type:

{object: object}

Extracts and returns the underlying hash table from the map, and creates a new empty map.