Logo Search packages:      
Sourcecode: verbiste version File versions

const std::vector< ModeTensePersonNumber > * FrenchVerbDictionary::getMTPNForInflection ( const std::string &  templateName,
const std::string &  inflection 
) const

Describes an inflection according to a given conjugation template. If the given inflection is known to the given conjugation template, the list of possible modes, tenses and persons is returned. For example, the inflection "es" in the "aim:er" template can be the 2nd person singular of the indicative present ("tu aimes") or the 2nd person singular of the subjunctive present. ("que tu aimes"). Here, two ModeTensePersonNumber objects would be in the returned vector.

Parameters:
templateName name of the conjugation template to use (e.g., "aim:er")
inflection inflection to be described (e.g., "erions")
Returns:
a pointer to a vector of ModeTensePersonNumber objects (which must not be modified nor destroyed), or NULL if the inflection was not known to the template

Definition at line 474 of file FrenchVerbDictionary.cpp.

{
    InflectionTable::const_iterator i = inflectionTable.find(templateName);
    if (i == inflectionTable.end())
      return NULL;
    const TemplateInflectionTable &ti = i->second;
    TemplateInflectionTable::const_iterator j = ti.find(inflection);
    if (j == ti.end())
      return NULL;
    return &j->second;
}


Generated by  Doxygen 1.6.0   Back to index