Example #1
0
void database_entity::read(xml::element const& e)
{
    key_ = db_key_from_name(e.get_name());
    xml_serialize::get_element(e, "axis_lengths", axis_lengths_);
    xml_serialize::get_element(e, "data_values" , data_values_ );
    xml_serialize::get_element(e, "gloss"       , gloss_       );

    assert_invariants();
}
Example #2
0
std::string get_name(xml::element const& element)
{
    try
        {
        char const* name = element.get_name();
        return name ? name : "";
        }
    catch(std::exception const& e)
        {
        fatal_error() << e.what() << LMI_FLUSH;
        throw "Unreachable--silences a compiler diagnostic.";
        }
}