/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ca.mcmaster.cas.matlab2smt;

/**
 *
 * @author matthew
 */
public abstract class VariableType implements VariableTypeMarker {
    /**
     * Marks whether the type can be cast to this type.  Certain values may be
     * castable to a different type.  If possible, this method will mark it as
     * such.
     * @param type The type this variable type should cast to.
     * @return True if this type can act like the other type.  False otherwise.
     */
    abstract public boolean canCastToType(VariableType type);

    /* By default, all types are their own markers.  Thus by default implement isMarkerFor to represent that.  Override
     * if further behaviour is necessary.
     */
     @Override
    public boolean isMarkerFor(VariableType m_type) {
        return this.equals(m_type);
    }
}
