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:
Fischlurch 2015-07-03 18:21:46 +02:00
parent 1fa7a4a437
commit da148e9758

View file

@ -184,6 +184,9 @@ namespace diff{
// standard copy operations acceptable // standard copy operations acceptable
}; };
//------GenNode Data fields---
ID idi; ID idi;
DataCap data; DataCap data;
@ -232,6 +235,19 @@ namespace diff{
return node.idi.getSym(); 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: private:
template<typename X> template<typename X>
static string static string