src/PredFinder/elf/ElfRelation.cpp
/**
 * Private convenience method that wraps the functionality
 * of std::map for removing an ElfRelationArg from _args.
 *
 * @param arg The argument to be removed. This must be
 * the actual argument that is part of the relation, not a copy.
 *
 * @author eboschee@bbn.com
 * @date 2010.12.19
 **/
Private convenience method that wraps the functionality
of std::map for removing an ElfRelationArg from _args.

@param arg The argument to be removed. This must be
the actual argument that is part of the relation, not a copy.


Private convenience method that wraps the functionality of std :: map for removing an ElfRelationArg from _args . @param arg The argument to be removed . This must be the actual argument that is part of the relation not a copy .
void ElfRelation::remove_argument(const ElfRelationArg_ptr arg) {
	ElfRelationArgMap::iterator iter = _arg_map.find(arg->get_role());
	if (iter == _arg_map.end())
		return; 
	std::vector<ElfRelationArg_ptr>& arg_vector = (*iter).second;
	std::vector<ElfRelationArg_ptr>::iterator vector_iter;
	for (vector_iter = arg_vector.begin(); vector_iter != arg_vector.end(); vector_iter++) {
		if ((*vector_iter) == arg) {
			arg_vector.erase(vector_iter);
			break;
		}
	}
	_arg_map.erase(iter);
}
void ElfRelation :: remove_argument ( const ElfRelationArg_ptr arg ) { ElfRelationArgMap :: iterator iter = _arg_map . find ( arg -> get_role ( ) ) ; if ( iter == _arg_map . end ( ) ) return ; std :: vector < ElfRelationArg_ptr > & arg_vector = ( * iter ) . second ; std :: vector < ElfRelationArg_ptr > :: iterator vector_iter ; for ( vector_iter = arg_vector . begin ( ) ; vector_iter != arg_vector . end ( ) ; vector_iter ++ ) { if ( ( * vector_iter ) == arg ) { arg_vector . erase ( vector_iter ) ; break ; } } _arg_map . erase ( iter ) ; }
Private convenience method that wraps the functionality
 of std::map for removing an ElfRelationArg from _args.
Private convenience method that wraps the functionality of std :: map for removing an ElfRelationArg from _args .
// just in case
