#include <BattleUnitData.h>
Inheritance diagram for BattleUnitData:


Public Methods | |
| void | initData (istream &in) |
| Initialzes the data from a stream. | |
| const Vec3D & | lightTankSize () const |
| individual unit size | |
| const Vec3D & | lightTankTurretSize () const |
| const Vec3D & | heavyTankSize () const |
| const Vec3D & | heavyTankTurretSize () const |
| const Vec3D & | launcherSize () const |
| const Vec3D & | artillerySize () const |
| const Vec3D & | artilleryTurretSize () const |
| const Vec3D & | jetSize () const |
| const vector< int > & | numCols () const |
| battle group size. all vectors have size of 5 | |
| const vector< int > & | numRows () const |
| const vector< Vec3D > & | tightFormationSize () const |
| const vector< FLOAT > & | turnRate () const |
| mobility. all vectors have size of 5 | |
| const vector< FLOAT > & | fullSpeed () const |
| const vector< FLOAT > & | halfSpeed () const |
| const vector< FLOAT > & | BGTurnRate () const |
| const vector< FLOAT > & | BGFullSpeed () const |
| const vector< FLOAT > & | BGHalfSpeed () const |
| const vector< int > & | firingDelay () const |
| offensive capabilities. all vectors have size of 5 | |
| const vector< int > & | baseDamage () const |
| const vector< FLOAT > & | firingRange () const |
| const vector< FLOAT > & | firingArc () const |
| const vector< int > & | armor () const |
| armor. all vectors have size of 5 | |
| const int | lightTankHitFlareTime () const |
| particle system?? | |
| void | shutdown () |
| release resources | |
Static Public Methods | |
| BattleUnitData & | getObj () |
Static Public Attributes | |
| const string | TOK_BEGIN_DATA = "BEGIN BATTLE UNIT DATA" |
| Tokens that delimit the data in the data file. | |
| const string | TOK_END_DATA = "END BATTLE UNIT DATA" |
Static Protected Methods | |
| void | releaseObj () |
| should only be called by the class that inherits the Singleton functionality after the subclasses releases all its necessary resources | |
Private Attributes | |
| Vec3D | m_lightTankSize |
| Vec3D | m_lightTankTurretSize |
| Vec3D | m_heavyTankSize |
| Vec3D | m_heavyTankTurretSize |
| Vec3D | m_launcherSize |
| Vec3D | m_artillerySize |
| Vec3D | m_artilleryTurretSize |
| Vec3D | m_jetSize |
| vector< int > | m_numCols |
| vector< int > | m_numRows |
| vector< Vec3D > | m_tightFormationSize |
| vector< FLOAT > | m_turnRate |
| vector< FLOAT > | m_fullSpeed |
| vector< FLOAT > | m_halfSpeed |
| vector< FLOAT > | m_BGTurnRate |
| vector< FLOAT > | m_BGFullSpeed |
| vector< FLOAT > | m_BGHalfSpeed |
| vector< int > | m_firingDelay |
| vector< int > | m_baseDamage |
| vector< FLOAT > | m_firingRange |
| vector< FLOAT > | m_firingArc |
| vector< int > | m_armor |
| int | m_lightTankHitFlareTime |
|
|
armor. all vectors have size of 5
Definition at line 137 of file BattleUnitData.h. References m_armor. Referenced by BattleGroup::BattleGroup(), BattleJets::BattleJets(), and BattleJets::getNumJets().
00137 { return m_armor; }
|
|
|
Definition at line 117 of file BattleUnitData.h. References m_artillerySize, and Vec3D. Referenced by BattleGroup::render().
00117 { return m_artillerySize; }
|
|
|
Definition at line 118 of file BattleUnitData.h. References m_artilleryTurretSize, and Vec3D. Referenced by BattleGroup::render().
00118 { return m_artilleryTurretSize; }
|
|
|
Definition at line 133 of file BattleUnitData.h. References m_baseDamage. Referenced by BattleGroup::fire(), and BattleJets::takeHit().
00133 { return m_baseDamage; }
|
|
|
Definition at line 129 of file BattleUnitData.h. References m_BGFullSpeed. Referenced by BattleJets::flyTo(), and BattleGroup::moveBattleGroup().
00129 { return m_BGFullSpeed; }
|
|
|
Definition at line 130 of file BattleUnitData.h. References m_BGHalfSpeed. Referenced by BattleGroup::moveBattleGroup().
00130 { return m_BGHalfSpeed; }
|
|
|
Definition at line 128 of file BattleUnitData.h. References m_BGTurnRate. Referenced by BattleJets::flyTo(), and BattleGroup::moveBattleGroup().
00128 { return m_BGTurnRate; }
|
|
|
Definition at line 135 of file BattleUnitData.h. References m_firingArc. Referenced by BattleGroup::acquireGroupTargets(), and BattleGroup::fire().
00135 { return m_firingArc; }
|
|
|
offensive capabilities. all vectors have size of 5
Definition at line 132 of file BattleUnitData.h. References m_firingDelay. Referenced by BattleGroup::fire(), BattleGroup::fireAntiAir(), and BattleGroup::render().
00132 { return m_firingDelay; }
|
|
|
Definition at line 134 of file BattleUnitData.h. References m_firingRange. Referenced by BattleGroup::BattleGroup().
00134 { return m_firingRange; }
|
|
|
Definition at line 126 of file BattleUnitData.h. References m_fullSpeed. Referenced by BattleGroup::moveUnits().
00126 { return m_fullSpeed; }
|
|
|
|
Definition at line 127 of file BattleUnitData.h. References m_halfSpeed. Referenced by BattleGroup::moveUnits().
00127 { return m_halfSpeed; }
|
|
|
Definition at line 114 of file BattleUnitData.h. References m_heavyTankSize, and Vec3D. Referenced by BattleGroup::render().
00114 { return m_heavyTankSize; }
|
|
|
Definition at line 115 of file BattleUnitData.h. References m_heavyTankTurretSize, and Vec3D. Referenced by BattleGroup::render().
00115 { return m_heavyTankTurretSize; }
|
|
|
Initialzes the data from a stream.
Definition at line 26 of file BattleUnitData.cpp. References m_armor, m_artillerySize, m_artilleryTurretSize, m_baseDamage, m_BGFullSpeed, m_BGHalfSpeed, m_BGTurnRate, m_firingArc, m_firingDelay, m_firingRange, m_fullSpeed, m_halfSpeed, m_heavyTankSize, m_heavyTankTurretSize, m_jetSize, m_launcherSize, m_lightTankHitFlareTime, m_lightTankSize, m_lightTankTurretSize, m_numCols, m_numRows, m_tightFormationSize, and m_turnRate. Referenced by Overhead::initData().
00027 {
00028 m_numCols.resize(UnitTypes::COUNT);
00029 m_numRows.resize(UnitTypes::COUNT);
00030 m_tightFormationSize.resize(UnitTypes::COUNT);
00031
00032 m_turnRate.resize(UnitTypes::COUNT);
00033 m_fullSpeed.resize(UnitTypes::COUNT);
00034 m_halfSpeed.resize(UnitTypes::COUNT);
00035 m_BGTurnRate.resize(UnitTypes::COUNT);
00036 m_BGFullSpeed.resize(UnitTypes::COUNT);
00037 m_BGHalfSpeed.resize(UnitTypes::COUNT);
00038
00039 m_firingDelay.resize(UnitTypes::COUNT);
00040 m_baseDamage.resize(UnitTypes::COUNT);
00041 m_firingRange.resize(UnitTypes::COUNT);
00042 m_firingArc.resize(UnitTypes::COUNT);
00043
00044 m_armor.resize(UnitTypes::COUNT);
00045
00046 // input data in the order its listed in the file "data.txt"
00047 in >> m_lightTankSize.x >> m_lightTankSize.y >> m_lightTankSize.z;
00048 in >> m_lightTankTurretSize.x >> m_lightTankTurretSize.y >> m_lightTankTurretSize.z;
00049 in >> m_heavyTankSize.x >> m_heavyTankSize.y >> m_heavyTankSize.z;
00050 in >> m_heavyTankTurretSize.x >> m_heavyTankTurretSize.y >> m_heavyTankTurretSize.z;
00051 in >> m_launcherSize.x >> m_launcherSize.y >> m_launcherSize.z;
00052 in >> m_artillerySize.x >> m_artillerySize.y >> m_artillerySize.z;
00053 in >> m_artilleryTurretSize.x >> m_artilleryTurretSize.y >> m_artilleryTurretSize.z;
00054 in >> m_jetSize.x >> m_jetSize.y >> m_jetSize.z;
00055
00056 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00057 in >> m_numCols[i];
00058 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00059 in >> m_numRows[i];
00060 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00061 in >> m_tightFormationSize[i].x >> m_tightFormationSize[i].y >> m_tightFormationSize[i].z;
00062 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00063 in >> m_turnRate[i];
00064 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00065 in >> m_fullSpeed[i];
00066 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00067 in >> m_halfSpeed[i];
00068 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00069 in >> m_BGTurnRate[i];
00070 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00071 in >> m_BGFullSpeed[i];
00072 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00073 in >> m_BGHalfSpeed[i];
00074
00075 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00076 in >> m_firingDelay[i];
00077 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00078 in >> m_baseDamage[i];
00079 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00080 in >> m_firingRange[i];
00081 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00082 in >> m_firingArc[i];
00083
00084 for(size_t i=0; i < UnitTypes::COUNT; ++i)
00085 in >> m_armor[i];
00086
00087 in >> m_lightTankHitFlareTime;
00088
00089 }
|
|
|
Definition at line 119 of file BattleUnitData.h. References m_jetSize, and Vec3D. Referenced by BattleGroup::render().
00119 { return m_jetSize; }
|
|
|
Definition at line 116 of file BattleUnitData.h. References m_launcherSize, and Vec3D. Referenced by BattleGroup::render().
00116 { return m_launcherSize; }
|
|
|
particle system??
Definition at line 139 of file BattleUnitData.h. References m_lightTankHitFlareTime.
00139 { return m_lightTankHitFlareTime; }
|
|
|
individual unit size
Definition at line 112 of file BattleUnitData.h. References m_lightTankSize, and Vec3D. Referenced by BattleGroup::render().
00112 { return m_lightTankSize; }
|
|
|
Definition at line 113 of file BattleUnitData.h. References m_lightTankTurretSize, and Vec3D. Referenced by BattleGroup::render().
00113 { return m_lightTankTurretSize; }
|
|
|
battle group size. all vectors have size of 5
Definition at line 121 of file BattleUnitData.h. References m_numCols. Referenced by BattleGroup::BattleGroup(), and BattleGroup::moveUnits().
00121 { return m_numCols; }
|
|
|
Definition at line 122 of file BattleUnitData.h. References m_numRows. Referenced by BattleGroup::BattleGroup(), and BattleGroup::moveUnits().
00122 { return m_numRows; }
|
|
|
should only be called by the class that inherits the Singleton functionality after the subclasses releases all its necessary resources
Referenced by shutdown(). |
|
|
release resources
Definition at line 91 of file BattleUnitData.cpp. References Singleton< BattleUnitData >::releaseObj(). Referenced by Overhead::overhead_shutdown().
00091 { this->releaseObj(); }
|
|
|
Definition at line 123 of file BattleUnitData.h. References m_tightFormationSize. Referenced by BattleGroup::BattleGroup().
00123 { return m_tightFormationSize; }
|
|
|
mobility. all vectors have size of 5
Definition at line 125 of file BattleUnitData.h. References m_turnRate. Referenced by BattleGroup::moveUnits().
00125 { return m_turnRate; }
|
|
|
Definition at line 105 of file BattleUnitData.h. Referenced by armor(), and initData(). |
|
|
Definition at line 85 of file BattleUnitData.h. Referenced by artillerySize(), and initData(). |
|
|
Definition at line 86 of file BattleUnitData.h. Referenced by artilleryTurretSize(), and initData(). |
|
|
Definition at line 101 of file BattleUnitData.h. Referenced by baseDamage(), and initData(). |
|
|
Definition at line 97 of file BattleUnitData.h. Referenced by BGFullSpeed(), and initData(). |
|
|
Definition at line 98 of file BattleUnitData.h. Referenced by BGHalfSpeed(), and initData(). |
|
|
Definition at line 96 of file BattleUnitData.h. Referenced by BGTurnRate(), and initData(). |
|
|
Definition at line 103 of file BattleUnitData.h. Referenced by firingArc(), and initData(). |
|
|
Definition at line 100 of file BattleUnitData.h. Referenced by firingDelay(), and initData(). |
|
|
Definition at line 102 of file BattleUnitData.h. Referenced by firingRange(), and initData(). |
|
|
Definition at line 94 of file BattleUnitData.h. Referenced by fullSpeed(), and initData(). |
|
|
Definition at line 95 of file BattleUnitData.h. Referenced by halfSpeed(), and initData(). |
|
|
Definition at line 82 of file BattleUnitData.h. Referenced by heavyTankSize(), and initData(). |
|
|
Definition at line 83 of file BattleUnitData.h. Referenced by heavyTankTurretSize(), and initData(). |
|
|
Definition at line 87 of file BattleUnitData.h. Referenced by initData(), and jetSize(). |
|
|
Definition at line 84 of file BattleUnitData.h. Referenced by initData(), and launcherSize(). |
|
|
Definition at line 107 of file BattleUnitData.h. Referenced by initData(), and lightTankHitFlareTime(). |
|
|
Definition at line 80 of file BattleUnitData.h. Referenced by initData(), and lightTankSize(). |
|
|
Definition at line 81 of file BattleUnitData.h. Referenced by initData(), and lightTankTurretSize(). |
|
|
Definition at line 89 of file BattleUnitData.h. Referenced by initData(), and numCols(). |
|
|
Definition at line 90 of file BattleUnitData.h. Referenced by initData(), and numRows(). |
|
|
Definition at line 91 of file BattleUnitData.h. Referenced by initData(), and tightFormationSize(). |
|
|
Definition at line 93 of file BattleUnitData.h. Referenced by initData(), and turnRate(). |
|
|
Tokens that delimit the data in the data file.
Definition at line 23 of file BattleUnitData.cpp. Referenced by Overhead::initData(). |
|
|
Definition at line 24 of file BattleUnitData.cpp. |
1.3-rc2