]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/structures/class_BaseStructure.php
(no commit message)
[shipsimu.git] / application / ship-simu / main / structures / class_BaseStructure.php
diff --git a/application/ship-simu/main/structures/class_BaseStructure.php b/application/ship-simu/main/structures/class_BaseStructure.php
new file mode 100644 (file)
index 0000000..3e8d3f0
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+// Konstruktionen allgemein (also Aufbauten/Unterbauten)
+class BaseStructure extends BaseSimulator {
+       // Price of this structure
+       private $price = 0.00;
+
+       // Konstruktor (hier keine Exceptions aendern!)
+       private function __construct ($class) {
+               // Eltern-Konstruktor aufrufen
+               parent::constructor($class);
+
+               // Debug message
+               if (((defined('DEBUG_STRUCTURE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
+                       $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
+                               __CLASS__,
+                               __LINE__
+                       ));
+               }
+
+               // Beschreibung setzen
+               $this->setPartDescr("Schiffsstrukturen");
+
+               // Etwas aufraeumen
+               $this->removeNumberFormaters();
+       }
+
+       // Konstruktor aufrufen
+       public function constructor ($class) {
+               $this->__construct($class);
+       }
+
+       // Setter for price
+       public function setPrice ($price) {
+               $this->price = (float) $price;
+       }
+
+       // Getter for price
+       public function getPrice () {
+               return $this->price;
+       }
+
+       // Remove price
+       public function removePrice () { 
+               unset($this->price);
+       }
+}
+
+// [EOF]
+?>