senf::console::CharAsString< CharT > Struct Template Reference
[Special console utility types]

Parse character value as single-char string. More...

#include <senf/Utils/Console/Utility.hh>

List of all members.


Detailed Description

template<class CharT>
struct senf::console::CharAsString< CharT >

Parse character value as single-char string.

This helper types is a wrapper around CharT which must be a character type. A value of this type will be represented as a single character string, not as numeric value (the default interpretation of char arguments in the console library).

This wrapper is used via type conversion using boost::function to convert the argument/return type CharT to CharAsString<CharT>:

char foo(char v) { return v; }

senf::console::root().add(
    "foo", fty::Command< CharAsString<char> (CharAsString<char>) >(&foo));
Template Parameters:
CharT  character type, one of char, signed char or unsigned char

Definition at line 64 of file Utility.hh.


Public Member Functions

  CharAsString ()
  CharAsString (CharT value_)
  operator CharT () const

Public Attributes

CharT  value

Constructor & Destructor Documentation

template<class CharT >
senf::console::CharAsString< CharT >::
CharAsString ()

Definition at line 34 of file Utility.cti.

template<class CharT >
senf::console::CharAsString< CharT >::
CharAsString ( CharT  value_ )

Definition at line 39 of file Utility.cti.


Member Function Documentation

template<class CharT >
senf::console::CharAsString< CharT >::operator
CharT ()

Definition at line 44 of file Utility.cti.


Member Data Documentation

template<class CharT>
CharT senf::console::CharAsString< CharT >::
value

Definition at line 69 of file Utility.hh.


The documentation for this struct was generated from the following files: