2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef DCPOMATIC_DCP_CONTENT_TYPE_H
22 #define DCPOMATIC_DCP_CONTENT_TYPE_H
24 /** @file src/dcp_content_type.h
25 * @brief DCPContentType class.
32 /** @class DCPContentType
33 * @brief A description of the type of content for a DCP (e.g. feature, trailer etc.)
35 class DCPContentType : public boost::noncopyable
38 DCPContentType (std::string, dcp::ContentKind, std::string);
40 /** @return user-visible `pretty' name */
41 std::string pretty_name () const {
45 dcp::ContentKind libdcp_kind () const {
49 std::string isdcf_name () const {
53 static DCPContentType const * from_isdcf_name (std::string);
54 static DCPContentType const * from_libdcp_kind (dcp::ContentKind);
55 static DCPContentType const * from_index (int);
56 static int as_index (DCPContentType const *);
57 static std::vector<DCPContentType const *> all ();
58 static void setup_dcp_content_types ();
61 std::string _pretty_name;
62 dcp::ContentKind _libdcp_kind;
63 std::string _isdcf_name;
65 /** All available DCP content types */
66 static std::vector<DCPContentType const *> _dcp_content_types;