Show / Hide Table of Contents

Class Subcircuit

A subcircuit that can contain a collection of entities.

Inheritance
object
ParameterSet
ParameterSetCollection
Entity
Subcircuit
Implements
IParameterized<Parameters>
IComponent
IEntity
IParameterSetCollection
IParameterSet
ICloneable<IEntity>
IRuleSubject
Inherited Members
Entity.LinkParameters
Entity.Name
Entity.SetParameter<P>(string, P)
Entity.ToString()
ParameterSetCollection.GetParameterSet<P>()
ParameterSetCollection.TryGetParameterSet<P>(out P)
ParameterSetCollection.ParameterSets
ParameterSetCollection.TrySetParameter<P>(string, P)
ParameterSetCollection.GetProperty<P>(string)
ParameterSetCollection.TryGetProperty<P>(string, out P)
ParameterSetCollection.CreateParameterSetter<P>(string)
ParameterSetCollection.CreatePropertyGetter<P>(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: SpiceSharp.Components
Assembly: SpiceSharp.dll
Syntax
public class Subcircuit : Entity, IParameterized<Parameters>, IComponent, IEntity, IParameterSetCollection, IParameterSet, ICloneable<IEntity>, IRuleSubject

Constructors

Subcircuit(string, ISubcircuitDefinition, params string[])

Initializes a new instance of the Subcircuit class.

Declaration
public Subcircuit(string name, ISubcircuitDefinition definition, params string[] nodes)
Parameters
Type Name Description
string name

The name of the subcircuit.

ISubcircuitDefinition definition

The subcircuit definition.

string[] nodes

The nodes that the subcircuit is connected to.

Exceptions
Type Condition
ArgumentNullException

Thrown if name or definition is null.

Properties

Model

Gets or sets the name of the component model.

Declaration
public string Model { get; set; }
Property Value
Type Description
string

The name of the component model.

Nodes

Gets a list of all the nodes that the component is connected to.

Declaration
public IReadOnlyList<string> Nodes { get; }
Property Value
Type Description
IReadOnlyList<string>

The nodes.

Parameters

Gets the parameter set.

Declaration
public Parameters Parameters { get; }
Property Value
Type Description
Parameters

The parameter set.

Methods

Apply(IRules)

Applies the subject to any rules in the validation provider.

Declaration
public void Apply(IRules rules)
Parameters
Type Name Description
IRules rules

The provider.

Clone()

Clones the instance.

Declaration
public override IEntity Clone()
Returns
Type Description
IEntity

The cloned instance.

Overrides
Entity.Clone()

Connect(params string[])

Connects the component in the circuit.

Declaration
public IComponent Connect(params string[] nodes)
Parameters
Type Name Description
string[] nodes

The node indices.

Returns
Type Description
IComponent

The instance calling the method for chaining.

Exceptions
Type Condition
ArgumentNullException

Thrown if nodes or any of the nodes is null.

NodeMismatchException

Thrown if the number of nodes does not match the pin count of the component.

CreateBehaviors(ISimulation)

Creates the behaviors and stores them in the specified container.

Declaration
public override void CreateBehaviors(ISimulation simulation)
Parameters
Type Name Description
ISimulation simulation

The simulation.

Overrides
Entity.CreateBehaviors(ISimulation)
Exceptions
Type Condition
ArgumentNullException

Thrown if simulation is null.

ArgumentException

Thrown if the simulation does not use an IComplexSimulationState.

TypeNotFoundException

Thrown if a required behavior or parameter set could not be found.

AmbiguousTypeException

Thrown if a behavior or parameter set could not be resolved unambiguously.

Implements

IParameterized<P>
IComponent
IEntity
IParameterSetCollection
IParameterSet
ICloneable<T>
IRuleSubject

Extension Methods

Documentation.Pins(IComponent)
Utility.ThrowIfNull<T>(T, string)
Documentation.ParameterValues<T>(IParameterSet, bool)
Documentation.Parameters(IParameterSet)
Documentation.ParameterValues<T>(IParameterSetCollection, bool)
Documentation.Parameters(IParameterSetCollection)

See Also

Entity
IComponent
In this article
Back to top Generated by DocFX