2using System.Collections.Generic;
19 : this(null, null, null)
54 public object Tag {
get;
set; }
89 if (Elements.Count != 3)
143 StringBuilder sb =
new StringBuilder();
153 return sb.ToString();
161 Typed.Predicate.Equals(this.
Predicate) &&
162 Typed.Object.Equals(this.
Object);
168 int Result = this.
Subject.GetHashCode();
169 Result ^= Result << 5 ^ this.
Predicate.GetHashCode();
170 Result ^= Result << 5 ^ this.
Object.GetHashCode();
191 int i = this.
Subject.CompareTo(T.Subject);
195 i = this.
Predicate.CompareTo(T.Predicate);
199 return this.
Object.CompareTo(T.Object);
215 case 2:
return this.
Object;
216 default:
return null;
Abstract base class for semantic elements.
Set of semantic elements.
static readonly SemanticElements Instance
Instance reference to the set of semantic elements.
static ISemanticElement Encapsulate(object Value)
Encapsulates an object as a semantic element.
Implements a semantic triple.
SemanticTriple()
Implements a semantic triple.
override bool Equals(object obj)
object Tag
Property used by processor, to tag information to an element.
ISemanticElement Predicate
Predicate element
bool IsScalar
If the element represents a scalar value.
override int GetHashCode()
object ElementValue
Underlying element value represented by the semantic element.
IElement Encapsulate(ICollection< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
virtual bool TryConvertTo(Type DesiredType, out object Value)
Converts the value to a .NET type.
ISemanticElement Subject
Subject element
override string ToString()
object AssociatedObjectValue
Associated object value.
SemanticTriple(ISemanticElement Subject, ISemanticElement Predicate, ISemanticElement Object)
Implements a semantic triple.
ISemanticElement Object
Object element
ISet AssociatedSet
Associated Set.
bool IsLiteral
If element is a literal.
int CompareTo(object obj)
Compares the current instance with another object of the same type and returns an integer that indica...
ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
Base class for all nodes in a parsed script tree.
Interface for semantic nodes.
bool IsLiteral
If element is a literal.
Interface for semantic triples.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Basic interface for all types of sets.