Show / Hide Table of Contents

Class Entity

Base class for any circuit object that can take part in simulations.

Inheritance
object
ParameterSet
ParameterSetCollection
Entity
Component
Subcircuit
Entity<P>
Implements
IEntity
IParameterSetCollection
IParameterSet
ICloneable<IEntity>
Inherited Members
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.Entities
Assembly: SpiceSharp.dll
Syntax
public abstract class Entity : ParameterSetCollection, IEntity, IParameterSetCollection, IParameterSet, ICloneable<IEntity>

Constructors

Entity(string)

Initializes a new instance of the Entity class.

Declaration
protected Entity(string name)
Parameters
Type Name Description
string name

The name of the entity.

Exceptions
Type Condition
ArgumentNullException

Thrown if name is null.

Properties

LinkParameters

Gets or sets a value indicating whether the parameters should reference that of the entity. If the parameters are not referenced, then the parameters are cloned instead.

Declaration
public bool LinkParameters { get; set; }
Property Value
Type Description
bool

true if parameters are referenced instead of cloned; otherwise, false.

Name

Gets the name of the entity.

Declaration
public string Name { get; }
Property Value
Type Description
string

The name.

Methods

Clone()

Clones the instance.

Declaration
public abstract IEntity Clone()
Returns
Type Description
IEntity

The cloned instance.

CreateBehaviors(ISimulation)

Creates the behaviors and stores them in the specified container.

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

The simulation.

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.

SetParameter<P>(string, P)

Sets the value of a parameter of the specified type and with the specified name. This is just a wrapper that allows chaining these commands.

Declaration
public Entity SetParameter<P>(string name, P value)
Parameters
Type Name Description
string name

The name of the parameter.

P value

The value of the parameter.

Returns
Type Description
Entity

The entity.

Type Parameters
Name Description
P

The parameter value type.

Exceptions
Type Condition
ArgumentNullException

Thrown if name is null.

ParameterNotFoundException

Thrown if the parameter was not found.

ToString()

Returns a string that represents the current entity.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()

Implements

IEntity
IParameterSetCollection
IParameterSet
ICloneable<T>

Extension Methods

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

See Also

ParameterSetCollection
IEntity
In this article
Back to top Generated by DocFX