Example #1
0
		void StringBufferAppender::operator()(Reference<StringBuffer>& storage, const String& s)
		{
			if( !storage )
			{
				storage = Reference<StringBuffer>(new StringBuffer);
			}
			storage->append(s);
		}
Example #2
0
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 );
  }
}
Example #3
0
Reference Reference::operator+( const Reference::Segment &ref ) const
{
  Reference r = *this;
  return r.append( ref );
}