#include <Inheritances.h>
Public Member Functions | |
bool | operator!= (const TestInheritance &ref) const |
bool | operator== (const TestInheritance &ref) const |
TestInheritance (int payloadID) | |
TestInheritance () | |
Public Attributes | |
std::vector< std::string > | dataStringVector |
Definition at line 16 of file Inheritances.h.
TestInheritance::TestInheritance | ( | int | payloadID | ) |
Definition at line 39 of file Inheritances.cc.
References TestData::commonInt, TestData::commonIntVector2d, dataStringVector, i, j, and VSIZE.
: TestData(), dataStringVector() { commonInt = payloadID; for(int i =0; i<VSIZE; i++) { commonIntVector2d.push_back ( std::vector<int>() ); for(int j=0; j<VSIZE; j++) { commonIntVector2d[i].push_back(payloadID); } } for(int i=0; i<VSIZE; i++) { std::stringstream st; st << payloadID; dataStringVector.push_back(st.str()); } }
TestInheritance::TestInheritance | ( | ) |
Definition at line 59 of file Inheritances.cc.
{}
bool TestInheritance::operator!= | ( | const TestInheritance & | ref | ) | const |
Definition at line 83 of file Inheritances.cc.
References operator==().
{ return !operator==(ref); }
bool TestInheritance::operator== | ( | const TestInheritance & | ref | ) | const |
Definition at line 60 of file Inheritances.cc.
References TestData::commonInt, TestData::commonIntVector2d, compare_using_db::compare, dataStringVector, i, j, and VSIZE.
Referenced by operator!=().
{ if(commonInt != ref.commonInt) { return false; } for(int i=0; i<VSIZE; i++) for(int j=0; j<VSIZE; j++) { if(commonIntVector2d[i][j] != ref.commonIntVector2d[i][j]) { return false; } } for(int i=0; i<VSIZE; i++) { if(dataStringVector[i].compare(ref.dataStringVector[i]) != 0) { return false; } } return true; }
std::vector<std::string> TestInheritance::dataStringVector |
Definition at line 19 of file Inheritances.h.
Referenced by TestPayloadClass::DataToFile(), operator==(), and TestInheritance().