NAP
Public Member Functions | Public Attributes | List of all members
Parameter Class Referenceabstract

#include <parameter.h>

Public Member Functions

virtual void setValue (const Parameter &value)=0
 
const std::string getDisplayName () const
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

std::string mName
 Property 'Name': The name of this property. The name is separate from the ID and doesn't have to be unique. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

A parameter is a wrapper around a value that can be specified in json. It can be used to specify 'metadata' on top of a value, such as the min/max value. This 'metadata' can then be used to validate the values being set on it and to offer an appropriate UI

The actual data is located in derived classes; Parameter itself only serves as a base class

Inheritance diagram for Parameter:
[legend]
Collaboration diagram for Parameter:
[legend]

Member Function Documentation

◆ getDisplayName()

const std::string getDisplayName ( ) const

Get the display name for this parameter. If this parameter has a name set, that name is used. Otherwise, the ID is used.

Returns
The display name to use

◆ setValue()

virtual void setValue ( const Parameter value)
pure virtual

Set the value for this parameter from another parameter. The incoming value is guaranteed to be of the same parameter type.

Parameters
valueThe parameter to set the new value from

Implemented in ParameterEnum< T >, ParameterMat< T >, ParameterVec< T >, ParameterNumeric< T >, ParameterSimple< T >, ParameterButton, and ParameterDropDown.

Member Data Documentation

◆ mName

std::string mName

Property 'Name': The name of this property. The name is separate from the ID and doesn't have to be unique.