* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class BaseSimulator extends BaseFrameworkSystem {
// Schiffsteilinstanz
);
// Konstruktor
- private function __construct ($class) {
+ protected function __construct ($class) {
// Call highest constructor
- parent::constructor($class);
+ parent::__construct($class);
if ((defined('DEBUG_CORE')) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruktor erreicht.<br />\n",
$this->__toString()
));
// Set part description and class name
- $this->setPartDescr("Simulator-Basis-Einheit");
+ $this->setObjectDescription("Simulator-Basis-Einheit");
// Clean up a little, dies sollte ganz zum Schluss erfolgen!
$this->removeResizeFactorArray();
$this->removeCurrShip();
}
- // Public constructor
- public function constructor ($class) {
- // Call real constructor
- $this->__construct($class);
- }
-
- // Magic __isset method
- private function __isset ($var) {
- if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Checking <strong>%s</strong> in class.<br />\n",
- $this->__toString(), $var
- ));
- return isset($this->$var);
- }
-
- // Magic __unset method
- private function __unset($var) {
- if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Removing <strong>%s</strong> from class.<br />\n",
- $this->__toString(), $var
- ));
- unset($this->$var);
- }
-
// Setter-Methode fuer Laenge
public final function setLength ($length) {
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] <strong>%dm</strong> Länge gesetzt.<br />\n",
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Maschinenraum mit Motor <strong>%s</strong> wird fuer das Schiff <strong>%s</strong> konstruiert.<br />\n",
$this->__toString(),
- $this->getCurrPart()->getPartDescr(),
+ $this->getCurrPart()->getObjectDescription(),
$this->currShip->getShipName()
));
// Berechnungen fuer umliegendes Objekt anpassen
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Das Schiffsteil <strong>%s</strong> vom Typ <strong>%s</strong> passt in das Schiff <strong>%s</strong> hinein.<br />\n",
$this->__toString(),
- $this->getCurrPart()->getPartDescr(),
+ $this->getCurrPart()->getObjectDescription(),
$this->getCurrPart()->__toString(),
$this->currShip->getShipName()
));
// Das passt auch, dann Werte setzen und Motor-Instanz merken
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Das Schiffsteil <strong>%s</strong> passt in das Schiff <strong>%s</strong> hinein.<br />\n",
$this->__toString(),
- $this->getPartDescr(),
+ $this->getObjectDescription(),
$this->currShip->getShipName()
));
$this->setWidth($this->newWidth);
// Passt nicht! Also wieder Exception werfen...
throw new StructureShipMismatchException(sprintf("[%s:] Das Schiffsteil <strong>%s</strong> vom Typ <strong>%s</strong> ist zu gross für das Schiff!",
$this->getCurrPart()->__toString(),
- $this->getCurrPart()->getPartDescr(),
+ $this->getCurrPart()->getObjectDescription(),
$this->getCurrPart()->__toString()
), 2);
}
// Debug-Meldung ausgeben
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Schiffsteil <strong>%s</strong> gefunden.<br />\n",
$this->getCurrPart()->realClass,
- $this->getCurrPart()->getPartDescr()
+ $this->getCurrPart()->getObjectDescription()
));
// Schiffsteil-Instanz setzen
// Exception werfen!
throw new StructureShipMismatchException(sprintf("[%s:] Das Schiffsteil <u>%s</u> vom Typ <u>%s</u> passt nicht in das Schiff!",
$this->getCurrPart()->realClass,
- $this->getCurrPart()->getPartDescr(),
+ $this->getCurrPart()->getObjectDescription(),
$this->getCurrPart()->__toString()
), 1);
}
public function extractDimensions ($dim) {
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] extractDimensions erreicht für <strong>%s</strong>.<br />\n",
$this->__toString(),
- $this->getPartDescr()
+ $this->getObjectDescription()
));
// Abmasse setzen