using System;

namespace Icarus.Input {
    /// <summary>
    /// BoundAction is an action associated with a given 
    /// key or button on an input device.
    /// </summary>
    public class BoundAction {
        #region Instance Variables
        /// <summary>
        /// Name of the button or key this bound action will be applied to.
        /// </summary>
        private string keyname = null;
        /// <summary>
        /// The action to be done when the button or key is pressed.
        /// </summary>
        private string action = null;
        #endregion

        #region Initialization
        /// <summary>
        /// Constructor for a BoundAction.
        /// </summary>
        /// <param name="name">Name of the button or key to be mapped.</param>
        /// <param name="boundAction">Action to be assigned to the given key.</param>
        public BoundAction(string name, string boundAction) {
            keyname = name;
            action = boundAction;
        }
        #endregion

        #region Accessors/Modifiers
        /// <summary>
        /// Accessor for keyname.
        /// </summary>
        public string gs_keyname {
            get { return keyname; }
        }

        /// <summary>
        /// Accessor/Modifer for action.
        /// </summary>
        public string gs_action {
            get { return action; }
            set { action = value; }
        }
        #endregion
    }
}
