PISerial::DeviceInfo operators

This commit is contained in:
2020-05-26 18:21:14 +03:00
parent 15515a2954
commit bfc6d0f18e

View File

@@ -264,5 +264,10 @@ inline PICout operator <<(PICout s, const PISerial::DeviceInfo & v) {
return s;
}
inline bool operator ==(const PISerial::DeviceInfo & v0, const PISerial::DeviceInfo & v1) {return v0.path == v1.path;}
inline bool operator !=(const PISerial::DeviceInfo & v0, const PISerial::DeviceInfo & v1) {return v0.path != v1.path;}
inline PIByteArray & operator <<(PIByteArray & s, const PISerial::DeviceInfo & v) {s << v.vID << v.pID << v.path << v.description << v.manufacturer; return s;}
inline PIByteArray & operator >>(PIByteArray & s, PISerial::DeviceInfo & v) {s >> v.vID >> v.pID >> v.path >> v.description >> v.manufacturer; return s;}
#endif // PISERIAL_H