Midge  v3.9.2
Data Processing Framework
test_typechain.cc
Go to the documentation of this file.
1 #include <iostream>
2 
3 #include "typechain.hh"
4 
5 #include "typename.hh"
6 
7 using std::cout;
8 using std::endl;
9 
10 namespace midge
11 {
12  namespace test
13  {
14  template< class x_type, class x_index >
15  class socket
16  {
17  public:
18  socket( const std::string& p_name )
19  {
20  cout << "<" << p_name << ">: creating socket for <" << scarab::demangle(typeid(x_type).name()) << "> at index <" << x_index::value << ">" << endl;
21  }
23  {
24  }
25 
26  };
27 
28  template< class... x_types >
29  class parent :
30  public type_chain< socket< _type, _index >, 0, x_types... >
31  {
32  public:
33  parent() :
34  type_chain< socket< _type, _index >, 0, x_types... >( "parent_2" )
35  {
36  }
38  {
39  }
40  };
41 
42  }
43 }
44 
45 using namespace midge;
46 using namespace midge::test;
47 
48 int main()
49 {
50 
51  parent< char, short, int > t_parent_one;
52 
54 
55  return 0;
56 
57 }
Definition: _buffer.hh:11
test
Definition: test_buffer.cc:14
Template prototype.
Definition: typechain.hh:45
socket(const std::string &p_name)
The prototype class that gets replaced by a type.
Definition: typechain.hh:36
The prototype class that gets replaced by a type index (or rather the struct that wraps a type&#39;s inde...
Definition: typechain.hh:40
int main()