Go to the documentation of this file.00001 #include "CondCore/RegressionTest/interface/RegressionTestPayload.h"
00002 #include <sstream>
00003
00004 Data::Data():
00005 m_i(-1),
00006 m_s(""),
00007 m_a(){
00008 }
00009
00010 Data::Data( int seed ):
00011 m_i(seed),
00012 m_s(""),
00013 m_a(){
00014 std::stringstream ss;
00015 ss << "Data_"<<seed;
00016 m_s = ss.str();
00017 for( int i=0;i<seed;i++){
00018 m_a.push_back(i);
00019 }
00020 }
00021
00022 bool Data::operator ==(const Data& rhs) const {
00023 if( m_i != rhs.m_i ) return false;
00024 if( m_s != rhs.m_s ) return false;
00025 if( m_a != rhs.m_a ) return false;
00026 return true;
00027 }
00028 bool Data::operator !=(const Data& rhs) const {
00029 return !operator==( rhs );
00030 }
00031
00032 RegressionTestPayload::RegressionTestPayload():
00033 PrimitivePayload(),
00034 ArrayPayload(),
00035 m_i( -1 ),
00036 m_data0(),
00037 m_data1(){
00038 }
00039
00040 RegressionTestPayload::RegressionTestPayload( int seed ):
00041 PrimitivePayload( seed ) ,
00042 ArrayPayload( seed ),
00043 m_i( seed ),
00044 m_data0( seed ),
00045 m_data1(seed ){
00046 }
00047 bool RegressionTestPayload::operator ==(const RegressionTestPayload& rhs) const {
00048 if( PrimitivePayload::operator!=(rhs) ) return false;
00049 if( ArrayPayload::operator!=(rhs) ) return false;
00050 if( m_i != rhs.m_i ) return false;
00051 if( m_data0 != rhs.m_data0 ) return false;
00052 if( m_data1 != rhs.m_data1 ) return false;
00053 return true;
00054 }
00055
00056 bool RegressionTestPayload::operator !=(const RegressionTestPayload& rhs) const {
00057 return !operator==( rhs );
00058 }