VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
postureListCommandSpecParam.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  ******************************************************************************/
5 
6 #pragma once
7 
10 
16 {
17 public:
18  explicit DtPostureListCommandSpecParamBuilder(const Json::Value& staticParams, const std::string& entityName,
19  DtScenarioManager& scnMgr, const Json::Value& typeModifiers)
21  {}
23 
24 private:
25  static Json::Value buildResult(const Json::Value& staticParams) {
26 
27  Json::Value result = staticParams;
28  result["Type"] = "Choice";
29 
30  Json::Value choices(Json::arrayValue);
31  const std::map<DtString, int>* postureMap = DtRwIndividualLifeFormStateType::postureMap();
32  if (postureMap != nullptr)
33  {
34  for (const auto& entry : *postureMap)
35  {
36  Json::Value choice;
37  choice["Value"] = entry.second;
38  choice["DisplayName"] = entry.first.c_str();
39  choices.append(choice);
40  }
41  }
42 
43  result["Choices"] = choices;
44  return result;
45  }
46 };
Definition: scenarioManager.h:40
Concrete DtCommandSpecParamBuilder wrapping a pre-built JSON result.
Definition: commandSpecParamBuilder.h:50
DtPostureListCommandSpecParamBuilder(const Json::Value &staticParams, const std::string &entityName, DtScenarioManager &scnMgr, const Json::Value &typeModifiers)
Definition: postureListCommandSpecParam.h:18
Abstract base and immediate concrete implementation for per-parameter command spec builders...
virtual Json::Value result() const override
Returns the fully populated JSON descriptor for this parameter. Only valid after isReady() returns tr...
Definition: commandSpecParamBuilder.h:59
IMGUI_API void Value(const char *prefix, bool b)
DtPostureListCommandSpecParamBuilder.
Definition: postureListCommandSpecParam.h:15
static std::map< DtString, int > * postureMap()
static Json::Value buildResult(const Json::Value &staticParams)
Definition: postureListCommandSpecParam.h:25

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)