#include "tk_stringoption.h"

const char* TkStringOption::type="TkStringOption";

const char* TkStringOption::getType() const
{
	return type;
}

void TkStringOption::doSerialize(TiXmlElement& element) const
{
	element.SetAttribute("value",value.c_str());
}

void TkStringOption::doDeserialize(const TiXmlElement& element)
{
	const char* value=element.Attribute("value");
	this->value=string(value);
}

TkStringOption::TkStringOption():value("")
{
}

TkStringOption::TkStringOption(const string& value):value(value)
{
}

const string& TkStringOption::toString() const
{
	return value;
}

void TkStringOption::fromObject(Tcl_Obj* object)
{
	this->value=value;
}