diff options
Diffstat (limited to 'kig/misc/object_hierarchy.cc')
-rw-r--r-- | kig/misc/object_hierarchy.cc | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kig/misc/object_hierarchy.cc b/kig/misc/object_hierarchy.cc index 9b5a09a8..e72a3c19 100644 --- a/kig/misc/object_hierarchy.cc +++ b/kig/misc/object_hierarchy.cc @@ -186,21 +186,21 @@ class FetchPropertyNode : public ObjectHierarchy::Node { mutable int mpropid; - int mtqparent; + int mparent; const TQCString mname; public: - // propid is a cache of the location of name in the tqparent's + // propid is a cache of the location of name in the parent's // propertiesInternalNames(), just as it is in PropertyObject. We // don't want to ever save this value, since we cannot guarantee it // remains consistent if we add properties some place.. - FetchPropertyNode( const int tqparent, const TQCString& name, const int propid = -1 ) - : mpropid( propid ), mtqparent( tqparent ), mname( name ) {} + FetchPropertyNode( const int parent, const TQCString& name, const int propid = -1 ) + : mpropid( propid ), mparent( parent ), mname( name ) {} ~FetchPropertyNode(); Node* copy() const; void checkDependsOnGiven( std::vector<bool>& dependsstack, int loc ) const; void checkArgumentsUsed( std::vector<bool>& usedstack ) const; - int tqparent() const { return mtqparent; } + int parent() const { return mparent; } const TQCString& propinternalname() const { return mname; } int id() const; @@ -215,17 +215,17 @@ FetchPropertyNode::~FetchPropertyNode() void FetchPropertyNode::checkArgumentsUsed( std::vector<bool>& usedstack ) const { - usedstack[mtqparent] = true; + usedstack[mparent] = true; } void FetchPropertyNode::checkDependsOnGiven( std::vector<bool>& dependsstack, int loc ) const { - dependsstack[loc] = dependsstack[mtqparent]; + dependsstack[loc] = dependsstack[mparent]; } ObjectHierarchy::Node* FetchPropertyNode::copy() const { - return new FetchPropertyNode( mtqparent, mname, mpropid ); + return new FetchPropertyNode( mparent, mname, mpropid ); } int FetchPropertyNode::id() const @@ -236,10 +236,10 @@ int FetchPropertyNode::id() const void FetchPropertyNode::apply( std::vector<const ObjectImp*>& stack, int loc, const KigDocument& d ) const { - assert( stack[mtqparent] ); - if ( mpropid == -1 ) mpropid = stack[mtqparent]->propertiesInternalNames().findIndex( mname ); + assert( stack[mparent] ); + if ( mpropid == -1 ) mpropid = stack[mparent]->propertiesInternalNames().findIndex( mname ); if ( mpropid != -1 ) - stack[loc] = stack[mtqparent]->property( mpropid, d ); + stack[loc] = stack[mparent]->property( mpropid, d ); else stack[loc] = new InvalidImp(); } @@ -247,9 +247,9 @@ void FetchPropertyNode::apply( std::vector<const ObjectImp*>& stack, void FetchPropertyNode::apply( std::vector<ObjectCalcer*>& stack, int loc ) const { if ( mpropid == -1 ) - mpropid = stack[mtqparent]->imp()->propertiesInternalNames().findIndex( mname ); + mpropid = stack[mparent]->imp()->propertiesInternalNames().findIndex( mname ); assert( mpropid != -1 ); - stack[loc] = new ObjectPropertyCalcer( stack[mtqparent], mpropid ); + stack[loc] = new ObjectPropertyCalcer( stack[mparent], mpropid ); } std::vector<ObjectImp*> ObjectHierarchy::calc( const Args& a, const KigDocument& doc ) const @@ -408,7 +408,7 @@ ObjectHierarchy::ObjectHierarchy( const std::vector<ObjectCalcer*>& from, const init( from, to ); } -void ObjectHierarchy::serialize( TQDomElement& tqparent, TQDomDocument& doc ) const +void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) const { int id = 1; for ( uint i = 0; i < mnumberofargs; ++i ) @@ -424,7 +424,7 @@ void ObjectHierarchy::serialize( TQDomElement& tqparent, TQDomDocument& doc ) co // TQDomElement ss = doc.createElement( "SelectStatement" ); // ss.appendChild( doc.createTextNode( TQString::tqfromLatin1(mselectstatements[i].c_str() ) ) ); // e.appendChild( ss ); - tqparent.appendChild( e ); + parent.appendChild( e ); } for ( uint i = 0; i < mnodes.size(); ++i ) @@ -440,9 +440,9 @@ void ObjectHierarchy::serialize( TQDomElement& tqparent, TQDomDocument& doc ) co e.setAttribute( "type", TQString::tqfromLatin1( node->type()->fullName() ) ); for ( uint i = 0; i < node->parents().size(); ++i ) { - int tqparent = node->parents()[i] + 1; + int parent = node->parents()[i] + 1; TQDomElement arge = doc.createElement( "arg" ); - arge.appendChild( doc.createTextNode( TQString::number( tqparent ) ) ); + arge.appendChild( doc.createTextNode( TQString::number( parent ) ) ); e.appendChild( arge ); }; } @@ -452,7 +452,7 @@ void ObjectHierarchy::serialize( TQDomElement& tqparent, TQDomDocument& doc ) co e.setAttribute( "action", "fetch-property" ); e.setAttribute( TQString("property"), TQString(node->propinternalname()) ); TQDomElement arge = doc.createElement( "arg" ); - arge.appendChild( doc.createTextNode( TQString::number( node->tqparent() + 1 ) ) ); + arge.appendChild( doc.createTextNode( TQString::number( node->parent() + 1 ) ) ); e.appendChild( arge ); } else @@ -464,7 +464,7 @@ void ObjectHierarchy::serialize( TQDomElement& tqparent, TQDomDocument& doc ) co e.setAttribute( "type", type ); }; - tqparent.appendChild( e ); + parent.appendChild( e ); }; } @@ -473,7 +473,7 @@ ObjectHierarchy::ObjectHierarchy() { } -ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& tqparent, TQString& error ) +ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& parent, TQString& error ) { #define KIG_GENERIC_PARSE_ERROR \ { \ @@ -486,7 +486,7 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& bool ok = true; TQString tmp; - TQDomElement e = tqparent.firstChild().toElement(); + TQDomElement e = parent.firstChild().toElement(); for (; !e.isNull(); e = e.nextSibling().toElement() ) { if ( e.tagName() != "input" ) break; @@ -565,9 +565,9 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& // FetchPropertyNode TQCString propname = e.attribute( "property" ).latin1(); TQDomElement arge = e.firstChild().toElement(); - int tqparent = arge.text().toInt( &ok ); + int parent = arge.text().toInt( &ok ); if ( !ok ) KIG_GENERIC_PARSE_ERROR; - newnode = new FetchPropertyNode( tqparent - 1, propname ); + newnode = new FetchPropertyNode( parent - 1, propname ); } else { @@ -723,12 +723,12 @@ int ObjectHierarchy::storeObject( const ObjectCalcer* o, const std::vector<Objec } else if ( (uint) pl[i] < mnumberofargs ) { - ObjectCalcer* tqparent = o->parents()[i]; + ObjectCalcer* parent = o->parents()[i]; std::vector<ObjectCalcer*> opl = o->parents(); margrequirements[pl[i]] = lowermost( margrequirements[pl[i]], - o->impRequirement( tqparent, opl ) ); + o->impRequirement( parent, opl ) ); musetexts[pl[i]] = margrequirements[pl[i]]->selectStatement(); }; }; @@ -737,12 +737,12 @@ int ObjectHierarchy::storeObject( const ObjectCalcer* o, const std::vector<Objec else if ( dynamic_cast<const ObjectPropertyCalcer*>( o ) ) { assert( pl.size() == 1 ); - int tqparent = pl.front(); + int parent = pl.front(); ObjectCalcer* op = po.front(); assert( op ); uint propid = static_cast<const ObjectPropertyCalcer*>( o )->propId(); assert( propid < op->imp()->propertiesInternalNames().size() ); - mnodes.push_back( new FetchPropertyNode( tqparent, op->imp()->propertiesInternalNames()[propid], propid ) ); + mnodes.push_back( new FetchPropertyNode( parent, op->imp()->propertiesInternalNames()[propid], propid ) ); } else assert( false ); |