3 // Die abstrakte Antrieb-Klasse
4 class BaseDrive extends BaseSimulator {
8 private $horsePower = 0;
13 private function __construct ($class) {
14 // Call parent constructor
15 parent::constructor($class);
18 if (((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
19 $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
26 $this->setPartDescr("Namenloser Antrieb");
29 $this->removeNumberFormaters();
30 $this->removePartInstance();
34 * Calls the private constructor
36 * @param $class The class' name
39 public function constructor ($class) {
40 $this->__construct($class);
43 // Setter-Methode fuert PS-Zahl
44 public final function setHorsePower ($hp) {
45 if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Antriebsleistung wird auf <strong>%d</strong> PS gesetzt.<br />\n",
50 $this->horsePower = (int) $hp;
53 // Setter-Methode fuer Nockenanzahl
54 public final function setNumCams ($cams) {
55 if ((defined('DEBUG_DRIVE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Nockenanzahl wird auf <strong>%d</strong> Nocken gesetzt.<br />\n",
60 $this->numCams = (int) $cams;
64 public final function setPrice ($price) {
65 $this->price = (float) $price;
69 public final function getPrice () {
73 public function removePrice () {