diff options
| author | Arcadie M. Cracan <acracan@gmail.com> | 2009-12-02 21:40:56 +0000 |
|---|---|---|
| committer | Arcadie M. Cracan <acracan@gmail.com> | 2009-12-02 21:40:56 +0000 |
| commit | af83df8da26b21a9fa55c29c40c7bf7bb27c6a33 (patch) | |
| tree | cf5563488fc3d691bdedaf914cf57b70edf9c1cf /src/connection-points.cpp | |
| parent | Add forgotten libavoid files (diff) | |
| download | inkscape-af83df8da26b21a9fa55c29c40c7bf7bb27c6a33.tar.gz inkscape-af83df8da26b21a9fa55c29c40c7bf7bb27c6a33.zip | |
Add some more forgotten files
(bzr r8857)
Diffstat (limited to 'src/connection-points.cpp')
| -rw-r--r-- | src/connection-points.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
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<<cp.id<<' '<<cp.dir<<' '; + ::operator<<( ostr, cp.pos[Geom::X] ); + ostr<<' '; + ::operator<<( ostr, cp.pos[Geom::Y] ); + + return ostr; +} + + +} |
