Logo Search packages:      
Sourcecode: condor version File versions  Download package

bool Literal::SameAs ( const ExprTree tree  )  const [virtual]

Is this ExprTree the same as the tree?

true if it is the same, false otherwise

Implements ExprTree.

Definition at line 499 of file literals.cpp.

References factor, ExprTree::GetKind(), ExprTree::LITERAL_NODE, Value::SameAs(), and value.

    bool    is_same;

    if (tree->GetKind() != LITERAL_NODE) {
        is_same = false;
    } else {
        Literal *other_literal;
        other_literal = (Literal *) tree;
        is_same = (   factor == other_literal->factor
                   && value.SameAs(other_literal->value));
    return is_same;

Generated by  Doxygen 1.6.0   Back to index