33 lines
676 B
C++
33 lines
676 B
C++
/*
|
||
* ViewSettableValueInitializer.cpp
|
||
*
|
||
* Created on: 27 нояб. 2023 г.
|
||
* Author: titov
|
||
*/
|
||
|
||
#include "ViewSettableValue.hh"
|
||
|
||
#include "../../schematic/CacheSetAsync.hpp"
|
||
|
||
|
||
bool application::schematic::ViewSettableValue::input( Environment & env ) {
|
||
|
||
return grab( value, env.rholder.getShared<Value>( links.value ) );
|
||
|
||
}
|
||
|
||
void application::schematic::ViewSettableValue::build(Environment &env) {
|
||
|
||
typedef ::schematic::CacheSetAsync<float> Cache;
|
||
|
||
Cache * cache = memories::instance_object<Cache>(env.static_object_ma, *value );
|
||
|
||
env.signals.create( links.view, cache->getCachedValue() );
|
||
|
||
env.rholder.share<Value>( *cache, links.set );
|
||
|
||
}
|
||
|
||
|
||
|