Libosinfo.List¶
- Subclasses:
Libosinfo.DatamapList
,Libosinfo.DeploymentList
,Libosinfo.DeviceDriverList
,Libosinfo.DeviceLinkList
,Libosinfo.DeviceList
,Libosinfo.FirmwareList
,Libosinfo.ImageList
,Libosinfo.InstallConfigParamList
,Libosinfo.InstallScriptList
,Libosinfo.MediaList
,Libosinfo.OsVariantList
,Libosinfo.ProductList
,Libosinfo.ResourcesList
,Libosinfo.TreeList
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
List element type |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Libosinfo.List(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- add(entity)¶
- Parameters:
entity (
Libosinfo.Entity
) – the entity to add to the list
Adds a new entity to the list.
- add_all(source)¶
- Parameters:
source (
Libosinfo.List
) – the list to add
Adds all entities from source to self. Using one of the constructors in a subclass is preferable to this method.
- add_filtered(source, filter)¶
- Parameters:
source (
Libosinfo.List
) – the source for elementsfilter (
Libosinfo.Filter
) – filter to process the source with
Adds all entities from source which are matched by filter. Using one of the constructors in a subclass is preferable to this method.
- add_intersection(sourceOne, sourceTwo)¶
- Parameters:
sourceOne (
Libosinfo.List
) – the first list to addsourceTwo (
Libosinfo.List
) – the second list to add
Computes the intersection between sourceOne and sourceTwo and adds the resulting list of entities to the self. Using one of the constructors in a subclass is preferable to this method.
- add_union(sourceOne, sourceTwo)¶
- Parameters:
sourceOne (
Libosinfo.List
) – the first list to addsourceTwo (
Libosinfo.List
) – the second list to add
Computes the union between sourceOne and sourceTwo and adds the resulting list of entities to the self. Using one of the constructors in a subclass is preferable to this method.
- find_by_id(id)¶
-
Search the list looking for the entity with a matching unique identifier.
- get_element_type()¶
- Returns:
the type of entity stored
- Return type:
Retrieves the type of the subclass of
Libosinfo.Entity
that may be stored in the list
- get_elements()¶
- Returns:
the list elements
- Return type:
Retrieve a linked list of all elements in the list.
- get_length()¶
- Returns:
the list length
- Return type:
Retrieves the number of elements currently stored in the list
- get_nth(idx)¶
-
Retrieves the element in the list at position idx. If idx is less than zero, or greater than the number of elements in the list, the results are undefined.
- new_copy()¶
- Returns:
a copy of the list
- Return type:
Construct a new list that is filled with elements from self
New in version 0.2.2.
- new_filtered(filter)¶
- Parameters:
filter (
Libosinfo.Filter
) – the filter to apply- Returns:
a filtered copy of the list
- Return type:
Construct a new list that is filled with elements from self that match filter
New in version 0.2.2.
- new_intersection(sourceTwo)¶
- Parameters:
sourceTwo (
Libosinfo.List
) – the second list to copy- Returns:
an intersection of the two lists
- Return type:
Construct a new list that is filled with only the elements that are present in both self and sourceTwo.
New in version 0.2.2.
- new_union(sourceTwo)¶
- Parameters:
sourceTwo (
Libosinfo.List
) – the second list to copy- Returns:
a union of the two lists
- Return type:
Construct a new list that is filled with all the that are present in either self and sourceTwo. self and sourceTwo must be of the same type.
New in version 0.2.2.
Property Details¶
- Libosinfo.List.props.element_type¶
- Name:
element-type
- Type:
- Default Value:
<GType OsinfoEntity>
- Flags:
The specialization of the list. The list will be restricted to storing
Libosinfo.Entity
objects of the specified type.