//Ex Professores
Professor * Escola::getExProfessorByNome(const string s){

	auto _temp_exprofs = getExProfessores();

	for(auto it = _temp_exprofs.begin();it != _temp_exprofs.end();it++){
		if(s == (*it)->getNome())
			return (*it);
	}

	throw ProfessorNaoExistente(s);
}
Beispiel #2
0
Professor* Escola::searchProf(unsigned int ID){

	HProfessor exProfs = getExProfessores();
	HProfessor::iterator it;
	if (ID < 0 || ID >= Professor::getID_max()){
		return NULL;
	}

	for (int i=0; i < professoresescola.size() ; i++){
		if(professoresescola[i]->getID()==ID)
			return professoresescola[i];

	}

	for(it=exProfs.begin(); it != exProfs.end(); it++){
		if((*it)->getID()==ID)
			return (*it);
	}

	return NULL;
}