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

libdar::infinint KDarConfig::libdarFirstSliceSize (  ) 

Returns the first slice size as a libdar::infinint.

Definition at line 1196 of file kdarConfig.cpp.

References media(), and kdar::toStdString().

Referenced by buildDarCommandLine(), and createArchiveThread::run().

{
    //code for calculating the slice size from strings and suffices.
    libdar::infinint libdarFirstSliceSize( (libdar::U_I) 0 );
    if ( m_splitArchive )
    {
        //Catch possible exception from libdar::infinint being too small (i.e. 32-bit or 64-bit)
        try
        {
            libdarFirstSliceSize = libdar::deci( kdar::toStdString( mediaFirstSizes[ media() ] ) ).computer()*libdar::infinint( (libdar::U_I) 1024 ).power( (libdar::U_I) mediaFirstSuffices[ media() ] );
            kdDebug() << "The slice size is " << libdar::deci(libdarFirstSliceSize).human().c_str() << endl;
        }
        catch(libdar::Egeneric &e)
        {
// TODO What is the best way to display this info to the user?
//             libdar::user_interaction_warning(e.get_message());
        }
    }
    return libdarFirstSliceSize;
}


Generated by  Doxygen 1.6.0   Back to index