Ejemplo n.º 1
0
FbTextElement FbTextElement::insertInside(const QString &style, const QString &html)
{
    const TypeList * types = subtypes();
    if (!types) return FbTextElement();

    Sublist sublist(*types, style);
    if (!sublist) return FbTextElement();

    FbTextElement child = firstChild();
    if (sublist < child) {
        prependInside(html);
        return firstChild();
    }

    while (!child.isNull()) {
        FbTextElement subling = child.nextSibling();
        if (sublist >= child && sublist != subling) {
            child.appendOutside(html);
            return child.nextSibling();
        }
        child = subling;
    }

    return FbTextElement();
}
Ejemplo n.º 2
0
bool FbTextElement::hasSubtype(const QString &style) const
{
    if (const TypeList * list = subtypes()) {
        for (TypeList::const_iterator item = list->begin(); item != list->end(); item++) {
            if (item->name() == style) return true;
        }
    }
    return false;
}
Ejemplo n.º 3
0
void typet::move_to_subtypes(typet &type)
{
  subtypest &sub=subtypes();
  sub.push_back(static_cast<const typet &>(get_nil_irep()));
  sub.back().swap(type);
}
Ejemplo n.º 4
0
Archivo: type.cpp Proyecto: Dthird/CBMC
void typet::copy_to_subtypes(const typet &type)
{
  subtypes().push_back(type);
}
Ejemplo n.º 5
0
bool FbTextElement::hasScheme() const
{
    return subtypes();
}