package resolumeCom.parameters
{
	public class BooleanParameter extends Parameter
	{
			
		private var defaultValue:Boolean;
		private var currentValue:Boolean;
		
		public function BooleanParameter(name_:String, defaultValue_:Boolean) {
			this.name = name_;
			this.type = 0; //PARAM_TYPE_BOOL
			this.defaultValue = defaultValue_;
			this.currentValue = defaultValue_;
		}
	
		public function getDefault() : Boolean {
			return this.defaultValue;
		}
	
		public function getValue() : Boolean {
			return this.currentValue;
		}
		
		public function setValue(value_:Boolean, forceChange:Boolean = false) {
			if (!forceChange && value_ == this.currentValue)
				return;
			this.currentValue = value_;
            this.parameterChanged();
		}
		
		override public function getXmlRep(): String
		{
			var xmlRep:String =  "<param type='" + getType() + "' name='" + getName() + "' value='" + getValue() + "'/>";
			return xmlRep;		
		}
		
	}
}