diff options
Diffstat (limited to 'kig/objects/object_calcer.cc')
-rw-r--r-- | kig/objects/object_calcer.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kig/objects/object_calcer.cc b/kig/objects/object_calcer.cc index ae442aae..38c0b194 100644 --- a/kig/objects/object_calcer.cc +++ b/kig/objects/object_calcer.cc @@ -29,8 +29,8 @@ void ObjectTypeCalcer::calc( const KigDocument& doc ) { Args a; - a.reserve( mtqparents.size() ); - std::transform( mtqparents.begin(), mtqparents.end(), + a.reserve( mparents.size() ); + std::transform( mparents.begin(), mparents.end(), std::back_inserter( a ), std::mem_fun( &ObjectCalcer::imp ) ); ObjectImp* n = mtype->calc( a, doc ); delete mimp; @@ -38,10 +38,10 @@ void ObjectTypeCalcer::calc( const KigDocument& doc ) } ObjectTypeCalcer::ObjectTypeCalcer( const ObjectType* type, - const std::vector<ObjectCalcer*>& tqparents, bool sort ) - : mtqparents( ( sort )?type->sortArgs( tqparents ):tqparents ), mtype( type ), mimp( 0 ) + const std::vector<ObjectCalcer*>& parents, bool sort ) + : mparents( ( sort )?type->sortArgs( parents ):parents ), mtype( type ), mimp( 0 ) { - std::for_each( mtqparents.begin(), mtqparents.end(), + std::for_each( mparents.begin(), mparents.end(), std::bind2nd( std::mem_fun( &ObjectCalcer::addChild ), this ) ); } @@ -68,9 +68,9 @@ void ObjectConstCalcer::calc( const KigDocument& ) { } -std::vector<ObjectCalcer*> ObjectConstCalcer::tqparents() const +std::vector<ObjectCalcer*> ObjectConstCalcer::parents() const { - // we have no tqparents.. + // we have no parents.. return std::vector<ObjectCalcer*>(); } @@ -99,9 +99,9 @@ const ObjectImp* ObjectTypeCalcer::imp() const return mimp; } -std::vector<ObjectCalcer*> ObjectTypeCalcer::tqparents() const +std::vector<ObjectCalcer*> ObjectTypeCalcer::parents() const { - return mtqparents; + return mparents; } void ObjectCalcer::addChild( ObjectCalcer* c ) @@ -121,7 +121,7 @@ void ObjectCalcer::delChild( ObjectCalcer* c ) ObjectTypeCalcer::~ObjectTypeCalcer() { - std::for_each( mtqparents.begin(), mtqparents.end(), + std::for_each( mparents.begin(), mparents.end(), std::bind2nd( std::mem_fun( &ObjectCalcer::delChild ), this ) ); delete mimp; } @@ -154,7 +154,7 @@ const ObjectImp* ObjectPropertyCalcer::imp() const return mimp; } -std::vector<ObjectCalcer*> ObjectPropertyCalcer::tqparents() const +std::vector<ObjectCalcer*> ObjectPropertyCalcer::parents() const { std::vector<ObjectCalcer*> ret; ret.push_back( mtqparent ); @@ -197,7 +197,7 @@ const ObjectImpType* ObjectTypeCalcer::impRequirement( ObjectCalcer* o, const std::vector<ObjectCalcer*>& os ) const { Args args; - args.reserve( mtqparents.size() ); + args.reserve( mparents.size() ); std::transform( os.begin(), os.end(), std::back_inserter( args ), @@ -220,9 +220,9 @@ void ObjectTypeCalcer::setParents( const std::vector<ObjectCalcer*> np ) { std::for_each( np.begin(), np.end(), std::bind2nd( std::mem_fun( &ObjectCalcer::addChild ), this ) ); - std::for_each( mtqparents.begin(), mtqparents.end(), + std::for_each( mparents.begin(), mparents.end(), std::bind2nd( std::mem_fun( &ObjectCalcer::delChild ), this ) ); - mtqparents = np; + mparents = np; } void ObjectTypeCalcer::setType( const ObjectType* t ) @@ -270,7 +270,7 @@ void ObjectTypeCalcer::move( const Coordinate& to, const KigDocument& doc ) { // we need to check if type can in fact move, because this check is // not done for us in all circumstances ( e.g. LineABType::move uses - // move on its tqparents to move them ), and the ObjectType's depend + // move on its parents to move them ), and the ObjectType's depend // on move only being called if canMove() returns true.. if ( mtype->canMove( *this ) ) mtype->move( *this, to, doc ); @@ -310,9 +310,9 @@ bool ObjectPropertyCalcer::isDefinedOnOrThrough( const ObjectCalcer* o ) const bool ObjectTypeCalcer::isDefinedOnOrThrough( const ObjectCalcer* o ) const { Args args; - args.reserve( mtqparents.size() ); + args.reserve( mparents.size() ); std::transform( - mtqparents.begin(), mtqparents.end(), + mparents.begin(), mparents.end(), std::back_inserter( args ), std::mem_fun( &ObjectCalcer::imp ) ); if ( std::find( args.begin(), args.end(), o->imp() ) == args.end() ) |