Wrap model in order to create homogeneous model easily.

This commit is contained in:
quemy 2012-12-09 19:33:48 +01:00
commit 6974bc7bbe
10 changed files with 252 additions and 20 deletions

View file

@ -69,6 +69,24 @@ public:
return leftAssociation;
}
void removeFromRight(const A& a)
{
for(auto& it : leftAssociation)
if(it->second == a)
leftAssociation.erase(it);
rightAssociation.erase(a);
}
void removeFromLeft(const B& b)
{
for(auto& it : rightAssociation)
if(it->second == b)
rightAssociation.erase(it);
leftAssociation.erase(b);
}
unsigned size() const
{
return leftAssociation.size();