Meta.chanmod¶
ChannelModifier¶
-
class
lxu.meta.chanmod.
ChannelModifier
¶ Base class for defining ChannelModifier servers. The client will subclass this base class, filling in the methods that they require. It’s then instantiated as a metaclass to be promoted to server. This derives from the Channels base class so needs an init_chan() method.
-
eval
(data)¶
-
init_chan
(desc)¶ This is passed an AttributeDesc object which is used to init the channels.
-
post_alloc
()¶
-
Channels¶
-
class
lxu.meta.chanmod.
Channels
¶ Base class for defining Channels. The client will subclass this base class, filling in the methods that they require. It’s then instantiated as a metaclass to be used by servers.
-
init_chan
(desc)¶ This is passed an AttributeDesc object which is used to init the channels.
-
MetaInterface¶
-
class
lxu.meta.chanmod.
MetaInterface
¶ The interface meta node is a sub-interface for an object or server of the same guid.
-
add
(sub)¶ Add another meta object as a child of this one.
-
alloc
()¶ Return the signature for this metaclass. Depends on type.
-
dump
(prefix)¶ Output the contents of the meta node tree with indenting.
-
find_any
(type, guid, miss)¶ Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.
-
find_sub
(type, guid)¶ Find first node with a matching type/guid under this node.
-
flatten
()¶ Return this meta and all sub-metas in a list.
-
get_ifcs
(guid)¶ Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)
-
init_ifcs
(guid)¶ Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.
-
pre_init
()¶ Do any self-modification or other steps before initialization. Return true as long as there is more to do.
-
test
(type, guid)¶ Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.
-
MetaServer¶
-
class
lxu.meta.chanmod.
MetaServer
¶ The server meta node defines a plug-in server. The name and class guid must be specified, and the alloc() method (defined by the client, returns the server class. There is also a dictionary of server tags.
-
add
(sub)¶ Add another meta object as a child of this one.
-
add_tag
(key, value)¶
-
alloc
()¶ Return the signature for this metaclass. Depends on type.
-
dump
(prefix)¶ Output the contents of the meta node tree with indenting.
-
find_any
(type, guid, miss)¶ Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.
-
find_sub
(type, guid)¶ Find first node with a matching type/guid under this node.
-
flatten
()¶ Return this meta and all sub-metas in a list.
-
get_ifcs
(guid)¶ Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)
-
init_ifcs
(guid)¶ Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.
-
pre_init
()¶ Do any self-modification or other steps before initialization. Return true as long as there is more to do.
-
set_username
(base, key)¶
-
test
(type, guid)¶ Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.
-
Meta_ChannelModifier¶
-
class
lxu.meta.chanmod.
Meta_ChannelModifier
¶ This is the metaclass for the ChannelModifier server type. This is actually a Package server metaclass, which does most of the work for us. We just need to add the channels metaclass, and the manager inerface metaclass.
-
add
(sub)¶ Add another meta object as a child of this one.
-
add_channelui
(cls)¶ Add a ChannelIU class
-
add_tag
(key, value)¶
-
alloc
()¶ Internal method
-
dump
(prefix)¶ Output the contents of the meta node tree with indenting.
-
find_any
(type, guid, miss)¶ Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.
-
find_sub
(type, guid)¶ Find first node with a matching type/guid under this node.
-
flatten
()¶ Return this meta and all sub-metas in a list.
-
get_ifcs
(guid)¶ Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)
-
init_ifcs
(guid)¶ Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.
-
pre_init
()¶ Internal method
-
set_supertype
(typename)¶ Set the supertype for this package, making it an item type. If the typename is omitted then this is a root type.
-
set_username
(base, key)¶
-
test
(type, guid)¶ Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.
-
Meta_Channels¶
-
class
lxu.meta.chanmod.
Meta_Channels
¶ This is the metaclass for Channels.
-
add
(sub)¶ Add another meta object as a child of this one.
-
alloc
()¶
-
dump
(prefix)¶ Output the contents of the meta node tree with indenting.
-
find_any
(type, guid, miss)¶ Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.
-
find_sub
(type, guid)¶ Find first node with a matching type/guid under this node.
-
flatten
()¶ Return this meta and all sub-metas in a list.
-
get_ifcs
(guid)¶ Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)
-
init_ifcs
(guid)¶ Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.
-
pre_init
()¶ Do any self-modification or other steps before initialization. Return true as long as there is more to do.
-
test
(type, guid)¶ Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.
-
Meta_Package¶
-
class
lxu.meta.chanmod.
Meta_Package
¶ This is the metaclass for Packages. You allocate it with the server name and optional Package sub-class.
-
add
(sub)¶ Add another meta object as a child of this one.
-
add_channelui
(cls)¶ Add a ChannelIU class
-
add_tag
(key, value)¶
-
alloc
()¶ Internal method
-
dump
(prefix)¶ Output the contents of the meta node tree with indenting.
-
find_any
(type, guid, miss)¶ Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.
-
find_sub
(type, guid)¶ Find first node with a matching type/guid under this node.
-
flatten
()¶ Return this meta and all sub-metas in a list.
-
get_ifcs
(guid)¶ Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)
-
init_ifcs
(guid)¶ Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.
-
pre_init
()¶ Internal method
-
set_supertype
(typename)¶ Set the supertype for this package, making it an item type. If the typename is omitted then this is a root type.
-
set_username
(base, key)¶
-
test
(type, guid)¶ Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.
-
Package¶
-
class
lxu.meta.chanmod.
Package
¶ Base class for defining Packages. The client will subclass this base class, filling in the methods that they require. It’s then instantiated as a metaclass to be promoted to a server.
-
add
()¶ Item added to scene – either on create or on delete undo.
-
after_load
()¶ Item finished loading.
-
doomed
()¶ Item final destroy.
-
initialize
(super)¶ Initial package creation.
-
loading
()¶ Item create on load.
-
newborn
(item, flags)¶ Item initial creation.
-
parent_ok
(parent)¶ Return true if the parent is valid.
-
remove
()¶ Item removed from scene – either on delete or on create undo.
-
synth_name
()¶ Return a synthetic name for the item when it has no other name.
-
meta_ChannelModManager¶
-
class
lxu.meta.chanmod.
meta_ChannelModManager
¶ Metaclass for the ChannelModManager defines an interface for a package.
-
add
(sub)¶ Add another meta object as a child of this one.
-
alloc
()¶ Internal metaclass method.
-
dump
(prefix)¶ Output the contents of the meta node tree with indenting.
-
find_any
(type, guid, miss)¶ Find a node with matching type/guid, searching first inside this node but searching higher up the tree until somthing matches.
-
find_sub
(type, guid)¶ Find first node with a matching type/guid under this node.
-
flatten
()¶ Return this meta and all sub-metas in a list.
-
get_ifcs
(guid)¶ Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)
-
init_ifcs
(guid)¶ Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.
-
pre_init
()¶ Do any self-modification or other steps before initialization. Return true as long as there is more to do.
-
test
(type, guid)¶ Test this meta node against a type and guid and return true for match. All testing allows for type or guid to be None for wildcard.
-