00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "nel/ai/character/zone.h"
00026
00027 namespace NLAICHARACTER
00028 {
00029 IZone::IZone(const IZone &c):ICharacter(c),_Character((ICharacter *)c._Character->clone()),_Attachment((NLAIAGENT::IBaseGroupType *)c._Attachment->clone())
00030 {
00031 }
00032
00033 IZone::IZone(ICharacter *c):_Character(c),_Attachment(new NLAIAGENT::CGroupType())
00034 {
00035 }
00036
00037 IZone::IZone(const std::string &name):_Character(new CCharacterChild(name)),_Attachment(new NLAIAGENT::CGroupType())
00038 {
00039 }
00040
00041 IZone::~IZone()
00042 {
00043 _Character->release();
00044 _Attachment->release();
00045 }
00046
00047 void IZone::addObject(const NLAIAGENT::IObjectIA *o)
00048 {
00049 _Attachment->push(o);
00050 }
00051
00052 void IZone::removeObject(const NLAIAGENT::IObjectIA *o)
00053 {
00054 _Attachment->erase(o);
00055 }
00056
00057 NLAIAGENT::CIteratorContener IZone::getAttachement() const
00058 {
00059 return _Attachment->getIterator();
00060 }
00061
00062 const IZone *IZone::isInZone(const IZone &) const
00063 {
00064 throw;
00065 }
00066 }