359 |
|
} |
360 |
|
} |
361 |
|
|
362 |
– |
// XXX: constructing a string from Binary or Hexadecimal seems too dangerous |
362 |
|
template <> |
363 |
|
std::string Represent::input(const Item& item) |
364 |
|
{ |
365 |
< |
return item.data; |
365 |
> |
std::string string; |
366 |
> |
|
367 |
> |
switch (item.input) |
368 |
> |
{ |
369 |
> |
default: |
370 |
> |
return item.data; |
371 |
> |
case InputType::INPUT_Binary: |
372 |
> |
_foreach (_L<ext::String>, atom, item.data.Split(' ')) string += Binary(*atom, false).convert<char>(false); |
373 |
> |
break; |
374 |
> |
case InputType::INPUT_Hexadecimal: |
375 |
> |
_foreach (_L<ext::String>, atom, item.data.Split(' ')) string += Hexadecimal(*atom, false).convert<char>(false); |
376 |
> |
} |
377 |
> |
|
378 |
> |
return string; |
379 |
|
} |
380 |
|
|
369 |
– |
// XXX: constructing a string from Binary or Hexadecimal seems too dangerous |
381 |
|
template <> |
382 |
|
ext::String Represent::input(const Item& item) |
383 |
|
{ |
384 |
< |
return item.data; |
384 |
> |
ext::String string; |
385 |
> |
|
386 |
> |
switch (item.input) |
387 |
> |
{ |
388 |
> |
default: |
389 |
> |
return item.data; |
390 |
> |
case InputType::INPUT_Binary: |
391 |
> |
_foreach (_L<ext::String>, atom, item.data.Split(' ')) string.InsertLast(Binary(*atom, false).convert<ext::CodePoint>(false)); |
392 |
> |
break; |
393 |
> |
case InputType::INPUT_Hexadecimal: |
394 |
> |
_foreach (_L<ext::String>, atom, item.data.Split(' ')) string.InsertLast(Hexadecimal(*atom, false).convert<ext::CodePoint>(false)); |
395 |
> |
} |
396 |
> |
|
397 |
> |
return string; |
398 |
|
} |
399 |
|
|
400 |
|
template <typename Type> |