Entry Class

Data format used for calculations. Allows to manage expressions as a tree.

Definition

Namespace: SMath.Manager
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.73.9126.0
C#
public class Entry : IPrimitive<Entry>, 
	IPrimitive
Inheritance
Object    Entry
Implements
IPrimitive, IPrimitive<Entry>

Constructors

Entry(Entry) Constructor to create a full copy of the given Entry.
Entry(IPrimitive) Constructor to create an expression operand based on the existing Expression component. .
Entry(String) Constructor to create an expression operand.
Entry(String, TermType, Entry[]) Constructor to create an expression operand.

Properties

ArgsCount Number of children of the expression component. Can get values:
  • "0" - for the Operand;
  • "1" - for the Bracket;
  • "1" or "2" - for the Operator;
  • More then "1" or equal - for the Function.
Items Children of current entry.
RecurseItemsCount Returns overall length of the Entry items (recursively).
Tag Reference to the expression component shown in UI.
TagSubst Reference to the expression component used for substitution during preprocessing.
Text Text value of the expression component.
Type Type of the expression component.

Methods

Contains Determines whether a primitive is in the expression.
CopyWithVeryFirstLeast Copy specified math expression changing the first element with a specified one.
Create Creates a new instance of Entry from list of Terms.
CreateMeta Creates a new instance of Entry from list of Terms.
EqualsDetermines whether the specified object is equal to the current object.
(Overrides Object.Equals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Overrides Object.GetHashCode())
GetRevertedEnumerator Returns reverted enumerator to iterate through equation terms. NOTE: The result terms has reverted order but it do not use recursion, which allows to avoid usage of call stack to prevent StackOverflow exception. This method is strongly recommended for complex expressions.
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetVeryFirstLeast Gets the very first operand of the expression.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToRevertedList

Retrieves the list of primitives in reverse order. It is guaranteed that recursion is not used.

  Tip

This method may be a bit slower than ToTermsList() and the resulting list has reverted order of items but it does not use recursion which prevents from StackOverflowException. This method is strongly recommended for complex expressions.

ToString String representation of math expression.
(Overrides Object.ToString())
ToTagsList Converts current expression to the list of Implements IPrimitive. elements.
ToTerm Terms array representation of math expression.
ToTermsList Converts the expression component to a list of terms in straight order.
TryFixStructure Converts list of Terms to new Entry instance with checks for missing parenthesis and errors in math expression structure.

Operators

Equality(Entry, Entry) Check equality of two Entry objects.
Inequality(Entry, Entry) Check inequality of two Entry objects.

See Also