C_CPP/11_PUTT/CopyOnWrite/LargeCowMatrix.h

27 lines
626 B
C++

#ifndef TEST_BUILD_LARGECOWMATRIX_H
#define TEST_BUILD_LARGECOWMATRIX_H
class LargeCowMatrix {
int value;
int referenceCounter;
static int instanceCounter;
public:
LargeCowMatrix();
explicit LargeCowMatrix(int value);
LargeCowMatrix(const LargeCowMatrix&);
~LargeCowMatrix();
explicit operator int();
LargeCowMatrix operator+(const LargeCowMatrix & other);
LargeCowMatrix& operator ++(int);
bool operator==(const LargeCowMatrix& other);
bool operator!=(const LargeCowMatrix& other);
static bool instanceCountExceeds(int max);
};
#endif //TEST_BUILD_LARGECOWMATRIX_H