Exemple #1
0
Unit::Unit(Unit const &src)
{
	*this = src;
	_index = ++Unit::index;
	print_created();
}
Exemple #2
0
Unit::Unit(void)
	: _index(++Unit::index), _type("Unit"), _x(0), _y(0), _damage(0), _hp(0), _maxHp(0), _die(false)
{
	print_created();
}
Exemple #3
0
Unit::Unit(std::string const &type, int x, int y, int damage, int hp, int maxHp)
	: _index(++Unit::index), _type(type), _x(x), _y(y), _damage(damage), _hp(hp), _maxHp(maxHp), _die(false)
{
	print_created();
}
Exemple #4
0
 MyObject3(int value) : value(value) {
     print_created(this, toString());
 }
Exemple #5
0
 MyObject4(int value) : value{value} {
     print_created(this);
 }
Exemple #6
0
 Matrix(size_t rows, size_t cols) : m_rows(rows), m_cols(cols) {
     print_created(this, std::to_string(m_rows) + "x" + std::to_string(m_cols) + " matrix");
     m_data = new float[rows*cols];
     memset(m_data, 0, sizeof(float) * rows * cols);
 }
Exemple #7
0
 B() { print_created(this); }
 TypeForHolderWithAddressOf() { print_created(this); }
 TypeForMoveOnlyHolderWithAddressOf(int value) : value{value} { print_created(this); }
 MyObject4b(int i) : MyObject4a(i) { print_created(this); }
 MyObject4a(int i) {
     value = i;
     print_created(this);
 };
 ReturnTester() { print_created(this); }
Exemple #13
0
	/*
		@brief: xxx
	*/	
	static NoConstructor *new_instance() {
		auto *ptr = new NoConstructor();
		print_created(ptr, "via new_instance");
		return ptr;
	}
 ExampleMandA(int value) : value(value) { print_created(this, value); }