Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List

Hull.cpp

00001 /*
00002 Copyright 2003 - 2005 Elliott Kleinrock, Dan Neely, Kurt W. Over, Damon Domjan
00003 
00004 This file is part of FreeStars, a free clone of the Stars! game.
00005 
00006 FreeStars is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2 of the License, or
00009 (at your option) any later version.
00010 
00011 FreeStars is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with FreeStars; if not, write to the Free Software
00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 The full GPL Copyright notice should be in the file COPYING.txt
00021 
00022 Contact:
00023 Email Elliott at 9jm0tjj02@sneakemail.com
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         // display settings
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 }

Generated on Mon Aug 8 21:33:43 2005 for Freestars by  doxygen 1.4.2-20050421