Meta.schematic¶
MetaServer¶
-
class
lxu.meta.schematic.
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_SchematicConnection¶
-
class
lxu.meta.schematic.
Meta_SchematicConnection
¶ This is the metaclass for the SchematicConnection server type.
-
add
(sub)¶ Add another meta object as a child of this one.
-
add_tag
(key, value)¶
-
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.
-
invalidate
()¶ Invalidate the dynamic state of item connections.
-
pre_init
()¶ Do any self-modification or other steps before initialization. Return true as long as there is more to do.
-
set_dynamic
()¶ Set the connections to be tested for each individual item.
-
set_graph
(name, reverse, manual)¶ Set the graph name for normal, graph-based connections. The graph can be set to be reversed. ‘manual’ can be True to use the computed list for the contents of the links.
-
set_itemtype
(name, multiple, ordered)¶ Set an item type to limit connections to exactly items matching this 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.
-
SchematicConnection¶
-
class
lxu.meta.schematic.
SchematicConnection
¶ Base class for defining SchematicConnection 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.
-
allow
(ifrom, ito)¶ Return true if a link between these items is legal.
-
connect
(ifrom, ito, toIndex)¶ Make a connection between two items. This is only called if no graph is specified.
-
disconnect
(ifrom, ito)¶ Break a connection between two items. This is only called if no graph is specified.
-
get_list
(item)¶ Get the list of items with incoming connections. This is only called if no graph is specified, or if the graph is manual.
-
set_multiple
(ordered)¶
-
set_single
()¶
-
test_item
(item)¶ Test if an item should have a connection point. If it should then call set_single() for a single connection, or set_multiple() for multiple (perhaps ordered) connections.
-
impl_Server¶
-
class
lxu.meta.schematic.
impl_Server
¶ This internal class implements the actual SchematicConnection server. It defers to the metaclass state and the client subclass for specific behaviors.
-
item_flags
(item)¶
-
refresh_list
(item)¶
-
schm_AllowConnect
(from_obj, to_obj)¶
-
schm_AllowConnectType
(from_obj, type)¶
-
schm_BaseFlags
()¶
-
schm_ByIndex
(item, index)¶
-
schm_ChannelAllowConnect
(from_obj, fromIndex, to_obj, toIndex)¶
-
schm_ChannelByIndex
(xItem, fromIndex, index)¶
-
schm_ChannelConnect
(from_obj, fromIndex, to_obj, toIndex)¶
-
schm_ChannelCount
(xItem, fromIndex)¶
-
schm_ChannelDisconnect
(from_obj, fromIndex, to_obj, toIndex)¶
-
schm_ChannelIOType
()¶
-
schm_Connect
(from_obj, to_obj, toIndex)¶
-
schm_Count
(item)¶
-
schm_Disconnect
(from_obj, to_obj)¶
-
schm_GraphName
()¶
-
schm_ItemFlags
(item)¶
-
schm_ItemFlagsValid
()¶
-
schm_PerItemFlags
(item)¶
-