Dakota  Version 7.0
Explore and Predict with Confidence
Public Member Functions | Private Attributes | List of all members
SpecSource Class Reference

Read-only view of specification data from either a ProblemDescDB or a block-local IRStore, so constructors can share one body across the legacy and DI paths. More...

Public Member Functions

 SpecSource (const ProblemDescDB &problem_db)
 view a ProblemDescDB
 
 SpecSource (const IRStore &store)
 view a block-local IRStore
 
template<typename T >
std::remove_const_t< T > get (const String &key) const
 return the value for a ProblemDescDB-style key
 
bool is_problem_db () const
 true if viewing a ProblemDescDB
 
const ProblemDescDB & problem_db () const
 the viewed ProblemDescDB; only valid when is_problem_db()
 

Private Attributes

const ProblemDescDB * problemDB
 non-null on the legacy path
 
const IRStore * irStore
 non-null on the DI path
 

Detailed Description

Read-only view of specification data from either a ProblemDescDB or a block-local IRStore, so constructors can share one body across the legacy and DI paths.

Keys use the ProblemDescDB form ("model.surrogate.nugget"); for an IRStore the block prefix is stripped ("surrogate.nugget"). Keys absent from the store yield a value-initialized T, matching the defaults the ProblemDescDB path supplies for unspecified keywords.


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