Lines Matching refs:kind
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27 Kind: A node corresponding to <dynamic>, <static>, <controls> elements.
28 InnerNamespace: A node corresponding to a <namespace> nested under a <kind>.
29 OuterNamespace: A node corresponding to a <namespace> with <kind> children.
209 # kind => { name => entry }
299 Subsequent calls to insert_entry with the same entry+kind name are safe
304 self._entry_map[e.kind][e.name] = e
316 Subsequent calls to insert_clone with the same clone+kind name are safe
323 self._entry_map[c.kind][c.name] = c
351 self._entry_map[p.kind].pop(p.name)
354 def is_entry_this_kind(self, entry, kind):
356 Check if input entry if of input kind
360 kind: a string. Possible values are "static", "dynamic", "controls"
363 A boolean indicating whether input entry is of input kind.
365 if kind not in ("static", "dynamic", "controls"):
366 assert(False), "Unknown kind value " + kind
368 return entry.name in self._entry_map[kind]
423 print >> sys.stderr, ("WARNING: Clone entry '%s' target kind '%s'" + \
493 for kind in section.kinds:
494 kind._leafs = []
497 group_entry_by_kind = itertools.groupby(section._leafs, lambda x: x.kind)
502 # this helps maintain ABI compatibility when adding an entry in a new kind
505 kind = Kind(kind_name, section)
506 section._kinds.append(kind)
509 kind = section._kinds[idx]
512 if p not in kind._leafs:
513 kind._leafs.append(p)
515 for kind in section._kinds:
516 kind.validate_tree()
517 self._construct_inner_namespaces(kind)
518 kind.validate_tree()
519 self._construct_entries(kind)
520 kind.validate_tree()
524 "construct_kinds, with kind = '%s'") %(kind)
526 if not kind.validate_tree():
528 "construct_kinds, with kind = '%s'") %(kind)
531 #parent is InnerNamespace or Kind
565 #parent is InnerNamespace or Kind
690 kinds: A sequence of Kind children.
691 merged_kinds: A sequence of virtual Kind children,
692 with each Kind's children merged by the kind.name
732 k = Kind(el.name, el.parent)
750 virtual Kind node.
753 A new Kind node that collapses all Kind siblings into one, combining
768 combined = Kind(name="combined", parent=self)
776 class Kind(Node):
824 A new Kind where all of the children with the same name were combined.
828 Given a Kind k:
840 The returned Kind will look like this:
852 return Kind._combine_children_by_name(self, new_type=type(self))
854 # new_type is either Kind or InnerNamespace
870 kind = new_type(self.name, self.parent)
871 kind._namespaces = new_ins_dict.values()
872 kind._entries = new_ent_dict.values()
874 return kind
878 A node corresponding to a <namespace> which is an ancestor of a Kind.
883 parent: An edge to the parent, which is an InnerNamespace or a Kind.
952 return Kind._combine_children_by_name(self, new_type=type(self))
1042 parent: An edge to the parent node, which is an InnerNamespace or Kind.
1046 kind: A string ('static', 'dynamic', 'controls') corresponding to the
1047 ancestor Kind#name
1101 kind: A string describing the kind, e.g. 'static'
1137 print >> sys.stderr, "ERROR: Missing type for entry '%s' kind '%s'" \
1138 %(kwargs.get('name'), kwargs.get('kind'))
1145 self._kind = kwargs['kind'] # static, dynamic, or controls
1154 def kind(self):
1402 target_kind: A string describing the kind of the target entry.
1404 kind: a string of the Kind ancestor, one of 'static', 'controls', 'dynamic'
1415 kind: A string describing the kind, e.g. 'static'
1416 target_kind: A string for the kind of the target entry, e.g. 'dynamic'
1449 self._kind = kwargs['kind']
1492 'hal_details', 'tags', 'kind']