pelican/data/src/DataRequirements.cpp
/**
 * @details
 * Computes a hash of the requirements lists for use as a key with QHash.
 */
@details
Computes a hash of the requirements lists for use as a key with QHash.
@details Computes a hash of the requirements lists for use as a key with QHash .
uint DataRequirements::hash() const
{
    if (_hash == 0) {
        QStringList requiredCopy = _requiredData.values();
        QStringList optionalCopy = _optionalData.values();
        qSort(requiredCopy.begin(), requiredCopy.end() );
        qSort(optionalCopy.begin(), optionalCopy.end() );
        _hash = qHash(requiredCopy.join(QString()) + optionalCopy.join(QString()));
    }
    return _hash;
}
uint DataRequirements :: hash ( ) const { if ( _hash == 0 ) { QStringList requiredCopy = _requiredData . values ( ) ; QStringList optionalCopy = _optionalData . values ( ) ; qSort ( requiredCopy . begin ( ) , requiredCopy . end ( ) ) ; qSort ( optionalCopy . begin ( ) , optionalCopy . end ( ) ) ; _hash = qHash ( requiredCopy . join ( QString ( ) ) + optionalCopy . join ( QString ( ) ) ) ; } return _hash ; }
@details
 Computes a hash of the requirements lists for use as a key with QHash.
@details Computes a hash of the requirements lists for use as a key with QHash .
/* Sort the requirements lists before recomputing the hash */