summaryrefslogtreecommitdiff
path: root/src/lib/collator.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-08-17 17:45:35 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-19 00:27:47 +0200
commite90ff462412902a1e06878a0f34dc2e0323e738c (patch)
tree20aafc1aa9f1c34a7e48eb92efe9027dbf442a34 /src/lib/collator.h
parentce408c272e0f5ae211dd15b7b3bbaf6776a6b899 (diff)
Extract Collator class.
Diffstat (limited to 'src/lib/collator.h')
-rw-r--r--src/lib/collator.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/lib/collator.h b/src/lib/collator.h
new file mode 100644
index 000000000..3762f2400
--- /dev/null
+++ b/src/lib/collator.h
@@ -0,0 +1,49 @@
+/*
+ Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#ifndef DCPOMATIC_COLLATOR_H
+#define DCPOMATIC_COLLATOR_H
+
+
+#include <string>
+
+
+struct UCollator;
+
+
+class Collator
+{
+public:
+ Collator();
+ ~Collator();
+
+ Collator(Collator const &) = delete;
+ Collator& operator=(Collator const&) = delete;
+
+ int compare(std::string const& utf8_a, std::string const& utf8_b);
+
+private:
+ UCollator* _collator = nullptr;
+};
+
+
+#endif
+