Meta.select¶
MetaServer¶
-
class
lxu.meta.select.
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_SelectionType¶
-
class
lxu.meta.select.
Meta_SelectionType
¶ This is the metaclass for the SelectionType server type.
-
add
(sub)¶ Add another meta object as a child of this one.
-
add_tag
(key, value)¶
-
alloc
()¶ (internal) Return implementation class.
-
clear
()¶ Set the current selection to empty.
-
deselect
(id)¶ Deselect this id.
-
drop
()¶ Clear the selection and make this selection type topmost.
-
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_ID4
()¶ Get the type code for the selection.
-
get_ifcs
(guid)¶ Get the list of interfaces matching the given guid under this node. The list is returned as tuples: ((class, meta), …)
-
id_from_pkt
(pkt)¶ Get an id from a selection packet. This dereferences the packet pointer and returns the int inside.
-
init_ifcs
(guid)¶ Initialize the _sub_ifcs attribute as a list of interfaces. If no guid is given we use the metaclass guid itself.
-
pkt_from_id
(id)¶ Get a packet from a numeric id code. The packet is effectively a pointer to the int, and is valid until this is called again.
-
pre_init
()¶ Do any self-modification or other steps before initialization. Return true as long as there is more to do.
-
remove
(id)¶ Remove this id from the selection anywhere it might occur.
-
select
(id, add)¶ Add this id to the selection, or if ‘add’ is false, set the selection to only this id.
-
set_undoable
(supportUndo)¶ Set the selection to be undoable. Default is non-undoable.
-
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.
-
SelectionType¶
-
class
lxu.meta.select.
SelectionType
¶ Base class for defining SelectionType 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. Selections are all given by numeric id code.
-
subtype
(id)¶ Implement to return a subtype code for a given selected ID.
-