CMS 3D CMS Logo

Public Member Functions | Public Attributes

TestInheritance Class Reference

#include <Inheritances.h>

Inheritance diagram for TestInheritance:
TestData

List of all members.

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

Detailed Description

Definition at line 16 of file Inheritances.h.


Constructor & Destructor Documentation

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.

{}

Member Function Documentation

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;
}

Member Data Documentation

std::vector<std::string> TestInheritance::dataStringVector

Definition at line 19 of file Inheritances.h.

Referenced by TestPayloadClass::DataToFile(), operator==(), and TestInheritance().