37 lines
524 B
C++
37 lines
524 B
C++
//
|
|
// Created by David Hackbarth on 21.09.26.
|
|
//
|
|
|
|
#include "Entity.h"
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
Entity::Entity() : _name("") //defined
|
|
{
|
|
cout << "Entity constructor called" << endl;
|
|
}
|
|
|
|
Entity::Entity(string name) : _name(name)
|
|
{
|
|
// _name = name;
|
|
|
|
cout << "Entity constructor with name called" << endl;
|
|
}
|
|
|
|
Entity::~Entity()
|
|
{
|
|
cout << "Entity destructor called" << endl;
|
|
}
|
|
|
|
string Entity::toString()
|
|
{
|
|
return "Entity: " + _name;
|
|
}
|
|
|
|
void Entity::setName(string name)
|
|
{
|
|
_name = name;
|
|
}
|