Wp.SiFactory¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The factory’s name |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Wp.SiFactory(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
A factory for session items. The most simple way to register a new item implementation would be:
wp_si_factory_register (core, wp_si_factory_new_simple (
And the most simple way to construct an item from a registered factory:
item = wp_session_item_make (core,
- classmethod find(core, factory_name)¶
- Parameters:
- Returns:
the factory matching the lookup name
- Return type:
Wp.SiFactory
orNone
Looks up a factory matching a name.
- classmethod new_simple(factory_name, si_type)¶
- Parameters:
factory_name (
str
) – the factory name; must be a static string!si_type (
GObject.GType
) – theWp.SessionItem
subclass type to instantiate for constructing items
- Returns:
the new factory
- Return type:
Creates a simple factory that constructs objects of a given
GObject.GType
.
- construct(core)¶
- Parameters:
core (
Wp.Core
) – the core- Returns:
a new session item instance
- Return type:
Creates a new instance of the session item that is constructed by this factory.
Property Details¶
- Wp.SiFactory.props.name¶
- Name:
name
- Type:
- Default Value:
''
- Flags:
The factory’s name