⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group.cpp

📁 ssd5 exercise2,敬请参考,hehe
💻 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 + -