using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ProjetDotNet.metier;

namespace ProjetDotNet.COR
{
    /*
     * Gère le chargement d'un segment
     */
    public class CORChargerSegment:CORChargerForme
    {
        public CORChargerSegment(CORChargerForme suivant):base(suivant)
        {

        }

        public CORChargerSegment():base()
        {
            
        }

        /*public override Forme charge(int id)
        {
            bool bonType = this.CONNEXION.DAO_SEGMENT.isSameTypeisSameType(id, nomFigure);
            if (bonType)
            {
                Segment t = this.CONNEXION.DAO_SEGMENT.charge(id);
                return t;
            }
            else
            {
                return this.GetSuccessor().charge(id);
            }

        }*/
        public override Forme charge(int id, string nomFigure)
        {
            bool bonType = this.CONNEXION.DAO_SEGMENT.isSameType(id,nomFigure);
            if (bonType)
            {
                Segment t = this.CONNEXION.DAO_SEGMENT.charge(id, nomFigure);
                return t;
            }
            else
            {
                return this.GetSuccessor().charge(id, nomFigure);
            }

        }

    }
}
