[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-02-01 22:25:45
[Download RAW message or body]
CVS commit by domi:
adapt to meet my new insights ;)
M +5 -11 locus_imp.cc 1.1.2.4
M +2 -2 locus_imp.h 1.1.2.3
--- kdeedu/kig/objects/locus_imp.cc #1.1.2.3:1.1.2.4
@@ -28,5 +28,4 @@
LocusImp::~LocusImp()
{
- delete mhier;
}
@@ -43,5 +42,5 @@ ObjectImp* LocusImp::transform( const Tr
void LocusImp::draw( KigPainter& p ) const
{
- p.drawLocus( mcurve, *mhier );
+ p.drawLocus( mcurve, mhier );
}
@@ -75,5 +74,5 @@ const Coordinate LocusImp::getPoint( dou
Args args;
args.push_back( &argimp );
- ObjectImp* imp = mhier->calc( args );
+ ObjectImp* imp = mhier.calc( args );
Coordinate ret;
if ( imp->inherits( ObjectImp::ID_PointImp ) )
@@ -83,12 +82,7 @@ const Coordinate LocusImp::getPoint( dou
}
-LocusImp::LocusImp( const Object* movingpoint, const Object* tracingpoint )
- : mcurve( 0 ), mhier( new ObjectHierarchy( Objects( const_cast<Object*>( movingpoint ) ),
- tracingpoint ) )
+LocusImp::LocusImp( const CurveImp* curve, const ObjectHierarchy& hier )
+ : mcurve( curve ), mhier( hier )
{
- // 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() );
}
--- kdeedu/kig/objects/locus_imp.h #1.1.2.2:1.1.2.3
@@ -29,9 +29,9 @@ class LocusImp
typedef CurveImp Parent;
const CurveImp* mcurve;
- ObjectHierarchy* mhier;
+ const ObjectHierarchy& mhier;
protected:
~LocusImp();
public:
- LocusImp( const Object* movingpoint, const Object* tracingpoint );
+ LocusImp( const CurveImp*, const ObjectHierarchy& );
bool inherits( int type ) const;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic