Stores the static data of a tank.
More...
|
bool | processConfigLine (vector< string > &tokens) |
| Receives all lines of the config file that concern this ModuleFunction one by one. More...
|
|
bool | validateData (string configfile) |
| Validates the data for completeness after loading. More...
|
|
|
CONSUMABLEDATA * | propellant = NULL |
| pointer to the information of the contents of this tank
|
|
bool | convertible = true |
| whether the tank can be converted to living space
|
|
double | volume |
| usable volume in m^3
|
|
FUNCTIONTYPE | type |
| Stores the type of the ModuleFunction.
|
|
string | name = "" |
| Stores the Name of the ModuleFunction.
|
|
Stores the static data of a tank.
Config parameters
Config example
BEGIN_MODULEFUNCTION TANK
contains = LH2
END_MODULEFUNC
- Returns
- A pointer to the consumable type this tank contains
virtual bool IMS_ModuleFunctionData_Tank::HasGui |
( |
| ) |
|
|
inlinevirtual |
This function serves to check whether a module function has a GUI before creating it.
- Note
- If your ModuleFunction has its own GUI, overload this function and return true, as simple as that.
- Returns
- Always false
Reimplemented from IMS_ModuleFunctionData_Base.
bool IMS_ModuleFunctionData_Tank::processConfigLine |
( |
vector< string > & |
tokens | ) |
|
|
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.
- Parameters
-
tokens | a vector of strings that contains the individual parts of the line, delimited by whitespace or '=' |
- Note
- Throw runtime_error with an error message if you encounter an invalid line! The message will be loged in Orbiter.log together with the name of the config file.
- Returns
- true if the passed line was processed, false if not.
Reimplemented from IMS_ModuleFunctionData_Pressurised.
bool IMS_ModuleFunctionData_Tank::validateData |
( |
string |
configfile | ) |
|
|
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.
- Parameters
-
configfile | The name of the configfile, so you can add it to your messages so config writers find their mistakes faster. |
- Returns
- False if the modulefunction is unable to function, otherwise return true.
- Note
- If your Implementation returns false, The loading process will be aborted by forcing orbiter to crash, so be sure to keep your loging straight!
Reimplemented from IMS_ModuleFunctionData_Pressurised.
The documentation for this class was generated from the following files:
- C:/Orbiter2016/Orbitersdk/IMS2/IMS_ModuleFunctionData_Tank.h
- C:/Orbiter2016/Orbitersdk/IMS2/IMS_ModuleFunctionData_Tank.cpp