src/ProfileGenerator/ProfileSlot.cpp
/*! \brief Private method that creates a new hypothesis using the given fact as
    its basis

    \param fact The fact used to formulate a new hypothesis

	\return A pointer to the new hypothesis
*/
\brief Private method that creates a new hypothesis using the given fact as
its basis

\param fact The fact used to formulate a new hypothesis

\return A pointer to the new hypothesis
\ brief Private method that creates a new hypothesis using the given fact as its basis \ param fact The fact used to formulate a new hypothesis \ return A pointer to the new hypothesis
GenericHypothesis_ptr ProfileSlot::makeNewHypothesis(PGFact_ptr fact, PGDatabaseManager_ptr pgdm) {
	if (_hypothesisType == "date")
		return boost::make_shared<DateHypothesis>(fact);
	else if (_hypothesisType == "phrase")
		return boost::make_shared<PhraseHypothesis>(fact);
	else if (_hypothesisType == "condition")
		return boost::make_shared<ConditionHypothesis>(fact);
	else if (_hypothesisType == "name")
		return boost::make_shared<NameHypothesis>(fact, shared_from_this(), pgdm);
	else if (_hypothesisType == "simple_string")
		return boost::make_shared<SimpleStringHypothesis>(fact, fact->getAnswerArgument());
	else if (_hypothesisType == "description")
		return boost::make_shared<DescriptionHypothesis>(fact, pgdm);
	else if (_hypothesisType == "employment" && _unique_id == EMPLOYER_UNIQUE_ID)
		return boost::make_shared<EmploymentHypothesis>(fact, EmploymentHypothesis::EMPLOYER, pgdm);
	else if (_hypothesisType == "employment" && (_unique_id == EMPLOYEE_UNIQUE_ID || _unique_id == LEADER_UNIQUE_ID))
		return boost::make_shared<EmploymentHypothesis>(fact, EmploymentHypothesis::EMPLOYEE, pgdm);
	return boost::make_shared<SimpleStringHypothesis>(fact, fact->getAnswerArgument());
}
GenericHypothesis_ptr ProfileSlot :: makeNewHypothesis ( PGFact_ptr fact , PGDatabaseManager_ptr pgdm ) { if ( _hypothesisType == " " ) return boost :: make_shared < DateHypothesis > ( fact ) ; else if ( _hypothesisType == " " ) return boost :: make_shared < PhraseHypothesis > ( fact ) ; else if ( _hypothesisType == " " ) return boost :: make_shared < ConditionHypothesis > ( fact ) ; else if ( _hypothesisType == " " ) return boost :: make_shared < NameHypothesis > ( fact , shared_from_this ( ) , pgdm ) ; else if ( _hypothesisType == " " ) return boost :: make_shared < SimpleStringHypothesis > ( fact , fact -> getAnswerArgument ( ) ) ; else if ( _hypothesisType == " " ) return boost :: make_shared < DescriptionHypothesis > ( fact , pgdm ) ; else if ( _hypothesisType == " " && _unique_id == EMPLOYER_UNIQUE_ID ) return boost :: make_shared < EmploymentHypothesis > ( fact , EmploymentHypothesis :: EMPLOYER , pgdm ) ; else if ( _hypothesisType == " " && ( _unique_id == EMPLOYEE_UNIQUE_ID || _unique_id == LEADER_UNIQUE_ID ) ) return boost :: make_shared < EmploymentHypothesis > ( fact , EmploymentHypothesis :: EMPLOYEE , pgdm ) ; return boost :: make_shared < SimpleStringHypothesis > ( fact , fact -> getAnswerArgument ( ) ) ; }
\brief Private method that creates a new hypothesis using the given fact as
its basis
\ brief Private method that creates a new hypothesis using the given fact as its basis
// shouldn't happen if error-checking is up to date in constructor
