[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    make_it_cool: kdeedu/kig/objects
From:       Dominique Devriese <devriese () kde ! org>
Date:       2003-01-31 23:48:10
[Download RAW message or body]

CVS commit by domi: 

implement LocusImp's ctor..


  M +11 -0     locus_imp.cc   1.1.2.3


--- kdeedu/kig/objects/locus_imp.cc  #1.1.2.2:1.1.2.3
@@ -21,4 +21,5 @@
 #include "bogus_imp.h"
 #include "point_imp.h"
+#include "object.h"
 #include "../misc/object_hierarchy.h"
 #include "../misc/kigpainter.h"
@@ -80,4 +81,14 @@ const Coordinate LocusImp::getPoint( dou
   delete imp;
   return ret;
+}
+
+LocusImp::LocusImp( const Object* movingpoint, const Object* tracingpoint )
+  : mcurve( 0 ), mhier( new ObjectHierarchy( Objects( const_cast<Object*>( movingpoint ) ),
+                                             tracingpoint ) )
+{
+  // the ObjectType should make sure we have a ConstrainedPointImp
+  // parent, we just assert it..
+  assert( movingpoint->has( ObjectImp::ID_PointImp ) && movingpoint->parents().size() == 0 );
+  mcurve = static_cast<const CurveImp*>( movingpoint->parents().front()->imp() );
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic