Beispiel #1
0
void popup_param_t::do_read( const serialization::yaml_node_t& node)
{
    serialization::yaml_node_t n = node.get_node( "value");
    std::string val;
    n >> val;

    int index = find_index_for_string( val);

    if( index != -1)
        value().assign( index);
    else
    {
        node.error_stream() << "error: item " << val << " not found on param\n";
        value().assign( 0);
    }
}
Beispiel #2
0
poly_param_value_t popup_param_t::from_python( const boost::python::object& obj) const
{
    std::string str = boost::python::extract<std::string>( obj);
    int index = find_index_for_string( str);
    return poly_param_value_t( index);
}