Technology Class Reference

#include <research.h>

Inheritance diagram for Technology:

Inheritance graph
[legend]
List of all members.

Public Types

typedef vector< IntRangeBlockingOtherTechnologies

Public Member Functions

 Technology ()
bool eventually_available (const Research &res, list< const Technology * > *dependencies) const
bool eventually_available (const Research &res, list< const Technology * > *dependencies, list< int > &stack) const
void read (tnstream &stream)
 read the binary representation of this item from the given stream
void write (tnstream &stream) const
 write the binary representation of this item to the given stream
void runTextIO (PropertyContainer &pc)
 registers the properties of this item for loading/writing into asctxt files

Public Attributes

void * icon
ASCString infotext
int id
vector< int > secondaryIDs
 when loading a file and these IDs are encountered, this object will be used.
int researchpoints
ASCString name
int techlevel
int relatedUnitID
bool requireEvent
TechDependency techDependency
BlockingOtherTechnologies blockingOtherTechnologies
 if this Technology has been researched, it will not be possible to research the technologies given here. Only available for root technologies!

Detailed Description

Definition at line 123 of file research.h.


Member Typedef Documentation

typedef vector<IntRange> Technology::BlockingOtherTechnologies

Definition at line 146 of file research.h.


Constructor & Destructor Documentation

Technology::Technology (  ) 

Definition at line 500 of file research.cpp.

References icon, requireEvent, researchpoints, and techlevel.


Member Function Documentation

bool Technology::eventually_available ( const Research res,
list< const Technology * > *  dependencies 
) const

Definition at line 574 of file research.cpp.

References Research::techResearched().

Referenced by getNextTechnologyTowardsGoal(), and DirectResearchCommand::go().

bool Technology::eventually_available ( const Research res,
list< const Technology * > *  dependencies,
list< int > &  stack 
) const

Definition at line 583 of file research.cpp.

References TechDependency::eventually_available(), Research::isBlocked(), techDependency, and Research::techResearched().

void Technology::read ( tnstream stream  )  [virtual]

read the binary representation of this item from the given stream

Implements LoadableItemType.

Definition at line 511 of file research.cpp.

References blockingOtherTechnologies, tnstream::getDeviceName(), infotext, name, TechDependency::read(), readClassContainer(), tnstream::readInt(), tnstream::readString(), relatedUnitID, requireEvent, researchpoints, secondaryIDs, techDependency, and techlevel.

void Technology::write ( tnstream stream  )  const [virtual]

write the binary representation of this item to the given stream

Implements LoadableItemType.

Definition at line 536 of file research.cpp.

References blockingOtherTechnologies, infotext, name, relatedUnitID, requireEvent, researchpoints, secondaryIDs, techDependency, techlevel, TechDependency::write(), writeClassContainer(), tnstream::writeInt(), and tnstream::writeString().

void Technology::runTextIO ( PropertyContainer pc  )  [virtual]

registers the properties of this item for loading/writing into asctxt files

Implements LoadableItemType.

Definition at line 551 of file research.cpp.

References PropertyContainer::addBool(), PropertyContainer::addInteger(), PropertyContainer::addIntegerArray(), PropertyContainer::addIntRangeArray(), PropertyContainer::addString(), blockingOtherTechnologies, PropertyContainer::find(), infotext, PropertyContainer::isReading(), name, relatedUnitID, requireEvent, researchpoints, TechDependency::runTextIO(), secondaryIDs, techDependency, and techlevel.


Member Data Documentation

void* Technology::icon

Definition at line 127 of file research.h.

Referenced by Technology().

ASCString Technology::infotext

Definition at line 128 of file research.h.

Referenced by read(), runTextIO(), and write().

int Technology::id

Definition at line 130 of file research.h.

Referenced by Research::addanytechnology(), generateTechName(), getNextTechnologyTowardsGoal(), CancelResearchCommand::go(), Research::isBlocked(), CancelResearchCommand::preCheck(), Research::read_techs(), runResearch(), Research::settechlevel(), DirectResearchCommand::setTechnology(), TechDependency::showDebug(), Research::techAvailable(), Research::write(), and TechDependency::writeInvertTreeOutput().

vector<int> Technology::secondaryIDs

when loading a file and these IDs are encountered, this object will be used.

Definition at line 132 of file research.h.

Referenced by read(), runTextIO(), and write().

int Technology::researchpoints

Definition at line 135 of file research.h.

Referenced by Research::currentTechAvailableIn(), trunreplay::execnextreplaymove(), executeUserAction(), generateTechLabel(), tresearchinfo::init(), read(), runResearch(), runTextIO(), Technology(), TechWidget::TechWidget(), and write().

ASCString Technology::name

Definition at line 137 of file research.h.

Referenced by chooseTechnologyIfAvail(), executeUserAction(), TechDependency::findInheritanceLevel(), generateTechLabel(), generateTechName(), generateTechTree(), TechWidget::getName(), tresearchinfo::init(), printTech(), read(), runTextIO(), TechDependency::showDebug(), ChooseTech::showPrerequisites(), techComp(), TechWidget::TechWidget(), ResearchWindow::update(), write(), and TechDependency::writeTreeOutput().

int Technology::techlevel

Definition at line 138 of file research.h.

Referenced by read(), runTextIO(), Research::settechlevel(), techComp(), Technology(), and write().

int Technology::relatedUnitID

Definition at line 139 of file research.h.

Referenced by TechWidget::display(), read(), runTextIO(), techComp(), TechWidget::TechWidget(), and write().

bool Technology::requireEvent

Definition at line 141 of file research.h.

Referenced by read(), runTextIO(), Technology(), and write().

TechDependency Technology::techDependency

Definition at line 143 of file research.h.

Referenced by eventually_available(), TechDependency::findInheritanceLevel(), generateTechTree(), DirectResearchCommand::go(), read(), runTextIO(), ChooseTech::showPrerequisites(), Research::techAvailable(), write(), and TechDependency::writeInvertTreeOutput().

BlockingOtherTechnologies Technology::blockingOtherTechnologies

if this Technology has been researched, it will not be possible to research the technologies given here. Only available for root technologies!

Definition at line 148 of file research.h.

Referenced by read(), runTextIO(), and write().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:45 2012 for Advanced Strategic Command by  doxygen 1.5.1