From af83df8da26b21a9fa55c29c40c7bf7bb27c6a33 Mon Sep 17 00:00:00 2001 From: "Arcadie M. Cracan" Date: Wed, 2 Dec 2009 23:40:56 +0200 Subject: Add some more forgotten files (bzr r8857) --- src/connection-points.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/connection-points.cpp (limited to 'src/connection-points.cpp') diff --git a/src/connection-points.cpp b/src/connection-points.cpp new file mode 100644 index 000000000..9ed98d211 --- /dev/null +++ b/src/connection-points.cpp @@ -0,0 +1,37 @@ +#include "connection-points.h" + + +bool ConnectionPoint::operator!=(ConnectionPoint& cp) +{ + return (id!=cp.id || type!=cp.type || dir!=cp.dir || pos!=cp.pos); +} + +bool ConnectionPoint::operator==(ConnectionPoint& cp) +{ + return (id==cp.id && type==cp.type && dir==cp.dir && pos==cp.pos); +} + + +namespace Inkscape{ + +SVGIStringStream& +operator>>(SVGIStringStream& istr, ConnectionPoint& cp) +{ + istr>>cp.id>>cp.dir>>cp.pos[Geom::X]>>cp.pos[Geom::Y]; + + return istr; +} + +SVGOStringStream& +operator<<(SVGOStringStream& ostr, const ConnectionPoint& cp) +{ + ostr<