using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
namespace CategoryTheory
{
/// <summary>
/// Category arrow
/// </summary>
public abstract class CategoryArrow : ICategoryArrow, ISerializable
{
#region Fields
/// <summary>
/// Associated object
/// </summary>
private object obj;
#endregion
#region ICategoryArrow Members
/// <summary>
/// The source of this arrow
/// </summary>
public abstract ICategoryObject Source
{
get;
set;
}
/// <summary>
/// The target of this arrow
/// </summary>
public abstract ICategoryObject Target
{
get;
set;
}
bool ICategoryArrow.IsMonomorphism
{
get { throw new Exception("The method or operation is not implemented."); }
}
bool ICategoryArrow.IsEpimorphism
{
get { throw new Exception("The method or operation is not implemented."); }
}
bool ICategoryArrow.IsIsomorphism
{
get { throw new Exception("The method or operation is not implemented."); }
}
/// <summary>
/// Composes this arrow "f" with next arrow "g"
/// </summary>
/// <param name="category"> The category of arrow</param>
/// <param name="next"> The next arrow "g" </param>
/// <returns>Composition "fg" </returns>
public virtual ICategoryArrow Compose(ICategory category, ICategoryArrow next)
{
return null;
}
#endregion
#region IAssociatedObject Members
/// <summary>
/// Object
/// </summary>
public object Object
{
get
{
return obj;
}
set
{
obj = value;
}
}
#endregion
#region ISerializable Members
/// <summary>
/// Implementation of ISerializable interface
/// </summary>
/// <param name="info">Serialization info</param>
/// <param name="context">Streaming context</param>
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
}
#endregion
}
}