33 lines
671 B
C++
33 lines
671 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 );
|
|
|
|
}
|
|
|
|
|
|
|