CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/CondCore/RegressionTest/src/Primitives.cc

Go to the documentation of this file.
00001 #include "CondCore/RegressionTest/interface/Primitives.h"
00002 Primitives::Primitives(int payloadID) :
00003         testInt(payloadID),
00004         testLongInt(payloadID),
00005         testDouble(payloadID),
00006         testString(),
00007         testEnum(),
00008         testTypedef(payloadID)
00009         
00010 {
00011         std::stringstream st;
00012         st << payloadID;
00013         testString = st.str();
00014 }
00015 Primitives::Primitives() {}
00016 
00017 bool Primitives::operator ==(const Primitives& ref) const
00018 {
00019         if(testInt != ref.testInt)
00020         {
00021                 return false;
00022         } 
00023         if(testLongInt != ref.testLongInt)
00024         {
00025                 return false;
00026         }
00027         if(testDouble != ref.testDouble)
00028         {
00029                 return false;
00030         }
00031         if(testTypedef != ref.testTypedef)
00032         {
00033                 return false;
00034         }
00035         if(testString.compare(ref.testString) != 0)
00036         {
00037                 return false;
00038         }
00039         return true;
00040 }
00041 
00042 bool Primitives::operator !=(const Primitives& ref) const
00043 {
00044         return !operator==(ref);
00045 }