Wrap model in order to create homogeneous model easily.
This commit is contained in:
parent
f8d2d1cfa5
commit
6974bc7bbe
10 changed files with 252 additions and 20 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue