/*
- Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
+
+/** @file src/language_tag.cc
+ * @brief LanguageTag class
+ */
+
+
#ifndef LIBDCP_LANGUAGE_TAG_H
#define LIBDCP_LANGUAGE_TAG_H
LanguageSubtag (char const* subtag)
: Subtag(subtag, SubtagType::LANGUAGE) {}
- SubtagType type () const {
+ SubtagType type () const override {
return SubtagType::LANGUAGE;
}
};
ScriptSubtag (char const* subtag)
: Subtag(subtag, SubtagType::SCRIPT) {}
- SubtagType type () const {
+ SubtagType type () const override {
return SubtagType::SCRIPT;
}
};
RegionSubtag (char const* subtag)
: Subtag(subtag, SubtagType::REGION) {}
- SubtagType type () const {
+ SubtagType type () const override {
return SubtagType::REGION;
}
};
VariantSubtag (char const* subtag)
: Subtag(subtag, SubtagType::VARIANT) {}
- SubtagType type () const {
+ SubtagType type () const override {
return SubtagType::VARIANT;
}
ExtlangSubtag (char const* subtag)
: Subtag(subtag, SubtagType::EXTLANG) {}
- SubtagType type () const {
+ SubtagType type () const override {
return SubtagType::EXTLANG;
}
std::vector<ExtlangSubtag> _extlangs;
};
+
extern bool operator==(dcp::LanguageTag const& a, dcp::LanguageTag const& b);
+extern bool operator!=(dcp::LanguageTag const& a, dcp::LanguageTag const& b);
+extern bool operator<(dcp::LanguageTag const& a, dcp::LanguageTag const& b);
extern std::ostream& operator<<(std::ostream& os, dcp::LanguageTag const& tag);
extern void load_language_tag_lists (boost::filesystem::path tags_directory);
+
+extern std::vector<std::pair<std::string, std::string>> dcnc_tags ();
+
+
}
+
#endif