DtWeaponListCommandSpecParamBuilder.
Asynchronous DtCommandSpecParamBuilder that populates the Choices array for a weapon-list parameter. It requests weapon system data from the DtRemoteControlWeaponListRequestor and signals readiness once the data has been received (or immediately when it is already cached). Supports merging munition options into the same parameter when the TypeModifiers indicate to do so.
| DtWeaponListCommandSpecParamBuilder::DtWeaponListCommandSpecParamBuilder |
( |
const Json::Value & |
staticParams, |
|
|
const std::string & |
entityName, |
|
|
DtScenarioManager & |
scnMgr, |
|
|
const Json::Value & |
typeModifiers, |
|
|
bool |
displayWeapons = true, |
|
|
bool |
displayMunitions = false |
|
) |
| |
|
explicit |
| DtWeaponListCommandSpecParamBuilder::~DtWeaponListCommandSpecParamBuilder |
( |
| ) |
|
| bool DtWeaponListCommandSpecParamBuilder::addOptions |
( |
| ) |
|
|
protected |
adds either weapons or munitions, depending on what type of request this handles
| bool DtWeaponListCommandSpecParamBuilder::hasValidResult |
( |
| ) |
const |
|
protected |
returns true if the result has been populated with choices or collections, false if data was not yet available.
| bool DtWeaponListCommandSpecParamBuilder::addWeaponOptions |
( |
| ) |
|
|
protected |
If the requestor has options for this entity, add them to the result. Returns true if choices were populated, false if data was not yet available.
| bool DtWeaponListCommandSpecParamBuilder::addMunitionAsChoice |
( |
| ) |
|
|
protected |
Returns true if the requestor has munition options for this entity, and adds them as a single choice into the json response.
| bool DtWeaponListCommandSpecParamBuilder::addMunitionAsCollection |
( |
| ) |
|
|
protected |
Returns true if the requestor has munition options for this entity, and adds them as a collection into the json response. Each weapon will list the desired/supported munition names.
| void DtWeaponListCommandSpecParamBuilder::requestData |
( |
| ) |
|
|
protected |
| void DtWeaponListCommandSpecParamBuilder::parseTypeModifiers |
( |
| ) |
|
|
protected |
| virtual void DtWeaponListCommandSpecParamBuilder::slot_receivedWeaponList |
( |
const DtUUID & |
entity | ) |
|
|
protectedvirtual |
| virtual bool DtWeaponListCommandSpecParamBuilder::isReady |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
| virtual Json::Value DtWeaponListCommandSpecParamBuilder::result |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
| virtual bool DtWeaponListCommandSpecParamBuilder::includeWeapon |
( |
const WeaponSystem & |
weapon | ) |
const |
|
protectedvirtual |
| virtual bool DtWeaponListCommandSpecParamBuilder::getTypeModifier |
( |
std::string |
name, |
|
|
std::string & |
result |
|
) |
| const |
|
protectedvirtual |
| Json::Value DtWeaponListCommandSpecParamBuilder::myResult |
|
private |
| DtUUID DtWeaponListCommandSpecParamBuilder::myEntityUuid |
|
private |
| std::atomic<bool> DtWeaponListCommandSpecParamBuilder::myReady |
|
private |
| boost::signals2::connection DtWeaponListCommandSpecParamBuilder::myConnection |
|
private |
| Json::Value DtWeaponListCommandSpecParamBuilder::myTypeModifiers |
|
private |
| bool DtWeaponListCommandSpecParamBuilder::myDisplayWeapons = true |
|
private |
| bool DtWeaponListCommandSpecParamBuilder::myDisplayMunitions = true |
|
private |
The documentation for this class was generated from the following file: