Representation of a connector of a component. Please see the EDB documentation for more information about the EDB object model; here every component contains a set of connectors, which in turn contain a set of cavities. This also holds for inline connectors (which in physical reality do not have a component) and splices/eyelets (which actually neither have connectors nor cavities).

Hierarchy (View Summary)

Accessors

  • get id(): ObjectID
  • The unique EDB ID of the object.

    Returns ObjectID

  • get name(): undefined | string
  • The name of the object.

    Returns undefined | string

  • get otype(): ObjectType
  • The object type of the object.

    Returns ObjectType

  • get partner(): undefined | EdbConnector
  • Get the partner connector (or undefined if the connector has no partner). This function is only useful for connectors at inliner components where connectors and cavities typically appear in pairs.

    Returns undefined | EdbConnector

  • get type(): undefined | readonly EdbConnectorType[]
  • The list of sub-types of the connector, e.g., "female" or "anti".

    Returns undefined | readonly EdbConnectorType[]

Methods

  • Iterate over the attributes of an object.

    Returns Generator<[string, string | readonly string[]], void, any>

    for (const [name, value] of obj.attributes()) {
    if (typeof value === "string") {
    console.log(`${name} = ${value}`);
    } else {
    console.log(`${name} = [${value.join(", ")}]`);
    }
    }
  • Iterate over the cavities of a connector.

    Returns Generator<EdbCavity, void, any>

    for (const cav of conn.cavities()) {
    console.log(`Cavity ${cav.name} belongs to connector ${conn.name}.`);
    }
  • Get the value of an attribute.

    Parameters

    • name: string

      the name of the attribute.

    Returns undefined | string | string[]

    the value(s) of the attribute if it exists, or undefined if the object does not have an attribute with the given name. In case the object has multiple attributes with the same name, an array with the values is returned instead of a single string.