datasource_fixture.cpp
Go to the documentation of this file.
1 #include "datasource_fixture.hpp"
2 
3 bool operator==(const AType& a, const AType& b)
4 {
5  return a.a == b.a && a.b == b.b && a.c == b.c && a.ai == b.ai && std::equal(a.vd.begin(), a.vd.end(), b.vd.begin());
6 }
7 
8 std::ostream& operator<<(std::ostream& os, const AType& a)
9 {
10  os << "{ " << a.a << ", " << a.b << ", " << a.c << ", < ";
11  for (unsigned int i = 0; i != a.ai.size(); ++i)
12  os << a.ai[i] << " ";
13  os <<">, ( ";
14  for (unsigned int i = 0; i != a.vd.size(); ++i)
15  os << a.vd[i] << " ";
16  os << ") }";
17  return os;
18 }
19 std::ostream& operator<<(std::ostream& os, const ATypes& as)
20 {
21  os << '[';
22  for (unsigned int i = 0; i != as.size(); ++i)
23  os << as[i] << (i+1 == as.size() ? "]": ", ");
24  return os;
25 }
26 bool operator==(const BType& a, const BType& b)
27 {
28  return a.a == b.a && a.b == b.b && strcmp(a.c, b.c) == 0 && a.ai[3] == b.ai[3] && a.vd[3] == b.vd[3];
29 }
30 
31 std::ostream& operator<<(std::ostream& os, const BType& a)
32 {
33  os << "{ " << a.a << ", " << a.b << ", " << a.c << ", < ";
34  for (unsigned int i = 0; i != 5; ++i)
35  os << a.ai[i] << " ";
36  os <<">, ( ";
37  for (unsigned int i = 0; i != 10; ++i)
38  os << a.vd[i] << " ";
39  os << ") }";
40  return os;
41 }
42 std::ostream& operator<<(std::ostream& os, const BTypes& bs)
43 {
44  os << '[';
45  for (unsigned int i = 0; i != bs.size(); ++i)
46  os << bs[i] << (i+1 == bs.size() ? "]": ", ");
47  return os;
48 }
49 
50 bool operator==(const CType& a, const CType& b)
51 {
52  return a.a == b.a && a.b == b.b && std::equal(a.av.begin(), a.av.end(), b.av.begin()) && std::equal(a.bv.begin(), a.bv.end(), b.bv.begin());
53 }
54 
55 std::ostream& operator<<(std::ostream& os, const CType& a)
56 {
57  os << "{ (" << a.a << ", " << endl <<" " << a.b << endl<< " )"<<endl;
58  os << " <";
59  for (unsigned int i = 0; i != 5; ++i)
60  os << a.av[i] << " ";
61  os <<" >,"<<endl<<" <";
62  for (unsigned int i = 0; i != 10; ++i)
63  os << a.bv[i] << " ";
64  os <<" >"<<endl <<"}";
65  return os;
66 }
67 std::ostream& operator<<(std::ostream& os, const CTypes& cs)
68 {
69  os << '[';
70  for (unsigned int i = 0; i != cs.size(); ++i)
71  os << cs[i] << (i+1 == cs.size() ? "]": ", ");
72  return os;
73 }
double vd[10]
vector< AType > av
std::vector< BType > BTypes
std::vector< AType > ATypes
basic_ostreams & endl(basic_ostreams &s)
Definition: rtstreams.cpp:110
bool operator==(const AType &a, const AType &b)
vector< double > vd
std::vector< CType > CTypes
boost::array< int, 5 > ai
vector< BType > bv
std::ostream & operator<<(std::ostream &os, const AType &a)


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:32