X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_content_type.h;h=03a52e57ce00053a0d122b2a9eee93566e22128a;hb=38e89b25f6042d7a9dc023bbdeff98b09cbdd26f;hp=5607475c07b26d3b5e19ab0022e11eed0438c7ca;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/lib/dcp_content_type.h b/src/lib/dcp_content_type.h index 5607475c0..03a52e57c 100644 --- a/src/lib/dcp_content_type.h +++ b/src/lib/dcp_content_type.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,25 +18,32 @@ */ + #ifndef DCPOMATIC_DCP_CONTENT_TYPE_H #define DCPOMATIC_DCP_CONTENT_TYPE_H + /** @file src/dcp_content_type.h * @brief DCPContentType class. */ + #include #include #include + /** @class DCPContentType * @brief A description of the type of content for a DCP (e.g. feature, trailer etc.) */ -class DCPContentType : public boost::noncopyable +class DCPContentType { public: DCPContentType (std::string, dcp::ContentKind, std::string); + DCPContentType (DCPContentType const&) = delete; + DCPContentType& operator= (DCPContentType const&) = delete; + /** @return user-visible `pretty' name */ std::string pretty_name () const { return _pretty_name; @@ -50,10 +57,10 @@ public: return _isdcf_name; } - static DCPContentType const * from_pretty_name (std::string); static DCPContentType const * from_isdcf_name (std::string); + static DCPContentType const * from_libdcp_kind (dcp::ContentKind); static DCPContentType const * from_index (int); - static int as_index (DCPContentType const *); + static boost::optional as_index (DCPContentType const *); static std::vector all (); static void setup_dcp_content_types (); @@ -66,4 +73,5 @@ private: static std::vector _dcp_content_types; }; + #endif