IMS2  Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
IMS_General_ModuleData Class Reference

This class contains non-orbiter specific static data about a module that is the same for every module. More...

Public Member Functions

virtual bool LoadFromFile (string configfile, IMSFILE cfg)
 Loads the data from an Orbiter cfg. More...
 
double getMass ()
 
string getName ()
 
vector< IMS_ModuleFunctionData_Base * > & GetFunctionData ()
 

Protected Attributes

double _mass
 Stores the dry mass of this module.
 
string _name
 Stores the name of this module.
 
vector< IMS_ModuleFunctionData_Base * > functiondata
 A list containing static data of all ModuleFunctions in this module.
 

Detailed Description

This class contains non-orbiter specific static data about a module that is the same for every module.

Config file parameters

These parameters are valid for any IMS module:

mass = <float kg> //the modules dry mass in kg.
[name] = <string name> //a name for this module type that will be used in variious displays in the UI.

Member Function Documentation

vector<IMS_ModuleFunctionData_Base*>& IMS_General_ModuleData::GetFunctionData ( )
inline
Returns
A reference to a list containing the static data of all contained ModuleFunctions
double IMS_General_ModuleData::getMass ( )
Returns
The dry mass of the module, without any additional mass from mModuleFunctions, Components or Cargo
string IMS_General_ModuleData::getName ( )
Returns
The name given to this module in the config file
bool IMS_General_ModuleData::LoadFromFile ( string  configfile,
IMSFILE  cfg 
)
virtual

Loads the data from an Orbiter cfg.

Parameters
configfileThe name of the configfile
cfgThe IMSFILE structure wrapping the cfg file in an appropriate format for the current platform
Returns
True if the data was loaded without errors, false otherwise

The documentation for this class was generated from the following files: