Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

fleet.h

00001 // $Id: fleet_8h-source.html,v 1.2 2002/06/20 17:09:51 mkrohn5 Exp $
00002 
00003 // Fleet Header File
00004 // Written by: Marco Krohn
00005 
00006 // Copyright (C) 2001 - , Marco Krohn, <marco.krohn@gmx.de>
00007 //
00008 // This program is free software; you can redistribute it and/or modify
00009 // it under the terms of the GNU General Public License as published by
00010 // the Free Software Foundation; either version 1, or (at your option)
00011 // any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 
00018 #ifndef __FLEET_INCLUDED
00019 #define __FLEET_INCLUDED
00020 
00021 #include <deque>
00022 
00023 #include "common/osval.h"
00024 #include "gamelogic/stobj.h"
00025 
00026 class TDataPackageList;
00027 class TSubFleet;
00028 
00029 
00030 
00031 
00032 
00033 //----------------------------------------  class TFleet  ----------------------------------------
00034 
00047 class TFleet : public TStellarObject
00048 {
00049   public:
00055     TFleet( const TPoint& Pos=0 );
00059     virtual ~TFleet();
00060 
00067     virtual void Add( TSubFleet* pSubFleet );
00071     virtual bool canPerformAction(const TAction& action);
00075     virtual bool canBeObjectInAction(const TAction& action);
00081     TOSVal getNumberOfShips() const;
00085     double getSpeed() const;
00090     virtual int2 getType() const;
00094     virtual const string& getTypeName() const;
00103     virtual bool load( TDataPackageList* in );
00111     virtual bool Remove( TSubFleet* pSubFleet );
00120     virtual bool save( TDataPackageList* out ) const;
00128     void setSpeed( double speed );
00139     virtual bool TransferSubFleet( TSubFleet* pSubFleet, TFleet* pNewFleet );
00140 
00141   protected:
00143     double fSpeed;
00145     TPList<TSubFleet> fSubFleets;
00146 };
00147 
00148 
00149 
00150 
00151 
00152 #endif        // __FLEET_INCLUDED

Generated on Thu Jun 20 18:13:15 2002 for Stellar Legacy by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001