src/PredFinder/elf/ElfRelationFactory.cpp
/**
 * Static factory method that builds a vector of ElfArg_ptrs
 * from a Pattern_ptr found by using LearnIt databases. Some args are filled with fake but 
 * plausible values while most are left blank. Used only for pattern validation.
 *
 * @param li_pattern A pointer to the LearnIt pattern.
 * @param arg_vec A vector of ElfRelationArg pointers that will be
 * filled by this method.
 *
 * @author afrankel@bbn.com
 * @date 2011.07.07
 **/
Static factory method that builds a vector of ElfArg_ptrs
from a Pattern_ptr found by using LearnIt databases. Some args are filled with fake but
plausible values while most are left blank. Used only for pattern validation.

@param li_pattern A pointer to the LearnIt pattern.
@param arg_vec A vector of ElfRelationArg pointers that will be
filled by this method.


Static factory method that builds a vector of ElfArg_ptrs from a Pattern_ptr found by using LearnIt databases . Some args are filled with fake but plausible values while most are left blank . Used only for pattern validation . @param li_pattern A pointer to the LearnIt pattern . @param arg_vec A vector of ElfRelationArg pointers that will be filled by this method .
void ElfRelationFactory::fake_args_from_li_pattern(const LearnItPattern_ptr & li_pattern,
    std::vector< ElfRelationArg_ptr > & arg_vec) 
{
	Target_ptr tgt = li_pattern->getTarget();
    int num_slots(tgt->getNumSlots());
    std::set<std::wstring> roles_already_found;
    for (int slot_num = 0; slot_num < num_slots; ++slot_num) {
        SlotConstraints_ptr sc = tgt->getSlotConstraints(slot_num);
        add_arg_from_slot_constraints(sc, roles_already_found, arg_vec);
    }
}
void ElfRelationFactory :: fake_args_from_li_pattern ( const LearnItPattern_ptr & li_pattern , std :: vector < ElfRelationArg_ptr > & arg_vec ) { Target_ptr tgt = li_pattern -> getTarget ( ) ; int num_slots ( tgt -> getNumSlots ( ) ) ; std :: set < std :: wstring > roles_already_found ; for ( int slot_num = 0 ; slot_num < num_slots ; ++ slot_num ) { SlotConstraints_ptr sc = tgt -> getSlotConstraints ( slot_num ) ; add_arg_from_slot_constraints ( sc , roles_already_found , arg_vec ) ; } }
Static factory method that builds a vector of ElfArg_ptrs
 from a Pattern_ptr found by using LearnIt databases.
Static factory method that builds a vector of ElfArg_ptrs from a Pattern_ptr found by using LearnIt databases .