Logo Search packages:      
Sourcecode: djvulibre version File versions

GP< DataPool > DataPool::create ( const GURL url,
int  start = 0,
int  length = -1 
) [static]

Initializes the DataPool# in slave mode and connects it to the specified offsets range of the specified file. It is equivalent to calling default constructor and function {connect}().

Parameters:
url Name of the file to connect to.
start Beginning of the offsets range which the DataPool# is mapped into
length Length of the offsets range. If negative, the range is assumed to extend up to the end of the file.

Definition at line 799 of file DataPool.cpp.

References connect(), FCPools::get_pool(), and init().

{
  DEBUG_MSG("DataPool::DataPool: furl='" << furl << "' start=" << start << " length= " << length << "\n");
  DEBUG_MAKE_INDENT(3);

  GP<DataPool> retval=FCPools::get()->get_pool(furl,start,length);
  if(! retval)
  {
    DataPool *pool=new DataPool();
    retval=pool;
    pool->init();
    pool->connect(furl, start, length);
  }
  return retval;
}


Generated by  Doxygen 1.6.0   Back to index