class_BaseDeckStructure.php

Go to the documentation of this file.
00001 <?php
00024 class BaseDeckStructure extends BaseStructure {
00025         // Anzahl Decks
00026         private $numDecks = 0;
00027 
00028         // Konstruktor
00029         protected function __construct ($className) {
00030                 // Call parent constructor
00031                 parent::__construct($className);
00032         }
00033 
00034         // Deckstruktur dem Schiff hinzufuegen
00035         public function addShipPartToShip (ConstructableShip $shipInstance, ConstructableShipPart $deckInstance) {
00036                 // Eltern-Methode aufrufen
00037                 parent::addShipPartToShip($shipInstance, $deckInstance);
00038 
00039                 // Andere Daten uebertragen und von der Quelle loeschen
00040                 $this->setNumDecks($deckInstance->getNumDecks());
00041                 $deckInstance->removeNumDecks();
00042         }
00043 
00044         // Deckanzahl entfernen
00045         public final function removeNumDecks() {
00046                 unset($this->numDecks);
00047         }
00048 
00049         // Setter-Methode fuer Anzahl Decks
00050         public final function setNumDecks($numDecks) {
00051                 $this->numDecks = (int) $numDecks;
00052         }
00053 
00054         // Getter-Methode fuer Anzahl Decks
00055         public final function getNumDecks() {
00056                 return $this->numDecks;
00057         }
00058 }
00059 
00060 // [EOF]
00061 ?>

Generated on Mon Dec 8 01:06:44 2008 for Ship-Simulator by  doxygen 1.5.6