IMS2
Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
|
Stores the static data of a basic thruster. More...
Public Member Functions | |
THRUSTERMODE * | GetThrusterMode (int mode) |
int | getNumberOfModes () |
THRUSTEREXHAUST * | GetThrusterExhaust (int idx) |
int | GetNumberOfExhausts () |
VECTOR3 | GetThrustDirection () |
VECTOR3 | GetThrusterPosition () |
virtual bool | HasGui () |
This function serves to check whether a module function has a GUI before creating it. More... | |
Public Member Functions inherited from IMS_ModuleFunctionData_Base | |
virtual bool | LoadFromFile (string configfile, IMSFILE cfg) |
Loads the data from config file. More... | |
FUNCTIONTYPE | GetType () |
string | GetName () |
Protected Member Functions | |
virtual bool | processConfigLine (vector< string > &tokens) |
Receives all lines of the config file that concern this ModuleFunction one by one. More... | |
virtual bool | validateData (string configfile) |
Validates the data for completeness after loading. More... | |
Protected Attributes | |
vector< THRUSTERMODE > | thrustermodes |
vector< THRUSTEREXHAUST > | exhausts |
VECTOR3 | thrustdirection = _V(0, 0, 0) |
VECTOR3 | thrusterpos = _V(0, 0, 0) |
Protected Attributes inherited from IMS_ModuleFunctionData_Base | |
FUNCTIONTYPE | type |
Stores the type of the ModuleFunction. | |
string | name = "" |
Stores the Name of the ModuleFunction. | |
Private Member Functions | |
void | processMode (vector< string > &tokens) |
processes a senario line for a thrustermode More... | |
void | processExhaust (vector< string > &tokens) |
processes a senario line for an exhaust definition More... | |
void | validateModes () |
validates the thruster modes read from the config file More... | |
void | validateExhausts () |
validates the exhausts read from the config file More... | |
Stores the static data of a basic thruster.
|
inline |
|
inline |
THRUSTERMODE * IMS_ModuleFunctionData_Thruster::GetThrusterMode | ( | int | mode | ) |
mode | The index of the requested thrustermode in the thrustermode list |
|
inline |
|
inlinevirtual |
This function serves to check whether a module function has a GUI before creating it.
Reimplemented from IMS_ModuleFunctionData_Base.
Reimplemented in IMS_ModuleFunctionData_Rcs.
|
protectedvirtual |
Receives all lines of the config file that concern this ModuleFunction one by one.
Overload this function to receive the relevant data of your module.
tokens | a vector of strings that contains the individual parts of the line, delimited by whitespace or '=' |
Implements IMS_ModuleFunctionData_Base.
Reimplemented in IMS_ModuleFunctionData_Rcs.
|
private |
processes a senario line for an exhaust definition
tokens | The scenario line split into single items |
|
private |
processes a senario line for a thrustermode
tokens | The scenario line split into single items |
|
protectedvirtual |
Validates the data for completeness after loading.
Implement this function to validate your data at the end of the loading process. Check if everything's there that needs to be, and write log messages if it isn't.
configfile | The name of the configfile, so you can add it to your messages so config writers find their mistakes faster. |
Implements IMS_ModuleFunctionData_Base.
Reimplemented in IMS_ModuleFunctionData_Rcs.
|
private |
validates the exhausts read from the config file
invalid_argument | if there is a problem with exhausts |
|
private |
validates the thruster modes read from the config file
invalid_argument | if there is a problem with thruster modes |