Tidying.
[libdcp.git] / src / verify.h
index ad733b01aaef2a4f5537c37bc19da5cb36d068fd..0a8b39ca03e6cbad3d97bccdf1c73b2630f196e0 100644 (file)
     files in the program, then also delete it here.
 */
 
+
+/** @file  src/verify.h
+ *  @brief dcp::verify() method and associated code
+ */
+
+
 #ifndef LIBDCP_VERIFY_H
 #define LIBDCP_VERIFY_H
 
+
 #include <boost/filesystem.hpp>
 #include <boost/function.hpp>
 #include <boost/optional.hpp>
 #include <string>
 #include <vector>
 
+
+/* Something in windows.h defines this */
+#undef ERROR
+
+
 namespace dcp {
 
+
 class VerificationNote
 {
 public:
        /* I've been unable to make mingw happy with ERROR as a symbol, so
           I'm using a VERIFY_ prefix here.
        */
-       enum Type {
-               VERIFY_ERROR,
-               VERIFY_BV21_ERROR, ///< may not always be considered an error, but violates a "shall" requirement of Bv2.1
-               VERIFY_WARNING
+       enum class Type {
+               ERROR,
+               BV21_ERROR, ///< may not always be considered an error, but violates a "shall" requirement of Bv2.1
+               WARNING
        };
 
        /** Codes for errors or warnings from verifying DCPs.
@@ -74,7 +87,7 @@ public:
         *  Comments should clarify meaning and also say which of the optional fields (e.g. file)
         *  are filled in when this code is used.
         */
-       enum Code {
+       enum class Code {
                /** An error when reading the DCP.
                 *  note contains (probably technical) details.
                 */
@@ -370,6 +383,7 @@ private:
        boost::optional<uint64_t> _line;
 };
 
+
 std::vector<VerificationNote> verify (
        std::vector<boost::filesystem::path> directories,
        boost::function<void (std::string, boost::optional<boost::filesystem::path>)> stage,
@@ -383,6 +397,8 @@ bool operator== (dcp::VerificationNote const& a, dcp::VerificationNote const& b)
 
 std::ostream& operator<<(std::ostream& s, dcp::VerificationNote const& note);
 
+
 }
 
+
 #endif