#include <ArrayPayload.h>
Public Member Functions | |
ArrayPayload () | |
ArrayPayload (int seed) | |
bool | operator!= (const ArrayPayload &rhs) const |
bool | operator== (const ArrayPayload &rhs) const |
Private Attributes | |
int | m_ai0 [4] |
int | m_ai1 [112] |
int | m_ai2 [3][2] |
int | m_ai3 [2][80] |
Param | m_ap0 [4] |
Param | m_ap1 [112] |
std::string | m_as0 [4] |
std::string | m_as1 [112] |
std::bitset< 128 > | m_bitset |
int | m_i |
std::list< int > | m_list |
std::map< unsigned int, unsigned int > | m_map0 |
std::map< std::string, std::string > | m_map1 |
std::map< int, Param > | m_map2 |
std::pair< unsigned int, unsigned int > | m_p0 |
std::pair< int, std::string > | m_p1 |
std::pair< int, Param > | m_p2 |
std::set< std::string > | m_set |
std::vector< int > | m_vec0 |
std::vector< std::string > | m_vec1 |
std::vector< Param > | m_vec2 |
std::vector< Param > | m_vec3 |
Definition at line 17 of file ArrayPayload.h.
ArrayPayload::ArrayPayload | ( | ) |
ArrayPayload::ArrayPayload | ( | int | seed | ) |
Definition at line 53 of file ArrayPayload.cc.
References i, j, m_ai0, m_ai1, m_ai2, m_ai3, m_ap0, m_ap1, m_as0, m_as1, m_bitset, m_list, m_map0, m_map1, m_map2, m_p0, m_p1, m_p2, m_set, m_vec0, m_vec1, m_vec2, and m_vec3.
: m_i( seed + 99 ), m_p0(), m_p1(), m_p2(), m_vec0(), m_vec1(), m_map0(), m_map1(), m_list(), m_set(), m_bitset(), m_vec2(), m_map2(), m_vec3(){ for( size_t i=0;i<4; i++ ){ m_ai0[i]= seed + i; } for( size_t i=0;i<112; i++ ){ m_ai1[i]= seed + i; } for( size_t i=0;i<2; i++ ){ for( size_t j=0;i<3; i++ ){ m_ai2[j][i]= seed + i + j; } } for( size_t i=0;i<80; i++ ){ for( size_t j=0;i<2; i++ ){ m_ai3[j][i]= seed + i + j; } } for( size_t i=0;i<4; i++ ){ std::stringstream ss; ss << (seed + i); m_as0[i]= ss.str(); } for( size_t i=0;i<112; i++ ){ std::stringstream ss; ss << (seed + i); m_as1[i]= ss.str(); } for( int i=0;i<4; i++ ){ m_ap0[i] = Param(i+seed); } for( int i=0;i<112; i++ ){ m_ap1[i] = Param(i+seed); } m_p0.first = seed; m_p0.second = seed*10; m_p1.first = seed; std::stringstream ss; ss << (seed*10); m_p1.second = ss.str(); m_p2.first = seed; m_p2.second = Param( seed ); for( int i=0;i<seed;i++){ m_vec0.push_back(i); std::stringstream ss0; ss0 << "vec1_"<<seed; m_vec1.push_back( ss0.str() ); m_map0.insert(std::make_pair((unsigned int)seed,(unsigned int)seed)); std::stringstream ss1; ss1 << "map1_"<<seed; m_map1.insert(std::make_pair( ss1.str(),ss1.str() ) ); m_list.push_back( seed ); m_set.insert( ss1.str() ); m_vec2.push_back( Param( seed ) ); m_map2.insert( std::make_pair( seed, Param( seed ) ) ); m_vec3.push_back( Param( seed ) ); } size_t i=0; int j = 1; while( j<128 ){ if( seed & j )m_bitset.set(i); j = j << 1; i++; } }
bool ArrayPayload::operator!= | ( | const ArrayPayload & | rhs | ) | const |
Definition at line 187 of file ArrayPayload.cc.
References operator==().
{ return !operator==(rhs); }
bool ArrayPayload::operator== | ( | const ArrayPayload & | rhs | ) | const |
Definition at line 135 of file ArrayPayload.cc.
References gather_cfg::cout, i, j, m_ai0, m_ai1, m_ai2, m_ai3, m_ap0, m_ap1, m_as0, m_as1, m_bitset, m_i, m_list, m_map0, m_map1, m_map2, m_p0, m_p1, m_p2, m_set, m_vec0, m_vec1, m_vec2, m_vec3, and setDefaultBitSet().
Referenced by operator!=().
{ if( m_i != rhs.m_i ) return false; for( int i=0;i<4;i++){ if(m_ai0[i] != rhs.m_ai0[i] ) return false; } for( int i=0;i<112;i++){ if(m_ai1[i] != rhs.m_ai1[i] ) return false; } for( size_t i=0;i<2; i++ ){ for( size_t j=0;i<3; i++ ){ if( m_ai2[j][i] != rhs.m_ai2[j][i] ) return false; } } for( size_t i=0;i<80; i++ ){ for( size_t j=0;i<2; i++ ){ if( m_ai3[j][i] != rhs.m_ai3[j][i] ) return false; } } for( size_t i=0;i<4; i++ ){ if(m_as0[i] != rhs.m_as0[i] ) return false; } for( size_t i=0;i<112; i++ ){ if(m_as1[i] != rhs.m_as1[i] ) return false; } for( int i=0;i<4; i++ ){ if(m_ap0[i] != rhs.m_ap0[i] ) return false; } for( int i=0;i<112; i++ ){ if(m_ap1[i] != rhs.m_ap1[i] ) return false; } if(m_p0 != rhs.m_p0 ) return false; if(m_p1 != rhs.m_p1 ) return false; if(m_p2 != rhs.m_p2 ) return false; if(m_vec0 != rhs.m_vec0 ) return false; if(m_vec1 != rhs.m_vec1 ) return false; if(m_vec2 != rhs.m_vec2 ) return false; if(m_vec3 != rhs.m_vec3 ) return false; if(m_map0 != rhs.m_map0 ) return false; if(m_map1 != rhs.m_map1 ) return false; if(m_map2 != rhs.m_map2 ) return false; if(m_list != rhs.m_list ) return false; if(m_set != rhs.m_set ) return false; std::bitset<128> defValue; setDefaultBitSet( defValue ); if( m_bitset == defValue ){ std::cout <<"WARNING: data member \"m_bitset\" read with the default value."<<std::endl; } else { if( m_bitset != rhs.m_bitset ) return false; } return true; }
int ArrayPayload::m_ai0[4] [private] |
Definition at line 26 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
int ArrayPayload::m_ai1[112] [private] |
Definition at line 27 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
int ArrayPayload::m_ai2[3][2] [private] |
Definition at line 28 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
int ArrayPayload::m_ai3[2][80] [private] |
Definition at line 29 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
Param ArrayPayload::m_ap0[4] [private] |
Definition at line 32 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
Param ArrayPayload::m_ap1[112] [private] |
Definition at line 33 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::string ArrayPayload::m_as0[4] [private] |
Definition at line 30 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::string ArrayPayload::m_as1[112] [private] |
Definition at line 31 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::bitset<128> ArrayPayload::m_bitset [private] |
Definition at line 44 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
int ArrayPayload::m_i [private] |
Reimplemented in RegressionTestPayload.
Definition at line 24 of file ArrayPayload.h.
Referenced by operator==().
std::list<int> ArrayPayload::m_list [private] |
Definition at line 42 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::map<unsigned int,unsigned int> ArrayPayload::m_map0 [private] |
Definition at line 40 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::map<std::string,std::string> ArrayPayload::m_map1 [private] |
Definition at line 41 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::map<int,Param> ArrayPayload::m_map2 [private] |
Definition at line 46 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::pair<unsigned int,unsigned int> ArrayPayload::m_p0 [private] |
Definition at line 35 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::pair<int,std::string> ArrayPayload::m_p1 [private] |
Definition at line 36 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::pair<int,Param> ArrayPayload::m_p2 [private] |
Definition at line 37 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::set<std::string> ArrayPayload::m_set [private] |
Definition at line 43 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::vector<int> ArrayPayload::m_vec0 [private] |
Definition at line 38 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::vector<std::string> ArrayPayload::m_vec1 [private] |
Definition at line 39 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::vector<Param> ArrayPayload::m_vec2 [private] |
Definition at line 45 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().
std::vector<Param> ArrayPayload::m_vec3 [private] |
Definition at line 48 of file ArrayPayload.h.
Referenced by ArrayPayload(), and operator==().