Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Research Class Reference

#include <research.h>

List of all members.

Public Member Functions

ASCString listTriggeredTechAdapter () const
bool techResearched (int id) const
bool vehicletypeavailable (const Vehicletype *fztyp) const
void read (tnstream &stream)
void write (tnstream &stream)
void read_struct (tnstream &stream, bool merge=false)
void read_techs (tnstream &stream, bool merge=false)
void evalTechAdapter ()
bool techAdapterAvail (const ASCString &ta) const
void settechlevel (int techlevel)
void chainToMap (GameMap *_map, int _player)
void addtechnology ()
 Move the technology that is currently being reseached to the list of discovered technologies.
void addanytechnology (const Technology *tech)
ResearchAvailabilityStatus techAvailable (const Technology *tech) const
bool isBlocked (const Technology *tech) const
void cancel ()
 cancels the research on the current technology, losing all research points
int getResearchPerTurn () const
int currentTechAvailableIn () const
void setMultiplier (int m)
int getMultiplier ()
 Research ()
void clear ()
 ~Research ()

Public Attributes

vector< int > developedTechnologies
int progress
const Technologyactivetechnology
 the technology that is currently being researched
const Technologygoal
 the technology that is defined as long-term goal
bool techsAvail
 is used by the chooseTechnology dialog: the first time no techs are available this variable is still true, so the dialog shows "now techs avail".


Constructor & Destructor Documentation

Research::Research  ) 
 

Definition at line 612 of file research.cpp.

References activetechnology, progress, and techsAvail.

Research::~Research  ) 
 

Definition at line 938 of file research.cpp.


Member Function Documentation

void Research::addanytechnology const Technology tech  ) 
 

Definition at line 843 of file research.cpp.

References developedTechnologies, and evalTechAdapter().

Referenced by addtechnology(), trunreplay::execnextreplaymove(), and settechlevel().

void Research::addtechnology  ) 
 

Move the technology that is currently being reseached to the list of discovered technologies.

Definition at line 853 of file research.cpp.

References activetechnology, and addanytechnology().

Referenced by researchCheck().

void Research::cancel  ) 
 

cancels the research on the current technology, losing all research points

Definition at line 876 of file research.cpp.

References activetechnology, goal, and progress.

Referenced by trunreplay::execnextreplaymove(), and execuseraction().

void Research::chainToMap GameMap _map,
int  _player
[inline]
 

Definition at line 204 of file research.h.

Referenced by GameMap::GameMap().

void Research::clear  ) 
 

Definition at line 749 of file research.cpp.

References activetechnology, developedTechnologies, goal, and progress.

Referenced by Player::resetResearch().

int Research::currentTechAvailableIn  )  const
 

Definition at line 925 of file research.cpp.

References activetechnology, getResearchPerTurn(), progress, and Technology::researchpoints.

Referenced by ResearchWindow::update().

void Research::evalTechAdapter  ) 
 

Definition at line 776 of file research.cpp.

References techAdapterContainer.

Referenced by addanytechnology(), read(), and settechlevel().

int Research::getMultiplier  )  [inline]
 

Definition at line 229 of file research.h.

Referenced by doresearch(), and ResearchWindow::update().

int Research::getResearchPerTurn  )  const
 

Definition at line 913 of file research.cpp.

Referenced by currentTechAvailableIn(), tresearchinfo::init(), and ResearchWindow::update().

bool Research::isBlocked const Technology tech  )  const
 

Definition at line 812 of file research.cpp.

References TechDependency::available(), Technology::blockingOtherTechnologies, developedTechnologies, Technology::techDependency, and technologyRepository.

Referenced by Technology::eventually_available(), and techAvailable().

ASCString Research::listTriggeredTechAdapter  )  const
 

Definition at line 784 of file research.cpp.

References techAdapterContainer.

Referenced by researchinfo().

void Research::read tnstream stream  ) 
 

Definition at line 623 of file research.cpp.

References evalTechAdapter(), read_struct(), and read_techs().

Referenced by GameMap::read().

void Research::read_struct tnstream stream,
bool  merge = false
 

Definition at line 636 of file research.cpp.

References activetechnology, developedTechnologies, tnstream::getLocation(), goal, progress, tnstream::readChar(), readClassContainer(), tnstream::readInt(), tnstream::readWord(), technologyRepository, and techsAvail.

Referenced by read(), and GameMap::read().

void Research::read_techs tnstream stream,
bool  merge = false
 

Definition at line 719 of file research.cpp.

References activetechnology, developedTechnologies, Technology::id, and technologyRepository.

Referenced by tsavegameloaders::loadgame(), tnetworkloaders::loadnwgame(), and read().

void Research::setMultiplier int  m  )  [inline]
 

Definition at line 228 of file research.h.

Referenced by GameMap::startGame().

void Research::settechlevel int  techlevel  ) 
 

Definition at line 861 of file research.cpp.

References addanytechnology(), evalTechAdapter(), technologyRepository, and techResearched().

Referenced by tchoosetechlevel::run().

bool Research::techAdapterAvail const ASCString ta  )  const
 

Definition at line 768 of file research.cpp.

Referenced by TechAdapterDependency::available().

ResearchAvailabilityStatus Research::techAvailable const Technology tech  )  const
 

Definition at line 828 of file research.cpp.

References Available, TechDependency::available(), Technology::id, isBlocked(), NeverAvailable, Researched, Technology::techDependency, techResearched(), and UnavailableNow.

Referenced by anyTechAvailable(), and TechnologySelectionItemFactory::restart().

bool Research::techResearched int  id  )  const
 

Definition at line 759 of file research.cpp.

References developedTechnologies.

Referenced by TechDependency::available(), Technology::eventually_available(), settechlevel(), and techAvailable().

bool Research::vehicletypeavailable const Vehicletype fztyp  )  const
 

Definition at line 887 of file research.cpp.

References TechAdapterDependency::available(), and ContainerBaseType::techDependency.

Referenced by NewVehicleTypeDetection::evalbuffer(), and NewVehicleTypeDetection::NewVehicleTypeDetection().

void Research::write tnstream stream  ) 
 

Definition at line 700 of file research.cpp.

References activetechnology, developedTechnologies, goal, Technology::id, progress, techsAvail, and writeClassContainer().

Referenced by GameMap::write().


Member Data Documentation

const Technology* Research::activetechnology
 

the technology that is currently being researched

Definition at line 186 of file research.h.

Referenced by addtechnology(), cancel(), clear(), currentTechAvailableIn(), execuseraction(), tresearchinfo::init(), read_struct(), read_techs(), Research(), researchCheck(), tchoosetechnology::run(), ResearchWindow::update(), and write().

vector<int> Research::developedTechnologies
 

Definition at line 178 of file research.h.

Referenced by addanytechnology(), clear(), compareMapResources(), editResearch(), execuseraction(), isBlocked(), read_struct(), read_techs(), researchCheck(), researchinfo(), techResearched(), and write().

const Technology* Research::goal
 

the technology that is defined as long-term goal

Definition at line 189 of file research.h.

Referenced by cancel(), clear(), read_struct(), and write().

int Research::progress
 

Definition at line 184 of file research.h.

Referenced by cancel(), ChooseTech::ChooseTech(), clear(), compareMapResources(), currentTechAvailableIn(), doresearch(), editResearchPoints(), trunreplay::execnextreplaymove(), tresearchinfo::init(), read_struct(), Research(), researchCheck(), and write().

bool Research::techsAvail
 

is used by the chooseTechnology dialog: the first time no techs are available this variable is still true, so the dialog shows "now techs avail".

THen it sets techAvail to false, preventing the same message at the beginning of each turn

Definition at line 218 of file research.h.

Referenced by read_struct(), Research(), tchoosetechnology::run(), and write().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:20:17 2008 for Advanced Strategic Command by  doxygen 1.4.2