Arduino Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
realization.hpp
Go to the documentation of this file.
1 // Author: Mario S. Könz <mskoenz@gmx.net>
2 // Date: 23.07.2013 05:10:01 EDT
3 // File: realization.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 __REALIZATION_HEADER
12 #define __REALIZATION_HEADER
13 
14 #include "tags.hpp"
15 
16 namespace ustd {
17  //------------------- convert tags to realizations -------------------
18  template<typename T, typename tag, typename _base>
19  struct realization {
20  };
21 
22  #define EMPTY_FILTER(NAME, VALUE) \
23  template<typename T, typename _base> \
24  class NAME##_filter<T, VALUE, _base>: public _base { \
25  typedef _base base; \
26  public: \
27  NAME##_filter & operator=(T const & in) { \
28  base::operator=(in); \
29  return (*this); \
30  } \
31  NAME##_filter & operator<<(T const & in) { \
32  base::operator<<(in); \
33  return (*this); \
34  } \
35  T value() const { \
36  return base::value(); \
37  } \
38  operator T() const { \
39  return value(); \
40  } \
41  };
42 }//end namespace ustd
43 #endif //__REALIZATION_HEADER
Definition: realization.hpp:19