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

namespace FingersDance.ActionFactory
{
    public class ActionGenerator
    {
        private Dictionary<String, Type> actionDict = new Dictionary<string, Type>();

        public ActionGenerator()
        {
            actionDict.Add("ActionPlayMedia", typeof(FingersDance.Actions.ActionPlayMedia));
            actionDict.Add("ActionShowMessage", typeof(FingersDance.Actions.ActionShowMessage));
            actionDict.Add("ActionOpenMedia", typeof(FingersDance.Actions.ActionOpenMedia));
            actionDict.Add("ActionStopMedia", typeof(FingersDance.Actions.ActionStopMedia));            
        }

        public ActionBase GetAction(string T, object Args)
        {
            return (ActionBase)Activator.CreateInstance(actionDict[T]);
        }
    }
}
