src/PredFinder/elf/ElfRelation.cpp
/**
 * Public accessor to get an arg that matches a specified arg
 * as much as possible. Returns a copy of the underlying
 * ElfRelationArg, so changing any of the return
 * values doesn't change the contents of the document.
 *
 * We assume there's only one matching argument per relation,
 * although we could imagine underspecifying a search and getting
 * multiple matches.
 *
 * @param search_arg The arg to match against.
 * @return A matching arg, or NULL shared pointer if none.
 *
 * @author nward@bbn.com
 * @date 2010.08.18
 **/
Public accessor to get an arg that matches a specified arg
as much as possible. Returns a copy of the underlying
ElfRelationArg, so changing any of the return
values doesn't change the contents of the document.

We assume there's only one matching argument per relation,
although we could imagine underspecifying a search and getting
multiple matches.

@param search_arg The arg to match against.
@return A matching arg, or NULL shared pointer if none.


Public accessor to get an arg that matches a specified arg as much as possible . Returns a copy of the underlying ElfRelationArg so changing any of the return values doesn ' t change the contents of the document . We assume there ' s only one matching argument per relation although we could imagine underspecifying a search and getting multiple matches . @param search_arg The arg to match against . @return A matching arg or NULL shared pointer if none .
ElfRelationArg_ptr ElfRelation::get_matching_arg(const ElfRelationArg_ptr search_arg) const {
	ElfRelationArg_ptr matching_arg;
	BOOST_FOREACH(ElfRelationArg_ptr arg, get_args()) {
		if (search_arg->offsetless_equals(arg, false)) {
			matching_arg = boost::make_shared<ElfRelationArg>(arg);
			break;
		}
	}
	return matching_arg;
}
ElfRelationArg_ptr ElfRelation :: get_matching_arg ( const ElfRelationArg_ptr search_arg ) const { ElfRelationArg_ptr matching_arg ; BOOST_FOREACH ( ElfRelationArg_ptr arg , get_args ( ) ) { if ( search_arg -> offsetless_equals ( arg , false ) ) { matching_arg = boost :: make_shared < ElfRelationArg > ( arg ) ; break ; } } return matching_arg ; }
Public accessor to get an arg that matches a specified arg
 as much as possible.
Public accessor to get an arg that matches a specified arg as much as possible .
// The match we return, defaulting to empty
 // Loop through this relation's arguments looking for a match, ignoring role names
 // Done
