📄 group.cpp
字号:
/*
* Author: Ma Yaowen
* version:1.0.0
*/
#include "Group.h"
//This returns the Client pointer whose object's email equals the parameter email.
Client * Group::operator[](const string& email){
Client* p;
for(int i=0;i<objects.size();i++){
p=objects[i];
if(p->getEmail()==email){
return p;
}
}
return NULL;
}
//Adds the Client pointer given by the parameter to the vector objects.
void Group::add(Client* ptr){
objects.push_back(ptr);
}
//This returns an iterator to the first Client* in vector objects.
Group::iterator Group::begin(){
return objects.begin();
}
//This returns an iterator to the last Client* in vector objects.
Group::iterator Group::end(){
return objects.end();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -