VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
commandSpecParamBuilder.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 
11 
12 #include <memory>
13 
14 #include <json/json.h>
15 
26 {
27 public:
28  DtCommandSpecParamBuilder() = default;
29  virtual ~DtCommandSpecParamBuilder() = default;
30 
32  virtual bool isReady() const = 0;
33 
36  virtual Json::Value result() const = 0;
37 
41  virtual bool isEntitySpecific() const { return true; }
42 };
43 
51 {
52 public:
54  : myResult(std::move(result))
55  {
56  }
57 
58  virtual bool isReady() const override { return true; }
59  virtual Json::Value result() const override { return myResult; }
60  virtual bool isEntitySpecific() const override { return false; }
61 
62 private:
64 };
virtual bool isEntitySpecific() const override
Returns true if this parameter makes the owning command spec entity-specific (i.e. its content varies per simulation object). Defaults to true; override to false for static parameters.
Definition: commandSpecParamBuilder.h:60
Concrete DtCommandSpecParamBuilder wrapping a pre-built JSON result.
Definition: commandSpecParamBuilder.h:50
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
Json::Value myResult
Definition: commandSpecParamBuilder.h:63
virtual ~DtCommandSpecParamBuilder()=default
IMGUI_API void Value(const char *prefix, bool b)
virtual bool isReady() const =0
Returns true once result() can be safely called.
Abstract base for a single-parameter command spec builder.
Definition: commandSpecParamBuilder.h:25
virtual bool isEntitySpecific() const
Returns true if this parameter makes the owning command spec entity-specific (i.e. its content varies per simulation object). Defaults to true; override to false for static parameters.
Definition: commandSpecParamBuilder.h:41
DtImmediateCommandSpecParamBuilder(Json::Value result)
Definition: commandSpecParamBuilder.h:53
virtual Json::Value result() const =0
Returns the fully populated JSON descriptor for this parameter. Only valid after isReady() returns tr...
virtual bool isReady() const override
Returns true once result() can be safely called.
Definition: commandSpecParamBuilder.h:58
DtCommandSpecParamBuilder()=default

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)