##ifndef ENUM_TO_STRING_#x:enum-name
##define ENUM_TO_STRING_#x:enum-name  1
inline std::string to_string(#x:type-name  v)
{
  switch(v)
  {
    #x:enum-field-to-string
  }
  return "";
}
##endif // ENUM_TO_STRING_#x:enum-name