#ifndef _TK_ENUM_OPTION_H_
#define _TK_ENUM_OPTION_H_

#include "../tk_baseoption.h"

class TkEnumOption:public TkBaseOption
{
	int value;
	const static string TXT_ERROR;
	const char** enums;

	int valueInArray(const char* value);
protected:
	void doSerialize(TiXmlElement& element) const;
	void doDeserialize(const TiXmlElement& element);
public:
	TkEnumOption(const char* value,const char* enums[]);
	TkEnumOption(int value,const char* enums[]);
	
	const char* getType() const=0;

	const string& toString() const;
	void fromObject(Tcl_Obj* object);
};

#endif/*_TK_ENUM_OPTION_H_*/
