Exemple #1
0
bool Parameter::parse_unit( SuperString& mSentence )
{
    int result = mSentence.regex_find(m_permitted_units);
    if (result) {
        m_unit_specified = mSentence.regex_matches[0];
        return true;
    }
    return false;
}
Exemple #2
0
void Parameter::file_results    ()
{
    SuperString tmp;
    int    junk;
    size_t size = m_matches.size();
    for (int x=1; x<size; x++)
    {
        tmp = m_matches[x].str();
        SuperString exp = get_numeral_regexpression( m_type );
        int matches = tmp.regex_find( exp );
        if (matches)
            parse_value( tmp, junk );
        else
            parse_unit( tmp );
        matches = tmp.regex_find( m_name );
        if (matches)
            m_name_found = tmp;
    }
}
Exemple #3
0
bool Parameter::parse( SuperString& mSentence )
{
    bool retval = false;
    int  result = mSentence.regex_find(m_regexpression);
    m_matches  = mSentence.regex_matches;
    if (result) {
        retval = true;
    }
    file_results();
    return retval;
}