/* * SettableValue.cpp * * Created on: 10 рту. 2020 у. * Author: LeonidTitov */ #include "SettableValue.hh" #include void schematic::SettableValue::configure( Setting & config ) { stored_value = static_cast( config.preset_value ); } void schematic::SettableFlag::configure( Setting & config ) { stored_value = static_cast( config.preset_value ); } bool schematic::SettableValue::Setting::isValid() { using namespace std; return not isnan( preset_value ); } bool schematic::SettableFlag::Setting::isValid() { return (preset_value == 0u) or (preset_value == 1u); }