Logo Search packages:      
Sourcecode: djvulibre version File versions

void DataPool::add_data ( const void *  buffer,
int  size 
)

Appends the new block of data to the DataPool#. There are two {add_data}() functions available. One is for adding data sequentially. It keeps track of the last byte position, which has been stored { by it} and always appends the next block after this position. The other {add_data}() can store data anywhere.

The function will unblock readers waiting for data if this data arrives with this block. It may also trigger some {trigger callbacks}, which may have been added by means of {add_trigger}() function.

{ Note:} After all the data has been added, it's necessary to call {set_eof}() to tell the DataPool# that nothing else is expected.

{ Note:} This function may not be called if the DataPool# has been connected to something.

Parameters:
buffer data to append
size length of the {buffer}

Definition at line 1015 of file DataPool.cpp.

Referenced by connect().

{
   DEBUG_MSG("DataPool::add_data(): adding " << size << " bytes of data...\n");
   DEBUG_MAKE_INDENT(3);

   add_data(buffer, add_at, size);
   add_at+=size;
}


Generated by  Doxygen 1.6.0   Back to index