10 #include <json/json.h>
11 #include <boost/signals2/connection.hpp>
27 const Json::Value& typeModifiers,
bool displayWeapons =
true,
bool displayMunitions =
false);
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtWeaponListCommandSpecParamBuilder(const Json::Value &staticParams, const std::string &entityName, DtScenarioManager &scnMgr, const Json::Value &typeModifiers, bool displayWeapons=true, bool displayMunitions=false)
The class that is the interface between the remote controller and the back-end.
Definition: remoteControlWeaponListRequestor.h:27
Definition: scenarioManager.h:40
Json::Value myTypeModifiers
Definition: weaponListCommandSpecParam.h:70
~DtWeaponListCommandSpecParamBuilder()
DtUUID myEntityUuid
Definition: weaponListCommandSpecParam.h:66
boost::signals2::connection myConnection
Definition: weaponListCommandSpecParam.h:69
virtual bool includeWeapon(const WeaponSystem &weapon) const
bool addMunitionAsChoice()
Returns true if the requestor has munition options for this entity, and adds them as a single choice ...
DtRemoteControlWeaponListRequestor & myWeaponListRequestor
Definition: weaponListCommandSpecParam.h:68
bool myDisplayMunitions
Definition: weaponListCommandSpecParam.h:72
virtual bool isReady() const override
Returns true once result() can be safely called.
Definition: weaponListCommandSpecParam.h:55
Awaitable result handle for asynchronous command spec building.
virtual Json::Value result() const override
Returns the fully populated JSON descriptor for this parameter. Only valid after isReady() returns tr...
Definition: weaponListCommandSpecParam.h:56
bool hasValidResult() const
returns true if the result has been populated with choices or collections, false if data was not yet ...
std::atomic< bool > myReady
Definition: weaponListCommandSpecParam.h:67
Json::Value myResult
Definition: weaponListCommandSpecParam.h:65
IMGUI_API void Value(const char *prefix, bool b)
DtWeaponListCommandSpecParamBuilder.
Definition: weaponListCommandSpecParam.h:23
bool addMunitionAsCollection()
Returns true if the requestor has munition options for this entity, and adds them as a collection int...
Abstract base for a single-parameter command spec builder.
Definition: commandSpecParamBuilder.h:25
DtScenarioManager & myScenarioManager
Definition: weaponListCommandSpecParam.h:73
bool addWeaponOptions()
If the requestor has options for this entity, add them to the result. Returns true if choices were po...
virtual bool getTypeModifier(std::string name, std::string &result) const
Definition: weaponListResponseAdmin.h:27
bool myDisplayWeapons
Definition: weaponListCommandSpecParam.h:71
bool addOptions()
adds either weapons or munitions, depending on what type of request this handles
void parseTypeModifiers()
virtual void slot_receivedWeaponList(const DtUUID &entity)