WIP: equality comparisons for GenNode
forwarding equality to the embedded EntryID Basically, two GenNodes are equal when they have the same "identity" Ironically, this is the usual twist with database entities
This commit is contained in:
parent
1fa7a4a437
commit
da148e9758
1 changed files with 16 additions and 0 deletions
|
|
@ -184,6 +184,9 @@ namespace diff{
|
|||
// standard copy operations acceptable
|
||||
};
|
||||
|
||||
|
||||
//------GenNode Data fields---
|
||||
|
||||
ID idi;
|
||||
DataCap data;
|
||||
|
||||
|
|
@ -232,6 +235,19 @@ namespace diff{
|
|||
return node.idi.getSym();
|
||||
}
|
||||
|
||||
friend bool
|
||||
operator== (GenNode const& n1, GenNode const& n2)
|
||||
{
|
||||
return n1.idi == n2.idi;
|
||||
}
|
||||
|
||||
friend bool
|
||||
operator!= (GenNode const& n1, GenNode const& n2)
|
||||
{
|
||||
return n1.idi != n2.idi;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
template<typename X>
|
||||
static string
|
||||
|
|
|
|||
Loading…
Reference in a new issue