v_sim.Pool¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
stored type. |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
A new object is available in the pool. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class v_sim.Pool(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Structure defining
v_sim.Poolobjects.New in version 3.8.
- classmethod new(type, compare)¶
- Parameters:
type (
GObject.GType) – a type inheritingGObject.TYPE_BOXED.compare (
GLib.CompareFunc) – a comparison function.
- Returns:
a newly created
v_sim.Poolobject.- Return type:
Create a new
v_sim.Poolobject to storeGObject.GBoxedobjects defined by type. These objects must be comparable with compare function.New in version 3.8.
- add(boxed)¶
- Parameters:
boxed (
objectorNone) – aGObject.GBoxedpointer.- Returns:
a pointer on the copy of boxed. This copy is owned by V_Sim.
- Return type:
Copy boxed into self if not already present.
New in version 3.8.
- getByData(boxed)¶
- Parameters:
boxed (
objectorNone) – aGObject.GBoxedobject.- Returns:
the corresponding object, or
Noneif none has been found.- Return type:
This function retrieves the stored object that is equivalent to boxed.
New in version 3.8.
- getById(num)¶
- Parameters:
num (
int) – an integer (>0).- Returns:
the corresponding object, or
Noneif none has been found.- Return type:
This function retrieves the nth stored object. Number 0, is the last added object.
- index(boxed)¶
-
Retrieve the storage index of boxed if it exists, or -1 if not.
New in version 3.8.
Signal Details¶
- v_sim.Pool.signals.new_element(pool, boxed)¶
- Signal Name:
new-element- Flags:
- Parameters:
pool (
v_sim.Pool) – The object which received the signal
A new object is available in the pool.
New in version 3.8.
Property Details¶
- v_sim.Pool.props.type¶
- Name:
type- Type:
- Default Value:
<GType GBoxed>- Flags:
stored type.