X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_content_type.h;h=03a52e57ce00053a0d122b2a9eee93566e22128a;hb=6d716e405a0781c3d6cdc37d3718a8858faf3dd9;hp=eea698217ca5e59a79e0addbed9e1bf4211cf62f;hpb=f644c272a6a6384f6bfc6ca16ada6208057402a8;p=dcpomatic.git diff --git a/src/lib/dcp_content_type.h b/src/lib/dcp_content_type.h index eea698217..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; @@ -53,7 +60,7 @@ public: 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