|
using System.Text;
namespace MathMLToCSharp.Entities
{
/// <summary>
/// A fairly generic element that does not mean anything.
/// </summary>
public class Mrow : WithBuildableContents
{
public Mrow(IBuildable[] content) : base(content)
{
}
public Mrow(IBuildable first, IBuildable second) : this(new[] {first, second})
{
}
public Mrow(IBuildable content) : this(new[] {content})
{
}
public IBuildable[] Contents
{
get { return contents; }
}
/// <summary>
/// Returns <c>true</c> if this <see cref="Mrow"/> contains a single <see cref="Mi"/>.
/// </summary>
public bool ContainsSingleMi
{
get
{
return contents.Length == 1 && contents[0] is Mi;
}
}
/// <summary>
/// Gets a value indicating whether this Mrow contains a single Mn.
/// </summary>
/// <value><c>true</c> if this row contains a single Mn; otherwise, <c>false</c>.</value>
public bool ContainsSingleMn
{
get
{
return contents.Length == 1 && contents[0] is Mn;
}
}
public override void Visit(StringBuilder sb, BuildContext context)
{
base.Visit(sb, context);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I work primarily with the .NET technology stack, and specialize in accelerated code production via code generation (static or dynamic), aspect-oriented programming, MDA, domain-specific languages and anything else that gets products out the door faster. My languages of choice are C# and C++, though I'm open to suggestions.