예제 #1
0
	/*!
	\author Endymion
	*/
	void addToMultiMap( P_CHAR pc )
	{
		VALIDATEPC(pc);
		SERIAL multi=pc->getMultiSerial32();
		if ( multi!=INVALID ) {

			delFromMultiMap( pc );

			pMultiCharMap[multi].push_back(pc);
		}

	}
예제 #2
0
	/*!
	\author Endymion
	*/
	void delFromMultiMap( P_CHAR pc )
	{
		VALIDATEPC(pc);
		SERIAL multi=pc->getMultiSerial32();
		if ( multi!=INVALID ) {

			std::map<SERIAL, vector <P_CHAR> >::iterator vect( pMultiCharMap.find( multi ) );
			if( ( vect!=pMultiCharMap.end() ) && !vect->second.empty() )
			{

				vector<P_CHAR>::iterator iter;
				iter = find(vect->second.begin(), vect->second.end(), pc);
				if( iter != vect->second.end() )
					vect->second.erase(iter);
			}

		}

	}