VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
DtCustomParamBuilderRegistry Class Reference

Central registry mapping wire-type strings to async DtCommandSpecParamBuilder factories.

Both DtCatalogParamSpecBuilder and DtScriptedTaskParamSpecBuilder hold a const reference to one shared instance owned by DtCommandSpecBuilder.

To register a new custom parameter type:

  1. Add a factory entry to myFactories in registerBuilders().
  2. Add a scripted task mapping entry to myScriptedTaskMappings in registerBuilders(). Both paths (catalog and scripted task) then automatically gain the new type.

Wire types currently registered:

Public Member Functions

 DtCustomParamBuilderRegistry (DtScenarioManager &scnMgr)
 
 ~DtCustomParamBuilderRegistry ()=default
 
 DtCustomParamBuilderRegistry (const DtCustomParamBuilderRegistry &)=delete
 
DtCustomParamBuilderRegistry & operator= (const DtCustomParamBuilderRegistry &)=delete
 
bool hasBuilder (const std::string &wireType) const
 
std::unique_ptr
< DtCommandSpecParamBuilder > 
build (const std::string &wireType, const Json::Value &paramJson, const std::string &objectName, const Json::Value &typeModifiers) const
 
const std::unordered_map
< std::string,
DtScriptedTaskCustomMapping > & 
scriptedTaskMappings () const
 

Private Types

using BuilderPtr = std::unique_ptr< DtCommandSpecParamBuilder >
 
using Factory = std::function< BuilderPtr(const Json::Value &, const std::string &, const Json::Value &)>
 

Private Member Functions

void registerBuilders (DtScenarioManager &scnMgr)
 
template<typename TParam , typename... ExtraArgs>
Factory makeFactory (DtScenarioManager &scnMgr, ExtraArgs &&...extraArgs)
 
Factory makeResourceFactory (DtScenarioManager &scnMgr, DtResourceListCommandSpecParamBuilder::RequestType type)
 

Static Private Member Functions

template<typename TParam , typename Tuple , std::size_t... I>
static BuilderPtr makeWithTuple (DtScenarioManager &scnMgr, const Json::Value &paramJson, const std::string &objectName, const Json::Value &typeModifiers, const Tuple &extras, std::index_sequence< I...>)
 

Private Attributes

std::unordered_map
< std::string, Factory > 
myFactories
 
std::unordered_map
< std::string,
DtScriptedTaskCustomMapping > 
myScriptedTaskMappings
 

Member Typedef Documentation

using DtCustomParamBuilderRegistry::Factory = std::function<BuilderPtr( const Json::Value&, const std::string&, const Json::Value&)>
private

Factory signature: (paramJson, objectName, typeModifiers) → builder.

Constructor & Destructor Documentation

DtCustomParamBuilderRegistry::DtCustomParamBuilderRegistry ( DtScenarioManager &  scnMgr)
explicit
DtCustomParamBuilderRegistry::~DtCustomParamBuilderRegistry ( )
default
DtCustomParamBuilderRegistry::DtCustomParamBuilderRegistry ( const DtCustomParamBuilderRegistry &  )
delete

Member Function Documentation

DtCustomParamBuilderRegistry& DtCustomParamBuilderRegistry::operator= ( const DtCustomParamBuilderRegistry &  )
delete
bool DtCustomParamBuilderRegistry::hasBuilder ( const std::string &  wireType) const

Returns true if an async builder is registered for wireType.

std::unique_ptr<DtCommandSpecParamBuilder> DtCustomParamBuilderRegistry::build ( const std::string &  wireType,
const Json::Value &  paramJson,
const std::string &  objectName,
const Json::Value &  typeModifiers 
) const

Constructs and returns an async builder for wireType, or nullptr if no builder is registered for that type. typeModifiers carries the TypeModifiers object from the catalog entry, or an empty object when the parameter originates from a scripted task variable.

const std::unordered_map<std::string, DtScriptedTaskCustomMapping>& DtCustomParamBuilderRegistry::scriptedTaskMappings ( ) const

Returns the map from VRF scripted task variable type string to custom mapping info. DtScriptedTaskParamSpecBuilder iterates this to auto-register all custom builders without needing to enumerate them explicitly.

void DtCustomParamBuilderRegistry::registerBuilders ( DtScenarioManager &  scnMgr)
private
template<typename TParam , typename Tuple , std::size_t... I>
static BuilderPtr DtCustomParamBuilderRegistry::makeWithTuple ( DtScenarioManager &  scnMgr,
const Json::Value &  paramJson,
const std::string &  objectName,
const Json::Value &  typeModifiers,
const Tuple &  extras,
std::index_sequence< I...>   
)
inlinestaticprivate
template<typename TParam , typename... ExtraArgs>
Factory DtCustomParamBuilderRegistry::makeFactory ( DtScenarioManager &  scnMgr,
ExtraArgs &&...  extraArgs 
)
inlineprivate

{@ Factory maker templates. These generate the lambda functions that construct builders Overloaded for parameter parsing into the different types of builders we have

References ImGui::Value().

Factory DtCustomParamBuilderRegistry::makeResourceFactory ( DtScenarioManager &  scnMgr,
DtResourceListCommandSpecParamBuilder::RequestType  type 
)
inlineprivate

References ImGui::Value().

Member Data Documentation

std::unordered_map<std::string, Factory> DtCustomParamBuilderRegistry::myFactories
private
std::unordered_map<std::string, DtScriptedTaskCustomMapping> DtCustomParamBuilderRegistry::myScriptedTaskMappings
private

The documentation for this class was generated from the following file:

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)