Enzo
Loading...
Searching...
No Matches
enzo::prm::NodeParameter Class Reference
Inheritance diagram for enzo::prm::NodeParameter:
enzo::prm::Parameter

Public Member Functions

 NodeParameter (Template prmTemplate, enzo::nt::OpId opId)
 
enzo::nt::OpId getOpId () const
 
- Public Member Functions inherited from enzo::prm::Parameter
 Parameter (Template prmTemplate)
 
std::string getName () const
 
std::string getLabel () const
 
enzo::prm::Type getType () const
 
enzo::prm::ValueType getValueType () const
 
unsigned int getVectorSize () const
 
floatT evalFloat (unsigned int index=0) const
 
String evalString (unsigned int index=0) const
 
intT evalInt (unsigned int index=0) const
 
floatT evalFloat (unsigned int index, String &error) const
 
intT evalInt (unsigned int index, String &error) const
 
String evalString (unsigned int index, String &error) const
 
std::vector< floatT > evalFloats () const
 
std::vector< String > evalStrings () const
 
std::vector< intT > evalInts () const
 
void setInt (intT value, unsigned int index=0)
 
void setFloat (floatT value, unsigned int index=0)
 
void setString (String value, unsigned int index=0)
 
void setExpression (String expression, unsigned int index=0)
 
void clearExpression (unsigned int index=0)
 
bool hasExpression (unsigned int index=0) const
 
std::optional< String > getExpression (unsigned int index=0) const
 The expression on a component.
 
std::optional< String > getExpressionError (unsigned int index=0) const
 Evaluates a component's expression and reports any failure.
 
PrmValues getValues () const
 
void setValues (const PrmValues &values)
 
unsigned int getInstanceCount () const
 
const std::vector< std::shared_ptr< Parameter > > & getInstance (unsigned int instanceIndex) const
 
std::shared_ptr< ParametergetInstanceField (unsigned int instanceIndex, std::string_view fieldName) const
 
void addInstance ()
 
void removeInstance (unsigned int instanceIndex)
 
void moveInstance (unsigned int fromIndex, unsigned int toIndex)
 
const TemplategetTemplate ()
 

Protected Member Functions

void onFloatSet_ (const PrmValues &before) override
 
std::unique_ptr< expr::ExpressionContextmakeExpressionContext_ () const override
 Builds the context an expression runs from, e.g. what node the parameter belongs to.
 
void submitExpressionDependencies_ (const expr::ExpressionContext &context, unsigned int index) const override
 Records the parameters an expression read as captured dependencies of this component in the network graph.
 
- Protected Member Functions inherited from enzo::prm::Parameter
void handleValueChange_ ()
 
floatT clampToRange_ (floatT value, unsigned int index) const
 Returns the value pulled within a component's locked range bounds.
 
intT clampToRange_ (intT value, unsigned int index) const
 
floatT readFloatLiteral_ (unsigned int index) const
 
intT readIntLiteral_ (unsigned int index) const
 
String readStringLiteral_ (unsigned int index) const
 
std::vector< std::shared_ptr< Parameter > > buildInstance_ (unsigned int instanceIndex)
 

Additional Inherited Members

- Public Attributes inherited from enzo::prm::Parameter
boost::signals2::signal< void()> valueChanged
 
- Protected Attributes inherited from enzo::prm::Parameter
Template template_
 
PrmValues values_
 
std::vector< std::optional< String > > expressions_
 
std::vector< std::vector< std::shared_ptr< Parameter > > > instances_
 

Member Function Documentation

◆ makeExpressionContext_()

std::unique_ptr< expr::ExpressionContext > enzo::prm::NodeParameter::makeExpressionContext_ ( ) const
overrideprotectedvirtual

Builds the context an expression runs from, e.g. what node the parameter belongs to.

Reimplemented from enzo::prm::Parameter.

◆ onFloatSet_()

void enzo::prm::NodeParameter::onFloatSet_ ( const PrmValues & before)
overrideprotectedvirtual

Reimplemented from enzo::prm::Parameter.

◆ submitExpressionDependencies_()

void enzo::prm::NodeParameter::submitExpressionDependencies_ ( const expr::ExpressionContext & context,
unsigned int index ) const
overrideprotectedvirtual

Records the parameters an expression read as captured dependencies of this component in the network graph.

Reimplemented from enzo::prm::Parameter.


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