Bump lib{cxml,dcp}.
[libsub.git] / src / stl_binary_tables.h
index 0a85dd8a4833e40e27cbdd788e5624c93e6dcf7c..4a6a7d86d6afa5ee236c7a0f51c7640ff58d9ee4 100644 (file)
 
 */
 
+#ifndef LIBSUB_STL_BINARY_TABLES_H
+#define LIBSUB_STL_BINARY_TABLES_H
+
 #include <string>
 #include <map>
+#include <boost/optional.hpp>
 
 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 T>
 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:
@@ -198,6 +208,9 @@ public:
        Comment comment_file_to_enum (int) const;
 
        std::string language_enum_to_file (Language) const;
+       int cumulative_status_enum_to_file (CumulativeStatus) const;
+       int justification_enum_to_file (Justification) const;
+       int comment_enum_to_file (Comment) const;
 
        std::string display_standard_enum_to_description (DisplayStandard) const;
        std::string language_group_enum_to_description (LanguageGroup) const;
@@ -207,7 +220,9 @@ public:
        std::string justification_enum_to_description (Justification) const;
        std::string comment_enum_to_description (Comment) const;
 
-private:       
+       boost::optional<Language> language_description_to_enum (std::string) const;
+
+private:
        std::map<std::string, STLBinaryCode<DisplayStandard> > _display_standard_map;
        std::map<std::string, STLBinaryCode<LanguageGroup> > _language_group_map;
        std::map<std::string, STLBinaryCode<Language> > _language_map;
@@ -218,3 +233,5 @@ private:
 };
 
 }
+
+#endif