This class creates and manages ssShip, ssShipMotion, and ssShipWake objects.
More...
Public Member Functions |
| | ssShipFactory () |
| | Default Constructor.
|
| | ~ssShipFactory () |
| | Default Destructor.
|
| void | loadShipPerformanceData (const char *xmlFile) |
| | Load the data that describes how all ships of all sizes perform in all sea states.
|
| void | loadShipDefinitionData (const char *xmlFile) |
| | Load the data that defines the different ships that this class will manage.
|
| void | writeSeaStateDatFile (const char *seaAndShip_output_file) |
| | Dumps a flat file for plotting purposes, based on the XML input.
|
| ssShip * | createShip (const char *shipName) |
| | Create and return a new ssShip object if the provides name matches a ship type that we have data for.
|
Detailed Description
This class creates and manages ssShip, ssShipMotion, and ssShipWake objects.
The instances of ssShipMotion that this class instantiates are based on the contents of the file that is passed to loadShipDefinitionData(). The motion of these ships are driven by the contents of the file passed to loadShipPerformanceData().
Users can define their own ship motion by deriving their own ssShipMotion class. In order for a derived ssShipMotion class to be used by this factory class and by ssISAR, users should derive their own ssShipFactory class as well. This ssShipFactory class should re-implement the virtual createShipMotion() method so that it instantiates their derived ssShipMotion class instead of the JRM implemented base class. The same can be done for ssShipWake.
Constructor & Destructor Documentation
| ssShipFactory::ssShipFactory |
( |
| ) |
|
| ssShipFactory::~ssShipFactory |
( |
| ) |
|
Member Function Documentation
| void ssShipFactory::loadShipPerformanceData |
( |
const char * |
xmlFile | ) |
|
Load the data that describes how all ships of all sizes perform in all sea states.
- Parameters
-
| xmlFile | - relative path and name of the config xml file |
| void ssShipFactory::loadShipDefinitionData |
( |
const char * |
xmlFile | ) |
|
Load the data that defines the different ships that this class will manage.
Each ship definition that is read from the provided file will result in a new ShipMotioin object being instantiated by and managed by this class. This is the only way to added ShipMotion object to this class.
- Parameters
-
| xmlFile | - relative path and name of the config xml file |
| void ssShipFactory::writeSeaStateDatFile |
( |
const char * |
seaAndShip_output_file | ) |
|
Dumps a flat file for plotting purposes, based on the XML input.
Assumes that the Sea State tags are ordered in ascending value. Note that loadDate must be called first.
- Parameters
-
| seaAndShip_output_file | - Output file name |
| ssShip* ssShipFactory::createShip |
( |
const char * |
shipName | ) |
|
Create and return a new ssShip object if the provides name matches a ship type that we have data for.
This virtual method is here so that derived classes can instantiate their own derived ssShip objects.
- Returns
- A pointer to a new ShipMotion derived object.
| virtual ssShipWake* ssShipFactory::createShipWake |
( |
| ) |
|
|
inlineprotectedvirtual |
| ssShipData* ssShipFactory::getShipData |
( |
const char * |
shipName | ) |
|
|
private |
| float ssShipFactory::getNodeValue |
( |
char * |
name, |
|
|
xmlData * |
data, |
|
|
int |
vNodeIndex, |
|
|
int |
nodeIndex, |
|
|
bool & |
validData |
|
) |
| |
|
private |
Member Data Documentation
| int ssShipFactory::m_seaState |
|
private |
| ssShipFactoryImpl* ssShipFactory::m_impl |
|
private |
The documentation for this class was generated from the following file: