Esempio n. 1
0
	/*!
	\author Endymion
	*/
	void addToMultiMap( P_ITEM pi )
	{
		VALIDATEPI(pi);
		SERIAL multi=pi->getMultiSerial32();
		if ( multi!=INVALID ) {

			delFromMultiMap( pi );

			pMultiItemMap[multi].push_back(pi);
		}

	}
Esempio n. 2
0
	/*!
	\author Endymion
	*/
	void delFromMultiMap( P_ITEM pi )
	{
		VALIDATEPI(pi);
		SERIAL multi=pi->getMultiSerial32();
		if ( multi!=INVALID ) {

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

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

		}

	}