X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flanguage_tag.h;h=6b4bebe63c7d43c0fca67adce4e270aa8c29eff3;hb=b68a460c3ef877d95c0939b5ee02928f35e9f263;hp=06134b036d75c8698cd669c8dac585a0e5fc1013;hpb=9691fc54fa6a3409520a1a42e6eeb8e6a235f5f6;p=libdcp.git diff --git a/src/language_tag.h b/src/language_tag.h index 06134b03..6b4bebe6 100644 --- a/src/language_tag.h +++ b/src/language_tag.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of libdcp. @@ -31,6 +31,12 @@ 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 @@ -106,7 +112,7 @@ public: LanguageSubtag (char const* subtag) : Subtag(subtag, SubtagType::LANGUAGE) {} - SubtagType type () const { + SubtagType type () const override { return SubtagType::LANGUAGE; } }; @@ -119,7 +125,7 @@ public: ScriptSubtag (char const* subtag) : Subtag(subtag, SubtagType::SCRIPT) {} - SubtagType type () const { + SubtagType type () const override { return SubtagType::SCRIPT; } }; @@ -132,7 +138,7 @@ public: RegionSubtag (char const* subtag) : Subtag(subtag, SubtagType::REGION) {} - SubtagType type () const { + SubtagType type () const override { return SubtagType::REGION; } }; @@ -145,7 +151,7 @@ public: VariantSubtag (char const* subtag) : Subtag(subtag, SubtagType::VARIANT) {} - SubtagType type () const { + SubtagType type () const override { return SubtagType::VARIANT; } @@ -162,7 +168,7 @@ public: ExtlangSubtag (char const* subtag) : Subtag(subtag, SubtagType::EXTLANG) {} - SubtagType type () const { + SubtagType type () const override { return SubtagType::EXTLANG; } @@ -232,12 +238,20 @@ private: std::vector _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> dcnc_tags (); + + } + #endif