~ubuntu-branches/ubuntu/quantal/rheolef/quantal

« back to all changes in this revision

Viewing changes to skit/ptst2/mpl_polymorphe_tst.cc

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-03-26 08:10:11 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110326081011-378s3slxnhwhn1da
Tags: 5.93-2
* debian/control:
  - "vtk-tcl" dependency changed to "tcl-vtk|vtk-tcl" (closes: #619917)
  - "doxygen" dependency removed                      (closes: #616276)
* debian/rheolef-doc.install : add refman in .info format
* debian/rheolef-doc.doc-base.refman: created for .pdf .html & .info
* debian/rules:
  - clean some obsolete Makefile commandes

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
struct print_name {
46
46
    template< typename U > void operator()(U x) {
47
 
        cerr << typeid_name_macro(U) << endl;
 
47
        cerr << typename_macro(U) << endl;
48
48
    }
49
49
};
50
50
struct pretty_name {
51
51
    template< typename U > void operator()(U x) {
52
 
        cerr << pretty_name_macro(U) << endl;
 
52
        cerr << pretty_typename_macro(U) << endl;
53
53
    }
54
54
};
55
55
// -----------------------------------------------------
76
76
   typedef typename X0::value_type       T0;
77
77
   X0 _x0;
78
78
   struct_of_aux<V,1>() : struct_of_aux<V,0>(), _x0() {
79
 
        warning_macro ("cstor struct N=1: X0="<< typeid_name_macro(X0));
 
79
        warning_macro ("cstor struct N=1: X0="<< typename_macro(X0));
80
80
   }
81
 
   void f(T0*) const { warning_macro ("f ("<< pretty_name_macro(T0) << ")"); }
 
81
   void f(T0*) const { warning_macro ("f ("<< pretty_typename_macro(T0) << ")"); }
82
82
};
83
83
template <class V>
84
84
struct struct_of_aux<V,2> : struct_of_aux<V,1> {
85
85
   typedef typename mpl::at_c<V,1>::type X1;
86
86
   X1 _x1;
87
87
   struct_of_aux<V,2>() : struct_of_aux<V,1>(), _x1() {
88
 
        warning_macro ("cstor struct N=2: X1="<< typeid_name_macro(X1));
 
88
        warning_macro ("cstor struct N=2: X1="<< typename_macro(X1));
89
89
   }
90
90
   typedef typename X1::value_type       T1;
91
 
   void f(T1*) const { warning_macro ("f ("<< pretty_name_macro(T1) << ")"); }
 
91
   void f(T1*) const { warning_macro ("f ("<< pretty_typename_macro(T1) << ")"); }
92
92
   // remonte:
93
93
   typedef typename     struct_of_aux<V,1>::T0 T0;
94
94
   void f(T0*t) const { struct_of_aux<V,1>::f(t); }
98
98
   typedef typename mpl::at_c<V,2>::type X2;
99
99
   X2 _x2;
100
100
   struct_of_aux<V,3>() : struct_of_aux<V,2>(), _x2() {
101
 
        warning_macro ("cstor struct N=3: X2="<< typeid_name_macro(X2));
 
101
        warning_macro ("cstor struct N=3: X2="<< typename_macro(X2));
102
102
   }
103
103
   typedef typename X2::value_type       T2;
104
 
   void f(T2*) const { warning_macro ("f ("<< pretty_name_macro(T2) << ")"); }
 
104
   void f(T2*) const { warning_macro ("f ("<< pretty_typename_macro(T2) << ")"); }
105
105
   // remonte
106
106
   typedef typename     struct_of_aux<V,2>::T0 T0;
107
107
   typedef typename     struct_of_aux<V,2>::T1 T1;
135
135
   typedef typename X0::value_type       T0;
136
136
   X0 _x0;
137
137
   struct_of_prepro<V,1>() : struct_of_prepro<V,0>(), _x0() {
138
 
        warning_macro ("cstor struct N=1: X0="<< typeid_name_macro(X0));
 
138
        warning_macro ("cstor struct N=1: X0="<< typename_macro(X0));
139
139
   }
140
 
   void f(T0*) const { warning_macro ("f ("<< pretty_name_macro(T0) << ")"); }
 
140
   void f(T0*) const { warning_macro ("f ("<< pretty_typename_macro(T0) << ")"); }
141
141
};
142
142
#endif // TODO
143
143
// -----------------------------------------------------
176
176
typedef mpl::vector3<tetra,penta,hexa>      v3d;
177
177
 
178
178
int main(int argc, char**argv) {
179
 
  environment parallel (argc,argv);
 
179
  environment distributed (argc,argv);
180
180
 
181
181
  warning_macro ("1) test mpl::vector...");
182
182
  cerr << "size(v3d) = " << mpl::size<v3d>::value << endl;