Class

cogdebugger

ModuleHierarchyTree

Related Doc: package cogdebugger

Permalink

class ModuleHierarchyTree extends AnyRef

A tree describing the module hierarchy implied in a given Cog model's definition. Supports lookups and traversals.

Basically, any class that has Cog fields as members is called a Module. In addition, any class that has a Module as a member is also called a Module, and is considered a parent to all those member Modules. Any Module that doesn't have a parent is attached as a child to a meta-Module that we just call Root.

The actual reflection/introspection code that finds all these module relationships lives in the field auto-naming logic within ComputeGraph. This class is actually determining the relationships by breaking apart field names.

Example:

class Bar { val scalarField = ScalarField( ... ) }
class Foo { val bar = new Bar() }
val cg = new ComputeGraph {
  val foo = new Foo()
}

In the above compute graph, a single scalar field is created that will be named "foo.bar.scalarField." This name is generated using reflection: the anonymous ComputeGraph has a Foo member named foo which in turn has a Bar member named bar which in turn has a ScalarField member named scalarField. The namer smashes those together to create a long name for the field; this ModuleHierarchyTree class breaks the name back apart to determine relationships between fields and parent objects (the so-called Modules).

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ModuleHierarchyTree
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ModuleHierarchyTree(circuit: ProbedCircuit)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def allDescendantsFor(module: ModuleNode): Set[FieldNode]

    Permalink

    Returns a set of all ProbedFields below this node in the tree.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def contains(field: ProbedField): Boolean

    Permalink
  8. def contains(name: String): Boolean

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def get(field: ProbedField): Option[FieldNode]

    Permalink
  13. def get(name: String): Option[FieldNode]

    Permalink

    Looks for a FieldNode corresponding to the field with the given long name.

    Looks for a FieldNode corresponding to the field with the given long name.

    name

    Long name of the field to look up (e.g. "path.to.a.field")

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hasAncestor(node: ModuleTreeNode, ancestor: ModuleNode): Boolean

    Permalink

    Checks if 'node' is a descendant of the module 'ancestor'

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. val moduleHierarchyRoot: ModuleNode

    Permalink

    The root of the module hierarchy.

    The root of the module hierarchy. Usually (always?) corresponds to an instance of cogx.runtime.ComputeGraph.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def postOrderTraverse(node: ModuleTreeNode, op: (ModuleTreeNode) ⇒ Unit): Unit

    Permalink
  23. def postOrderTraverse(op: (ModuleTreeNode) ⇒ Unit): Unit

    Permalink
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped