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

Salvage.h

Go to the documentation of this file.
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 
00030 #if !defined(Salvage_h)
00031 #define Salvage_h
00032 
00033 #include "Rules.h"
00034 class Player;
00035 
00036 #include "CargoHolder.h"
00037 
00043 class Salvage : public CargoHolder {
00044 public:
00045         Salvage();
00046         Salvage(const CargoHolder &source);
00047         virtual ~Salvage();
00048         virtual bool ParseNode(const TiXmlNode * node);
00049         virtual TiXmlNode * WriteNode(TiXmlNode * node, const Player * viewer) const;
00050 
00051         bool IsEmpty() const    { return MaxSize == 0; }
00052         virtual long GetCargoCapacity() const   { return MaxSize; }
00053         virtual long GetCloak(const Player *, bool) const       { return 0; }
00054         virtual double GetMaxTachyon() const    { return 0.0; }
00055         virtual long GetScanPen() const                 { return -1; }
00056         virtual long GetScanSpace() const               { return -1; }
00057         virtual void SetCanLoadBy(const Player *)       {}
00058         virtual bool CanLoadBy(const Player *) const    { return true; }        // anyone can load from scrap piles
00059         void Decay();
00060 
00061 private:
00062         Player * mOwner;
00063         long TurnCreated;
00064         long MaxSize;
00065 };
00066 
00067 #endif // !defined(Salvage_h)

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