CMS 3D CMS Logo

Public Member Functions | Public Attributes

TestData Class Reference

#include <Inheritances.h>

Inheritance diagram for TestData:
TestInheritance

List of all members.

Public Member Functions

bool operator!= (const TestData &ref) const
bool operator== (const TestData &ref) const
 TestData (int payloadID)
 TestData ()

Public Attributes

int commonInt
std::vector< std::vector< int > > commonIntVector2d

Detailed Description

Definition at line 4 of file Inheritances.h.


Constructor & Destructor Documentation

TestData::TestData ( int  payloadID)

Definition at line 3 of file Inheritances.cc.

References commonIntVector2d, i, j, and VSIZE.

                                : commonInt(payloadID), commonIntVector2d() 
{
        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); 
                }
        }
}
TestData::TestData ( )

Definition at line 14 of file Inheritances.cc.

{}

Member Function Documentation

bool TestData::operator!= ( const TestData ref) const

Definition at line 32 of file Inheritances.cc.

References operator==().

{
        return !operator==(ref);
}
bool TestData::operator== ( const TestData ref) const

Definition at line 15 of file Inheritances.cc.

References commonInt, commonIntVector2d, gather_cfg::cout, i, j, and VSIZE.

Referenced by operator!=().

{
        if(commonInt != ref.commonInt)
        {
                std::cout<<commonInt<<std::endl;
                return false;
        } 
        for(int i=0; i<VSIZE; i++)
                for(int j=0; j<VSIZE; j++)
                {
                        if(commonIntVector2d[i] != ref.commonIntVector2d[i])
                        {       
                                return false;
                        }
                }
        return true;
}

Member Data Documentation

std::vector<std::vector<int> > TestData::commonIntVector2d