void AgendaUI::queryMeetingByTitle(void) { cout << "[query meeting] [title]" << endl; cout << "[query meeting] "; string title; cin >> title; Meeting *m; if(agendaService_.meetingQuery(title).empty()) m=NULL; else m = &(agendaService_.meetingQuery(title).front()); cout << endl; cout << setw(10) << "sponsor"; cout << setw(15) << "participator"; cout << setw(20) << "start time"; cout << setw(20) << "end time" << endl; if (m == NULL) { cout << "Agenda@" << currentUser_->getName() << " : # "; return; } cout << setw(10) << m->getSponsor(); cout << setw(15) << m->getParticipator(); cout << setw(20) << Date::dateToString(m->getStartDate()); cout << setw(20) << Date::dateToString(m->getEndDate()); cout << endl << endl; cout << "Agenda@" << currentUser_->getName() << " : # "; }
/** * @brief copy constructor of left value */ Meeting::Meeting(const Meeting &t_meeting) { m_sponsor = t_meeting.getSponsor(); m_startDate = t_meeting.getStartDate(); m_endDate = t_meeting.getEndDate(); m_title = t_meeting.getTitle(); for(auto it = t_meeting.m_participators.begin(); it!= t_meeting.m_participators.end(); it++) { m_participators.push_back(*it); } }