ATLAS Offline Software
Loading...
Searching...
No Matches
TestClass12 Class Reference

#include <TestClass.h>

Inheritance diagram for TestClass12:
Collaboration diagram for TestClass12:

Public Member Functions

 TestClass12 ()
 TestClass12 (const int i, const int s)
 ~TestClass12 ()
void print () const
std::string getKey () const
bool isEqual (const TestClass *otherobj) const

Public Attributes

int size
int * p
std::string key

Detailed Description

Definition at line 68 of file TestClass.h.

Constructor & Destructor Documentation

◆ TestClass12() [1/2]

TestClass12::TestClass12 ( )
inline

Definition at line 74 of file TestClass.h.

74 {
75 p=NULL;}

◆ TestClass12() [2/2]

TestClass12::TestClass12 ( const int i,
const int s )
inline

Definition at line 77 of file TestClass.h.

77 {
78 size=s;
79 p=new int[size];
80
81 for(int j=0;j<size;j++){
82 p[j]=10+i*j;
83 }
84 }

◆ ~TestClass12()

TestClass12::~TestClass12 ( )
inline

Definition at line 86 of file TestClass.h.

86 {
87 delete p;
88 }

Member Function Documentation

◆ getKey()

std::string TestClass12::getKey ( ) const
inlinevirtual

Reimplemented from TestClass.

Definition at line 101 of file TestClass.h.

101 {
102 return("TestClass12");
103 }

◆ isEqual()

bool TestClass12::isEqual ( const TestClass * otherobj) const
inlinevirtual

Implements TestClass.

Definition at line 105 of file TestClass.h.

105 {
106 TestClass12 *tc = (TestClass12 *)otherobj;
107 for(int j=0; j<size; j++){
108 if(p[j]==tc->p[j]){
109
110
111 }
112 else{
113 return false;
114 }
115
116 }
117 return true;
118 }
static Double_t tc

◆ print()

void TestClass12::print ( ) const
inlinevirtual

Implements TestClass.

Definition at line 90 of file TestClass.h.

90 {
91 std::cout << "Output::TC12 class of dynamic array of integers"<<std::endl;
92 for(int j=0; j<size; j++) {
93
94 std::cout<< p[j]<< "\t";
95
96 }
97 std::cout << std::endl;
98 }

Member Data Documentation

◆ key

std::string TestClass::key
inherited

Definition at line 19 of file TestClass.h.

◆ p

int* TestClass12::p

Definition at line 71 of file TestClass.h.

◆ size

int TestClass12::size

Definition at line 70 of file TestClass.h.


The documentation for this class was generated from the following file: