using System;

//Only one should exist at the same time
public class BaseModelBehaviour : ModelBehaviour
{
    BaseModel baseModel
    {
        get
        {
            if (model is BaseModel bModel)
            {
                return bModel;
            }
            throw new InvalidCastException("model needs to be of type BaseModel");
        }
        set
        {
            model = value;
        }
    }

    public void UpdateChildPorts(BaseModel model)
    {
        base.UpdateModel(model);
    }
}