예제 #1
0
void Host::assign_content(int cid){
	std::vector<int>::iterator it;
	it = find (cids_.begin(), cids_.end(), cid);
	if(it!=cids_.end())
		return;
	cids_.push_back(cid);

	/* copy the content file into the folder */
	Content c;
	string destfile = c.get_content_name_in_host(id_,cid);
	copycontent(c.get_content_name(cid).c_str(), destfile.c_str());
}