6 cm( inst, this,
"DVarProperty<>" ),
15 this->_cached_value = this->dvs->template get< T >( this->_dvar_id );
20 this->_cached_value = this->_dvar_id.
initial();
28 this->dvs->remove_listener(
this, this->_dvar_id );
40 this->_explicit_value = val;
41 if( this->_on_changed )
42 this->_on_changed( this->value() );
48 if( this->_explicit_value.has_value() )
49 return this->_explicit_value.value();
51 return this->_cached_value;
57 if( type !=
typeid( T ) )
59 this->cm.warning(
SRC_INFO,
"Wrong type of DVar." );
63 this->_cached_value = *
reinterpret_cast< T *
>( value );
65 if( this->_on_changed )
66 this->_on_changed( this->value() );
72 this->_on_changed = fun;
73 if( call_immediately && this->_on_changed )
74 this->_on_changed( this->value() );