Advanced Strategic Command
researchexecution.h
Go to the documentation of this file.
1 /*
2  This file is part of Advanced Strategic Command; http://www.asc-hq.de
3  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; see the file COPYING. If not, write to the
17  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  Boston, MA 02111-1307 USA
19 */
20 
21 #ifndef researchExecutionH
22 #define researchExecutionH
23 
24 class Vehicle;
25 class Player;
26 
27 class VehicleType;
28 class BuildingType;
29 
31  public:
32  class Gadgets {
33  public:
34  std::list<const VehicleType*> units;
35  std::list<const BuildingType*> buildings;
36  };
37 
38  virtual void showTechnology( const Technology* tech, const Gadgets& newGadgetsAvailable ) = 0;
39  virtual ~TechnologyPresenter() {};
40 };
41 
43 extern void setResearchPresenter( TechnologyPresenter* presenter );
44 
46  TechnologyPresenter* presenter;
47  public:
50 };
51 
52 
54 extern void dissectvehicle ( Vehicle* eht );
55 
68 extern void runResearch( Player& player, vector<const Technology*>* newTechs, vector<ASCString>* newTechAdapter );
69 
71 extern void checkForNewResearch( Player& player );
72 
73 
74 #endif
virtual ~TechnologyPresenter()
std::list< const BuildingType * > buildings
void runResearch(Player &player, vector< const Technology * > *newTechs, vector< ASCString > *newTechAdapter)
progresses in the current research, automatically chosing technologies towards the research goal...
virtual void showTechnology(const Technology *tech, const Gadgets &newGadgetsAvailable)=0
The class describing properties that are common to all vehicles of a certain kind.
Definition: vehicletype.h:177
std::list< const VehicleType * > units
The class describing properties that are common to all buildings of a certain kind.
Definition: buildingtype.h:35
void dissectvehicle(Vehicle *eht)
dissects a vehicle; if you haven't researched this vehicle type you will get some research points for...
void setResearchPresenter(TechnologyPresenter *presenter)
registers the class that will present newly researched technologies to the user
void checkForNewResearch(Player &player)
Let's the user select new technology for research if the current research projects are finished...
the different players in ASC. There may be 8 players (0..7) and neutral units (8) ...
Definition: player.h:99