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

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)
void write (tnstream &stream) const
void runTextIO (PropertyContainer &pc)

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!

Member Typedef Documentation

typedef vector<IntRange> Technology::BlockingOtherTechnologies
 

Definition at line 141 of file research.h.


Constructor & Destructor Documentation

Technology::Technology  ) 
 

Definition at line 502 of file research.cpp.

References icon, requireEvent, researchpoints, and techlevel.


Member Function Documentation

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

Definition at line 585 of file research.cpp.

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

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

Definition at line 576 of file research.cpp.

References Research::techResearched().

void Technology::read tnstream stream  )  [virtual]
 

Implements LoadableItemType.

Definition at line 513 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::runTextIO PropertyContainer pc  )  [virtual]
 

Implements LoadableItemType.

Definition at line 553 of file research.cpp.

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

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

Implements LoadableItemType.

Definition at line 538 of file research.cpp.

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


Member Data Documentation

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 143 of file research.h.

Referenced by Research::isBlocked(), read(), runTextIO(), and write().

void* Technology::icon
 

Definition at line 122 of file research.h.

Referenced by Technology().

int Technology::id
 

Definition at line 125 of file research.h.

Referenced by editResearch(), generateTechTree(), Research::read_techs(), researchCheck(), Research::techAvailable(), Research::write(), and TechDependency::writeInvertTreeOutput().

ASCString Technology::infotext
 

Definition at line 123 of file research.h.

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

ASCString Technology::name
 

Definition at line 132 of file research.h.

Referenced by execuseraction(), generateTechLabel(), generateTechTree(), TechWidget::getName(), read(), runTextIO(), ChooseTech::showPrerequisites(), techComp(), TechWidget::TechWidget(), ResearchWindow::update(), write(), and TechDependency::writeTreeOutput().

int Technology::relatedUnitID
 

Definition at line 134 of file research.h.

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

bool Technology::requireEvent
 

Definition at line 136 of file research.h.

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

int Technology::researchpoints
 

Definition at line 130 of file research.h.

Referenced by Research::currentTechAvailableIn(), generateTechLabel(), tresearchinfo::init(), read(), researchCheck(), runTextIO(), Technology(), TechWidget::TechWidget(), and write().

vector<int> Technology::secondaryIDs
 

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

Definition at line 127 of file research.h.

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

TechDependency Technology::techDependency
 

Definition at line 138 of file research.h.

Referenced by eventually_available(), generateTechTree(), Research::isBlocked(), read(), runTextIO(), ChooseTech::showPrerequisites(), Research::techAvailable(), and write().

int Technology::techlevel
 

Definition at line 133 of file research.h.

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


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