Arduino Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
iomanip.hpp
Go to the documentation of this file.
1 // Author: Mario S. Könz <mskoenz@gmx.net>
2 // Date: 08.06.2013 12:17:31 EDT
3 // File: iomanip.hpp
4 
5 /* This program is free software. It comes without any warranty, to
6  * the extent permitted by applicable law. You can redistribute it
7  * and/or modify it under the terms of the Do What The Fuck You Want
8  * To Public License, Version 2, as published by Sam Hocevar. See
9  * http://www.wtfpl.net/ or COPYING for more details. */
10 
11 #ifndef __IOMANIP_HEADER
12 #define __IOMANIP_HEADER
13 
14 namespace ustd {
15 
16  #define BUILD_FCT(NAME, TYPE) \
17  struct NAME { \
18  typedef TYPE NAME ## _type; \
19  NAME(NAME ## _type const & data): data_(data) { \
20  } \
21  NAME ## _type const & operator()() const { \
22  return data_; \
23  } \
24  NAME ## _type data_; \
25  };
26 
27  BUILD_FCT(setw, uint8_t)
28  BUILD_FCT(setfill, char)
29  BUILD_FCT(setprecision, uint8_t)
30  BUILD_FCT(setbase, uint8_t)
31 
32  #undef BUILD_FCT
33 }//end namespace ustd
34 
35 #endif //__IOMANIP_HEADER
#define BUILD_FCT(NAME, TYPE)
Definition: iomanip.hpp:16