Class Statements
An ordered collection of statements.
Inherited Members
Namespace: SpiceSharpParser.Models.Netlist.Spice.Objects
Assembly: SpiceSharpParser.dll
Syntax
public class Statements : SpiceObject, IEnumerable<Statement>, IEnumerable
Constructors
| Improve this Doc View SourceStatements()
Initializes a new instance of the Statements class.
Declaration
public Statements()
Properties
| Improve this Doc View SourceCount
Gets the statements count.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Item[Int32]
Indexer.
Declaration
public Statement this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
Statement |
LineInfo
Gets the line info.
Declaration
public override SpiceLineInfo LineInfo { get; }
Property Value
Type | Description |
---|---|
SpiceLineInfo |
Overrides
Methods
| Improve this Doc View SourceAdd(Statement)
Adds a statement to the end of collection.
Declaration
public void Add(Statement statement)
Parameters
Type | Name | Description |
---|---|---|
Statement | statement | A statement to add. |
Clear()
Clears the collection.
Declaration
public void Clear()
Clone()
Clones the object.
Declaration
public override SpiceObject Clone()
Returns
Type | Description |
---|---|
SpiceObject | A clone of the object. |
Overrides
| Improve this Doc View SourceGetEnumerator()
Gets the enumerator.
Declaration
public IEnumerator<Statement> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<Statement> | A new enumerator. |
IndexOf(Statement)
Gets an index of statement in statements.
Declaration
public int IndexOf(Statement statement)
Parameters
Type | Name | Description |
---|---|---|
Statement | statement | A statement. |
Returns
Type | Description |
---|---|
System.Int32 | An index of statement. |
Merge(Statements)
Merges the given statements collection this the current collection.
Declaration
public void Merge(Statements sts)
Parameters
Type | Name | Description |
---|---|---|
Statements | sts | A collection to merge. |
OrderBy(Func<Statement, Int32>)
Gets the enumerator of statements in the given order.
Declaration
public IEnumerable<Statement> OrderBy(Func<Statement, int> orderByFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Statement, System.Int32> | orderByFunc | Specifies the order. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Statement> | A new enumerator. |
Replace(Statement, IEnumerable<Statement>)
Replace the given statement by statements.
Declaration
public void Replace(Statement statement, IEnumerable<Statement> statements)
Parameters
Type | Name | Description |
---|---|---|
Statement | statement | A statement to replace. |
System.Collections.Generic.IEnumerable<Statement> | statements | Statements to replace with. |
Replace(Int32, Int32, IEnumerable<Statement>)
Declaration
public void Replace(int start, int end, IEnumerable<Statement> statements)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | start | |
System.Int32 | end | |
System.Collections.Generic.IEnumerable<Statement> | statements |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the current object. |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Gets the enumerator.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | A new enumerator. |