00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "FSServer.h"
00027
00028 #include "Hull.h"
00029
00030 #ifdef _DEBUG
00031 #define new DEBUG_NEW
00032 #endif
00033
00034 Hull::Hull() : Component()
00035 {
00036
00037 mCargoLeft = 0;
00038 mCargoTop = 0;
00039 mCargoWidth = 0;
00040 mCargoHeight = 0;
00041 }
00042
00043 Hull::~Hull()
00044 {
00045 Slots.clear();
00046 }
00047
00048 bool Hull::LoadSlot(const TiXmlNode * node)
00049 {
00050 deque<Slot>::iterator iter;
00051 iter = Slots.insert(Slots.end(), Slot(node, Slots.size()));
00052 if (iter->IsAllowed(~CT_NONE) && iter->GetCount() > 0)
00053 return true;
00054 else {
00055 Slots.erase(iter);
00056 return false;
00057 }
00058 }
00059
00060 bool Hull::CheckSlots()
00061 {
00062 deque<Slot>::const_iterator iter;
00063 const Slot * temp;
00064
00065 for (iter = Slots.begin(); iter != Slots.end(); ++iter) {
00066 temp = &*iter;
00067 }
00068
00069 return true;
00070 }