add call for placement equivalence check

actual functionality to be added later
This commit is contained in:
Fischlurch 2010-01-09 04:46:17 +01:00
parent 37499058f5
commit 96f19c656d
4 changed files with 41 additions and 7 deletions

View file

@ -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

View file

@ -240,14 +240,26 @@ namespace mobject {
};
string
format_PlacementID (Placement<MObject> const&) ;
/** @todo cleanup uses of ref-to-placement. See Ticket #115 */
typedef Placement<MObject> PlacementMO;
typedef Placement<MObject> 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

View file

@ -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
}

View file

@ -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;
}