Logo Search packages:      
Sourcecode: kmess version File versions  Download package

void DataSource::append ( char  byte  ) 

Insert a byte at the end of the data.

Parameters:
byte The byte to append

Definition at line 83 of file datasource.cpp.

References buffer_, and currentBitIndex_.

{
  bool wasEmpty = ( buffer_.size() == 0 );

  if( ! wasEmpty )
  {
    buffer_.seek( buffer_.size() );
  }

  if( buffer_.write( &byte, 1 ) != 1 )
  {
    qWarning() << "DataSource::append() - Write failed at buffer position" << buffer_.pos();
    return;
  }

  // Prepare the first byte to be read
  if( wasEmpty )
  {
    currentBitIndex_ = 8;
  }
}


Generated by  Doxygen 1.6.0   Back to index