30b6978dfa4e10304931c6b9e5219da918bef0f5
[shipsimu.git] / application / ship-simu / main / structures / extended / decks / class_BaseDeck.php
1 <?php
2 // Decks for cargo
3 class BaseDeck extends BaseDeckStructure {
4         /**
5         * Constructor for cargo decks in general
6         */
7         private function __construct ($class) {
8                 // Call parent constructor
9                 parent::constructor($class);
10
11                 // Debub message
12                 if (((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.<br />\n",
13                         __CLASS__,
14                         __LINE__
15                 ));
16
17                 // Set description
18                 $this->setPartDescr("Deck");
19
20                 // Maybe clean up?
21                 if ($class == __CLASS__) {
22                         $this->removeSystemArray();
23                 }
24         }
25
26         // Ruft nur den privaten Konstruktor auf
27         public function constructor ($class) {
28                 $this->__construct($class);
29         }
30
31         // Ein allgemeines Deck erstellen
32         public static function createBaseDeck () {
33                 // Instanz holen
34                 $deckInstance = new BaseDeck(__CLASS__);
35
36                 // Debug message
37                 if ((defined('DEBUG_DECK')) || (defined('DEBUG_ALL'))) $deckInstance->getDebugInstance()->output(sprintf("[%s:%d] Ein allgemeines Deck wird konstruiert.<br />\n",
38                         __CLASS__,
39                         __LINE__
40                 ));
41
42                 // Unique-ID setzen
43                 $deckInstance->createUniqueID();
44
45                 // Instanz zurueckgeben
46                 return $deckInstance;
47         }
48
49         /**
50          * Stub!
51          */
52         public function saveObjectToDatabase () {
53                 $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
54                         $this->__toString(),
55                         __FUNCTION__
56                 ));
57         }
58 }
59
60 // [EOF]
61 ?>