Component.cpp

Go to the documentation of this file.
00001 #include "Component.hpp"
00002 #include "Composite.hpp"
00003 
00004 namespace se_core {
00005     Component
00006     ::Component(int type, Composite* owner, const ComponentFactory* factory)
00007             : type_(type), owner_(owner), factory_(factory) {
00008         owner_->addComponent(*this);
00009     }
00010 
00011 
00012     Component
00013     ::~Component() {
00014         //LogWarning(owner_->name() << "(" << type() << ")");
00015         owner_->removeComponent(*this);
00016         owner_ = 0;
00017     }
00018 
00019 
00020     const char* Component
00021     ::name() const {
00022         return owner()->name();
00023     }
00024 
00025     bool Component
00026     ::isActive() {
00027         return owner_->isActive();
00028     }
00029 
00030     bool Component
00031     ::isDead() const {
00032         return owner_->isDead();
00033     }
00034 
00035 
00036     void Component
00037     ::zoneChanged(int type, Composite* newArea, Composite* oldArea) {
00038     }
00039 
00040 
00041     void Component
00042 	::init() {
00043     }
00044 
00045 
00046     void Component
00047 	::cleanup() {
00048     }
00049 
00050 }

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:10 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo