// Represent // // Douglas Thrift // // $Id$ #include "InputType.hpp" const ext::Vector& InputType::enumerate() { if (enumeration.IsEmpty()) { _foru (type, INPUT_Normal, INPUT_Hexadecimal + 1) enumeration.InsertLast(Type(type)); } return enumeration; } ext::Vector InputType::enumeration; InputType& InputType::operator=(const ext::String& string) { if (enumeration.IsEmpty()) enumerate(); ext::Vector::ConstIterator found(enumeration.Find(string)); if (found != enumeration.End()) type = *found; return *this; } InputType::operator ext::String() const { switch (type) { case INPUT_Normal: return "Normal"; case INPUT_Binary: return "Binary"; case INPUT_Hexadecimal: return "Hexadecimal"; default: return ext::String(); } }