void StringBufferAppender::operator()(Reference<StringBuffer>& storage, const String& s) { if( !storage ) { storage = Reference<StringBuffer>(new StringBuffer); } storage->append(s); }
QDomElement Reference::applyAttributeContext( const QDomElement &context ) const { if ( mSegments.count() == 1 ) { return context; } else { Reference r; Segment::List::ConstIterator it = mSegments.constBegin(); do { r.append( *it ); ++it; Segment::List::ConstIterator it2 = it; if ( ++it2 == mSegments.end() ) break; } while( it != mSegments.end() ); return r.applyElement( context ); } }
Reference Reference::operator+( const Reference::Segment &ref ) const { Reference r = *this; return r.append( ref ); }