1  /**
     2   * SpecialProperty
     3   * A kind of a getter/setter for special properties
     4   *
     5   * @author		Zeh Fernando
     6   * @version		1.0.0
     7   */
     8  
     9  class caurina.transitions.SpecialProperty {
    10  
    11  	public var getValue:Function; // (p_obj:Object, p_parameters:Array): Number
    12  	public var setValue:Function; // (p_obj:Object, p_value:Number, p_parameters:Array): Void
    13  	public var parameters:Array;
    14  	public var preProcess:Function; // (p_obj:Object, p_parameters:Array, p_originalValueComplete:Object, p_extra:Object): Number
    15  
    16  	/**
    17  	 * Builds a new special property object.
    18  	 *
    19  	 * @param		p_getFunction		Function	Reference to the function used to get the special property value
    20  	 * @param		p_setFunction		Function	Reference to the function used to set the special property value
    21  	 * @param		p_parameters		Array		Additional parameters that should be passed to the function when executing (so the same function can apply to different special properties)
    22  	 */
    23  	public function SpecialProperty (p_getFunction:Function, p_setFunction:Function, p_parameters:Array, p_preProcessFunction:Function) {
    24  		getValue = p_getFunction;
    25  		setValue = p_setFunction;
    26  		parameters = p_parameters;
    27  		preProcess = p_preProcessFunction;
    28  	}
    29  
    30  	/**
    31  	 * Converts the instance to a string that can be used when trace()ing the object
    32  	 */
    33  	public function toString():String {
    34  		var value:String = "";
    35  		value += "[SpecialProperty ";
    36  		value += "getValue:"+getValue.toString();
    37  		value += ", ";
    38  		value += "setValue:"+setValue.toString();
    39  		value += ", ";
    40  		value += "parameters:"+parameters.toString();
    41  		value += ", ";
    42  		value += "preProcess:"+preProcess.toString();
    43  		value += "]";
    44  		return value;
    45  	}
    46  
    47  
    48  }
    49