X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fstl_binary_tables.h;h=4a6a7d86d6afa5ee236c7a0f51c7640ff58d9ee4;hb=17269578ff0164ffacf062d9a6e923eaf5f79ab3;hp=3118b024b8caa11a2918362264443dcbad6256ca;hpb=b365da4229b2a9d0ceef632af6880a38ecb65325;p=libsub.git diff --git a/src/stl_binary_tables.h b/src/stl_binary_tables.h index 3118b02..4a6a7d8 100644 --- a/src/stl_binary_tables.h +++ b/src/stl_binary_tables.h @@ -17,8 +17,12 @@ */ +#ifndef LIBSUB_STL_BINARY_TABLES_H +#define LIBSUB_STL_BINARY_TABLES_H + #include #include +#include namespace sub { @@ -28,7 +32,7 @@ enum DisplayStandard { DISPLAY_STANDARD_LEVEL_1_TELETEXT, DISPLAY_STANDARD_LEVEL_2_TELETEXT }; - + enum LanguageGroup { LANGUAGE_GROUP_LATIN, LANGUAGE_GROUP_LATIN_CYRILLIC, @@ -167,6 +171,9 @@ enum Comment { COMMENT_YES }; +/** @class STLBinaryCode + * @brief A value of some STL parameter and a human-readable description of what it means. + */ template class STLBinaryCode { @@ -179,11 +186,14 @@ public: : value (v) , description (d) {} - + T value; std::string description; }; +/** @class STLBinaryTables + * @brief A set of conversion tables for STL binary files. + */ class STLBinaryTables { public: @@ -210,7 +220,9 @@ public: std::string justification_enum_to_description (Justification) const; std::string comment_enum_to_description (Comment) const; -private: + boost::optional language_description_to_enum (std::string) const; + +private: std::map > _display_standard_map; std::map > _language_group_map; std::map > _language_map; @@ -221,3 +233,5 @@ private: }; } + +#endif