/* 
 * Tactic is the legal property of its developers, whose names are too numerous 
 * to list here.  Please refer to the COPYRIGHT file distributed with this 
 * source distribution. 
 * 
 * This library is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU Lesser General Public 
 * License as published by the Free Software Foundation; either 
 * version 2.1 of the License, or (at your option) any later version. 
 * 
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
 * Lesser General Public License for more details. 
 * 
 * You should have received a copy of the GNU Lesser General Public 
 * License along with this library; if not, write to the Free Software 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
 *
 * See README for more informations
 *
 * FuzzyValue.h
 *
 * Date 16/03/06
 *
 */

#ifndef FUZZY_VALUE_H
#define FUZZY_VALUE_H

#include <string>
#include <iostream>
#include "FuzzyValueName.h"
#include "Converter.h"

class FuzzyNumber;				//forward declaration

class FuzzyValue{

protected :

	fuzzyValueName name;		// Name of the fuzzy value
	float value;				// Value of the fuzzy value
	FuzzyNumber* fuzzyNumber;	// the FuzzyNumber give information for the fuzzification

public :
	
	/**
	 *Constructor : Create a FuzzyValue
	 * 
	 *@param void
	 *  
	 *@return void
	 *
	 */
	FuzzyValue(void);

	/**
	 *Constructor : Create a FuzzyValue only used for tests
	 * 
	 *@param fvn : name to reconize a FuzzyNumber
	 *  
	 *@return void
	 *
	 */
	FuzzyValue(FuzzyValueName fvn);

	/**
	 *Constructor : Create a FuzzyValue only used for tests
	 * 
	 *@param fvn : name to reconize a FuzzyNumber
	 *@param value : this the value of the FuzzyValue. 
	 * 				 It is a Float between 0 and 1.
	 *  
	 *@return void
	 *
	 */
	FuzzyValue(FuzzyValueName fvn, float value);

	/**
	 *Constructor : Create a FuzzyValue with the name and the value 
	 * 			    enter in parameter.
	 * 
	 *@param value : this the value of the FuzzyValue. 
	 * 				 It is a Float between 0 and 1.
	 *  
	 *@return FuzzyValue
	 *
	 */
	FuzzyValue(float value);

	/**
	 *Destructor : destroy the FuzzyValue
	 * 
	 *@param void
	 *  
	 */
	~FuzzyValue(void);

	/**
	 *getName : Return the name of the FuzzyValue.
	 * 
	 *@param void
	 * 
	 *@return fuzzyValueName : The name of the FuzzyValue.
	 * 
	 */
	fuzzyValueName getName();

	/**
	 *getValue : Return the value of the FuzzyValue
	 *  
	 *@param void
	 * 
	 *@return float : The value of the FuzzyValue.
	 * 		           This float is between 0 and 1.
	 *
	 */
	float getValue();

	/**
	 *getFuzzyNumberValue : get the FuzzyNumber value
	 * 
	 *@param void
	 *  
	 *@return float
	 */
	float getFuzzyNumberValue();

	/**
	 *setValue : Set the value of the FuzzyValue to the float given in parameter.
	 *  
	 *@param f : float which is going to be the value of the FuzzyValue
	 * 
	 *@return void
	 * 
	 */
	void setValue(float f);

	/**
	 *update : update the value of the FuzzyValue
	 *  
	 *@param void
	 * 
	 *@return float : The value of the FuzzyValue.
	 * 		          This float is between 0 and 1.
	 * 
	 */
	virtual void update();

	/**
	 *toString : Return a string which represent the FuzzyValue
	 * 
	 *@param void
	 * 
	 *@return string : A representation of the FuzzyValue
	 *
	 */
	std::string toString();

	/**
	 *setFuzzyNumber : Set the FuzzyNumber in attribute
	 *  
	 *@param fn : The FuzzyNumber linked with the current FuzzyValue
	 * 
	 *@return void
	 * 
	 */
	void setFuzzyNumber(FuzzyNumber* fn);

};

#endif