src/PredFinder/macros/GenerateIndividualOperator.cpp
/**
 * Implements ReadingMacroOperator::matches.
 *
 * Checks that the specified relation can be
 * consumed by this operator.
 *
 * @param relation The ElfRelation being checked
 * for possible consumption.
 *
 * @author nward@bbn.com
 * @date 2010.11.10
 **/


Checks that the specified relation can be
consumed by this operator.

@param relation The ElfRelation being checked
for possible consumption.


Checks that the specified relation can be consumed by this operator . @param relation The ElfRelation being checked for possible consumption .
bool GenerateIndividualOperator::matches(ElfRelation_ptr relation) const {
	if (_predicate->matches(relation)) {
		bool roles_match = true;
		BOOST_FOREACH(RelationParameter_ptr relation_parameter, _relations) {
			if (!relation_parameter->matches(relation, true, true)) {
				roles_match = false;
				break;
			}
		}
		return roles_match;
	} else {
		return false;
	}
}
bool GenerateIndividualOperator :: matches ( ElfRelation_ptr relation ) const { if ( _predicate -> matches ( relation ) ) { bool roles_match = true ; BOOST_FOREACH ( RelationParameter_ptr relation_parameter , _relations ) { if ( ! relation_parameter -> matches ( relation , true , true ) ) { roles_match = false ; break ; } } return roles_match ; } else { return false ; } }
Implements ReadingMacroOperator::matches.
Implements ReadingMacroOperator :: matches .
// Make sure this is a matching relation by predicate
 // Make sure the input roles are all consumed
 // Done
 // No match
