diff --git a/src/proc/mobject/placement.cpp b/src/proc/mobject/placement.cpp index fd2d02e9f..1b6e4c14d 100644 --- a/src/proc/mobject/placement.cpp +++ b/src/proc/mobject/placement.cpp @@ -69,6 +69,16 @@ namespace mobject { } + bool + isSameDef (PlacementMO const& pl1, PlacementMO const& pl2) + { + return pl1.getID() == pl2.getID() + || pl1.chain == pl2.chain + ; + } + + + } // namespace mobject diff --git a/src/proc/mobject/placement.hpp b/src/proc/mobject/placement.hpp index 703ccc52a..1ebb966ac 100644 --- a/src/proc/mobject/placement.hpp +++ b/src/proc/mobject/placement.hpp @@ -240,14 +240,26 @@ namespace mobject { }; - string - format_PlacementID (Placement const&) ; - - /** @todo cleanup uses of ref-to-placement. See Ticket #115 */ typedef Placement PlacementMO; typedef Placement PMO; + + + + /* == free functions == */ - + string + format_PlacementID (PlacementMO const&) ; + + + /** compare the properties of placement + * @return \c true if all the LocatingPin entries + * in both placements are semantically equivalent. + */ + bool + isSameDef (PlacementMO const&, PlacementMO const&); + + + } // namespace mobject #endif diff --git a/src/proc/mobject/session/locatingpin.cpp b/src/proc/mobject/session/locatingpin.cpp index 9191c818f..f4e7ce954 100644 --- a/src/proc/mobject/session/locatingpin.cpp +++ b/src/proc/mobject/session/locatingpin.cpp @@ -146,8 +146,8 @@ namespace session { LocatingPin::Pipe LocatingPin::LocatingSolution::getPipe() { - UNIMPLEMENTED ("get effective Pipe of Solution"); - return Pipe (); + TODO ("implement Placement LocatingSolution"); + return asset::Pipe::query ("pipe(master)"); // yet another idiotic dummy } diff --git a/src/proc/mobject/session/locatingpin.hpp b/src/proc/mobject/session/locatingpin.hpp index 99d2c92b1..50e0160e3 100644 --- a/src/proc/mobject/session/locatingpin.hpp +++ b/src/proc/mobject/session/locatingpin.hpp @@ -167,8 +167,20 @@ protected: bool still_to_solve (); }; + + friend bool operator== (LocatingPin const&, LocatingPin const&); + }; + + /** check for equivalent definition of a complete locating chain */ + + inline bool + operator== (LocatingPin const& pin1, LocatingPin const& pin2) + { +//////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #511 really implement equivalence relation! + return pin1.resolve().first == pin2.resolve().first; + }