{
public:
Asset ();
- Asset (boost::filesystem::path file);
+ explicit Asset (boost::filesystem::path file);
Asset (std::string id, boost::filesystem::path file);
virtual bool equals (
class AssetReader : public boost::noncopyable
{
public:
- AssetReader (MXF const * mxf);
+ explicit AssetReader (MXF const * mxf);
virtual ~AssetReader ();
protected:
class AtmosAsset : public Asset, public MXF
{
public:
- AtmosAsset (boost::filesystem::path file);
+ explicit AtmosAsset (boost::filesystem::path file);
std::string pkl_type (Standard) const;
, _extra_data (false)
{}
- Certificate (std::string);
- Certificate (X509 *);
+ explicit Certificate (std::string);
+ explicit Certificate (X509 *);
Certificate (Certificate const &);
~Certificate ();
{
public:
CPL (std::string annotation_text, ContentKind content_kind);
- CPL (boost::filesystem::path file);
+ explicit CPL (boost::filesystem::path file);
bool equals (
boost::shared_ptr<const Asset> other,
{
public:
Data ();
- Data (int size);
+ explicit Data (int size);
Data (uint8_t const * data, int size);
Data (boost::shared_array<uint8_t> data, int size);
- Data (boost::filesystem::path file);
+ explicit Data (boost::filesystem::path file);
virtual ~Data () {}
*
* @param directory Directory containing the DCP's files.
*/
- DCP (boost::filesystem::path directory);
+ explicit DCP (boost::filesystem::path directory);
typedef std::list<boost::shared_ptr<DCPReadError> > ReadErrors;
public:
Signer () {}
- Signer (shared_ptr<const cxml::Node> node)
+ explicit Signer (shared_ptr<const cxml::Node> node)
: x509_issuer_name (node->string_child ("X509IssuerName"))
, x509_serial_number (node->string_child ("X509SerialNumber"))
{
public:
X509Data () {}
- X509Data (boost::shared_ptr<const cxml::Node> node)
+ explicit X509Data (boost::shared_ptr<const cxml::Node> node)
: x509_issuer_serial (Signer (node->node_child ("X509IssuerSerial")))
, x509_certificate (node->string_child ("X509Certificate"))
{
public:
Reference () {}
- Reference (string u)
+ explicit Reference (string u)
: uri (u)
{}
- Reference (shared_ptr<const cxml::Node> node)
+ explicit Reference (shared_ptr<const cxml::Node> node)
: uri (node->string_attribute ("URI"))
, digest_value (node->string_child ("DigestValue"))
{
, authenticated_private ("#ID_AuthenticatedPrivate")
{}
- SignedInfo (shared_ptr<const cxml::Node> node)
+ explicit SignedInfo (shared_ptr<const cxml::Node> node)
{
list<shared_ptr<cxml::Node> > references = node->node_children ("Reference");
for (list<shared_ptr<cxml::Node> >::const_iterator i = references.begin(); i != references.end(); ++i) {
public:
Signature () {}
- Signature (shared_ptr<const cxml::Node> node)
+ explicit Signature (shared_ptr<const cxml::Node> node)
: signed_info (node->node_child ("SignedInfo"))
, signature_value (node->string_child ("SignatureValue"))
{
public:
AuthenticatedPrivate () {}
- AuthenticatedPrivate (shared_ptr<const cxml::Node> node)
+ explicit AuthenticatedPrivate (shared_ptr<const cxml::Node> node)
{
list<shared_ptr<cxml::Node> > encrypted_key_nodes = node->node_children ("EncryptedKey");
for (list<shared_ptr<cxml::Node> >::const_iterator i = encrypted_key_nodes.begin(); i != encrypted_key_nodes.end(); ++i) {
public:
TypedKeyId () {}
- TypedKeyId (shared_ptr<const cxml::Node> node)
+ explicit TypedKeyId (shared_ptr<const cxml::Node> node)
: key_type (node->string_child ("KeyType"))
, key_id (remove_urn_uuid (node->string_child ("KeyId")))
{
public:
KeyIdList () {}
- KeyIdList (shared_ptr<const cxml::Node> node)
+ explicit KeyIdList (shared_ptr<const cxml::Node> node)
{
list<shared_ptr<cxml::Node> > typed_key_id_nodes = node->node_children ("TypedKeyId");
for (list<shared_ptr<cxml::Node> >::const_iterator i = typed_key_id_nodes.begin(); i != typed_key_id_nodes.end(); ++i) {
public:
AuthorizedDeviceInfo () {}
- AuthorizedDeviceInfo (shared_ptr<const cxml::Node> node)
+ explicit AuthorizedDeviceInfo (shared_ptr<const cxml::Node> node)
: device_list_identifier (remove_urn_uuid (node->string_child ("DeviceListIdentifier")))
, device_list_description (node->optional_string_child ("DeviceListDescription"))
{
public:
X509IssuerSerial () {}
- X509IssuerSerial (shared_ptr<const cxml::Node> node)
+ explicit X509IssuerSerial (shared_ptr<const cxml::Node> node)
: x509_issuer_name (node->string_child ("X509IssuerName"))
, x509_serial_number (node->string_child ("X509SerialNumber"))
{
public:
Recipient () {}
- Recipient (shared_ptr<const cxml::Node> node)
+ explicit Recipient (shared_ptr<const cxml::Node> node)
: x509_issuer_serial (node->node_child ("X509IssuerSerial"))
, x509_subject_name (node->string_child ("X509SubjectName"))
{
public:
KDMRequiredExtensions () {}
- KDMRequiredExtensions (shared_ptr<const cxml::Node> node)
+ explicit KDMRequiredExtensions (shared_ptr<const cxml::Node> node)
: recipient (node->node_child ("Recipient"))
, composition_playlist_id (remove_urn_uuid (node->string_child ("CompositionPlaylistId")))
, content_title_text (node->string_child ("ContentTitleText"))
public:
RequiredExtensions () {}
- RequiredExtensions (shared_ptr<const cxml::Node> node)
+ explicit RequiredExtensions (shared_ptr<const cxml::Node> node)
: kdm_required_extensions (node->node_child ("KDMRequiredExtensions"))
{
, issue_date (LocalTime().as_string ())
{}
- AuthenticatedPublic (shared_ptr<const cxml::Node> node)
+ explicit AuthenticatedPublic (shared_ptr<const cxml::Node> node)
: message_id (remove_urn_uuid (node->string_child ("MessageId")))
, annotation_text (node->optional_string_child ("AnnotationText"))
, issue_date (node->string_child ("IssueDate"))
}
- EncryptedKDMData (shared_ptr<const cxml::Node> node)
+ explicit EncryptedKDMData (shared_ptr<const cxml::Node> node)
: authenticated_public (node->node_child ("AuthenticatedPublic"))
, authenticated_private (node->node_child ("AuthenticatedPrivate"))
, signature (node->node_child ("Signature"))
class EncryptedKDM
{
public:
- EncryptedKDM (std::string);
+ explicit EncryptedKDM (std::string);
EncryptedKDM (EncryptedKDM const & kdm);
EncryptedKDM & operator= (EncryptedKDM const &);
~EncryptedKDM ();
class MiscError : public std::runtime_error
{
public:
- MiscError (std::string message)
+ explicit MiscError (std::string message)
: std::runtime_error (message)
{}
};
class DCPReadError : public std::runtime_error
{
public:
- DCPReadError (std::string message)
+ explicit DCPReadError (std::string message)
: std::runtime_error (message)
{}
};
class XMLError : public std::runtime_error
{
public:
- XMLError (std::string message)
+ explicit XMLError (std::string message)
: std::runtime_error (message)
{}
};
class UnresolvedRefError : public std::runtime_error
{
public:
- UnresolvedRefError (std::string id);
+ explicit UnresolvedRefError (std::string id);
};
/** @class TimeFormatError
class TimeFormatError : public std::runtime_error
{
public:
- TimeFormatError (std::string bad_time);
+ explicit TimeFormatError (std::string bad_time);
};
/** @class NotEncryptedError
class NotEncryptedError : public std::runtime_error
{
public:
- NotEncryptedError (std::string const & what);
+ explicit NotEncryptedError (std::string const & what);
~NotEncryptedError () throw () {}
};
class File : public boost::noncopyable
{
public:
- File (boost::filesystem::path file);
+ explicit File (boost::filesystem::path file);
~File ();
uint8_t* data () const {
{}
FontNode (cxml::ConstNodePtr node, int tcr, std::string font_id_attribute);
- FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes);
+ explicit FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes);
std::string text;
boost::optional<std::string> id;
class GammaTransferFunction : public TransferFunction
{
public:
- GammaTransferFunction (double gamma);
+ explicit GammaTransferFunction (double gamma);
double gamma () const {
return _gamma;
public:
InteropLoadFontNode () {}
InteropLoadFontNode (std::string id, std::string uri);
- InteropLoadFontNode (cxml::ConstNodePtr node);
+ explicit InteropLoadFontNode (cxml::ConstNodePtr node);
std::string uri;
};
{
public:
InteropSubtitleAsset ();
- InteropSubtitleAsset (boost::filesystem::path file);
+ explicit InteropSubtitleAsset (boost::filesystem::path file);
bool equals (
boost::shared_ptr<const Asset>,
Key ();
/** Create a Key from a raw key value */
- Key (uint8_t const *);
+ explicit Key (uint8_t const *);
/** Create a Key from a hex key value */
- Key (std::string);
+ explicit Key (std::string);
Key (Key const &);
~Key ();
{
public:
LoadFontNode () {}
- LoadFontNode (std::string id_)
+ explicit LoadFontNode (std::string id_)
: id (id_)
{}
{
public:
LocalTime ();
- LocalTime (boost::posix_time::ptime);
+ explicit LocalTime (boost::posix_time::ptime);
LocalTime (boost::posix_time::ptime, int tz_hour, int tz_minute);
- LocalTime (std::string);
+ explicit LocalTime (std::string);
std::string as_string (bool with_millisecond = false) const;
std::string date () const;
/** Create a MonoPictureAsset by reading a file.
* @param file Asset file to read.
*/
- MonoPictureAsset (boost::filesystem::path file);
+ explicit MonoPictureAsset (boost::filesystem::path file);
/** Create a MonoPictureAsset with a given edit rate.
* @param edit_rate Edit rate (i.e. frame rate) in frames per second.
*/
- MonoPictureAsset (Fraction edit_rate);
+ explicit MonoPictureAsset (Fraction edit_rate);
/** Start a progressive write to a MonoPictureAsset */
boost::shared_ptr<PictureAssetWriter> start_write (boost::filesystem::path, Standard standard, bool);
private:
friend class MonoPictureAsset;
- MonoPictureAssetReader (MonoPictureAsset const *);
+ explicit MonoPictureAssetReader (MonoPictureAsset const *);
ASDCP::JP2K::MXFReader* _reader;
};
class MonoPictureFrame : public boost::noncopyable
{
public:
- MonoPictureFrame (boost::filesystem::path path);
+ explicit MonoPictureFrame (boost::filesystem::path path);
MonoPictureFrame (uint8_t const * data, int size);
~MonoPictureFrame ();
{
public:
Object ();
- Object (std::string id);
+ explicit Object (std::string id);
virtual ~Object () {}
/** @return ID */
class OpenJPEGImage : public boost::noncopyable
{
public:
- OpenJPEGImage (opj_image_t *);
- OpenJPEGImage (Size);
+ explicit OpenJPEGImage (opj_image_t *);
+ explicit OpenJPEGImage (Size);
~OpenJPEGImage ();
int* data (int) const;
class PictureAsset : public Asset, public MXF
{
public:
- PictureAsset (boost::filesystem::path file);
- PictureAsset (Fraction edit_rate);
+ explicit PictureAsset (boost::filesystem::path file);
+ explicit PictureAsset (Fraction edit_rate);
virtual boost::shared_ptr<PictureAssetWriter> start_write (
boost::filesystem::path file,
, _atmos (atmos)
{}
- Reel (boost::shared_ptr<const cxml::Node>);
+ explicit Reel (boost::shared_ptr<const cxml::Node>);
boost::shared_ptr<ReelPictureAsset> main_picture () const {
return _main_picture;
public:
ReelAsset ();
ReelAsset (boost::shared_ptr<Asset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point);
- ReelAsset (boost::shared_ptr<const cxml::Node>);
+ explicit ReelAsset (boost::shared_ptr<const cxml::Node>);
virtual void write_to_cpl (xmlpp::Node* node, Standard standard) const;
virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const;
{
public:
ReelAtmosAsset (boost::shared_ptr<AtmosAsset> asset, int64_t entry_point);
- ReelAtmosAsset (boost::shared_ptr<const cxml::Node>);
+ explicit ReelAtmosAsset (boost::shared_ptr<const cxml::Node>);
boost::shared_ptr<AtmosAsset> asset () const {
return asset_of_type<AtmosAsset> ();
public:
ReelMonoPictureAsset ();
ReelMonoPictureAsset (boost::shared_ptr<MonoPictureAsset> asset, int64_t entry_point);
- ReelMonoPictureAsset (boost::shared_ptr<const cxml::Node>);
+ explicit ReelMonoPictureAsset (boost::shared_ptr<const cxml::Node>);
/** @return the MonoPictureAsset that this object refers to */
boost::shared_ptr<const MonoPictureAsset> mono_asset () const {
{
public:
ReelMXF () {}
- ReelMXF (boost::optional<std::string> key_id);
- ReelMXF (boost::shared_ptr<const cxml::Node>);
+ explicit ReelMXF (boost::optional<std::string> key_id);
+ explicit ReelMXF (boost::shared_ptr<const cxml::Node>);
virtual ~ReelMXF () {}
/** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */
public:
ReelPictureAsset ();
ReelPictureAsset (boost::shared_ptr<PictureAsset> asset, int64_t entry_point);
- ReelPictureAsset (boost::shared_ptr<const cxml::Node>);
+ explicit ReelPictureAsset (boost::shared_ptr<const cxml::Node>);
virtual void write_to_cpl (xmlpp::Node* node, Standard standard) const;
virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const;
{
public:
ReelSoundAsset (boost::shared_ptr<dcp::SoundAsset> content, int64_t entry_point);
- ReelSoundAsset (boost::shared_ptr<const cxml::Node>);
+ explicit ReelSoundAsset (boost::shared_ptr<const cxml::Node>);
void write_to_cpl (xmlpp::Node* node, Standard standard) const;
public:
ReelStereoPictureAsset ();
ReelStereoPictureAsset (boost::shared_ptr<StereoPictureAsset> content, int64_t entry_point);
- ReelStereoPictureAsset (boost::shared_ptr<const cxml::Node>);
+ explicit ReelStereoPictureAsset (boost::shared_ptr<const cxml::Node>);
/** @return the StereoPictureAsset that this object refers to */
boost::shared_ptr<const StereoPictureAsset> stereo_asset () const {
{
public:
ReelSubtitleAsset (boost::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point);
- ReelSubtitleAsset (boost::shared_ptr<const cxml::Node>);
+ explicit ReelSubtitleAsset (boost::shared_ptr<const cxml::Node>);
boost::shared_ptr<SubtitleAsset> asset () const {
return asset_of_type<SubtitleAsset> ();
{
public:
/** Initialise a Ref with an ID but no shared_ptr */
- Ref (std::string id)
+ explicit Ref (std::string id)
: _id (id)
{}
/** Initialise a Ref with a shared_ptr to an asset */
- Ref (boost::shared_ptr<Asset> asset)
+ explicit Ref (boost::shared_ptr<Asset> asset)
: _id (asset->id ())
, _asset (asset)
{}
public:
SMPTELoadFontNode () {}
SMPTELoadFontNode (std::string id, std::string urn);
- SMPTELoadFontNode (boost::shared_ptr<const cxml::Node> node);
+ explicit SMPTELoadFontNode (boost::shared_ptr<const cxml::Node> node);
std::string urn;
};
/** @param file File name
*/
- SMPTESubtitleAsset (boost::filesystem::path file);
+ explicit SMPTESubtitleAsset (boost::filesystem::path file);
bool equals (
boost::shared_ptr<const Asset>,
class SoundAsset : public Asset, public MXF
{
public:
- SoundAsset (boost::filesystem::path file);
+ explicit SoundAsset (boost::filesystem::path file);
SoundAsset (Fraction edit_rate, int sampling_rate, int channels);
boost::shared_ptr<SoundAssetWriter> start_write (boost::filesystem::path file, Standard standard);
private:
friend class SoundAsset;
- SoundAssetReader (SoundAsset const * asset);
+ explicit SoundAssetReader (SoundAsset const * asset);
ASDCP::PCM::MXFReader* _reader;
};
class StereoPictureAsset : public PictureAsset
{
public:
- StereoPictureAsset (boost::filesystem::path file);
- StereoPictureAsset (Fraction edit_rate);
+ explicit StereoPictureAsset (boost::filesystem::path file);
+ explicit StereoPictureAsset (Fraction edit_rate);
/** Start a progressive write to a StereoPictureAsset */
boost::shared_ptr<PictureAssetWriter> start_write (boost::filesystem::path file, Standard, bool);
private:
friend class StereoPictureAsset;
- StereoPictureAssetReader (StereoPictureAsset const *);
+ explicit StereoPictureAssetReader (StereoPictureAsset const *);
ASDCP::JP2K::MXFSReader* _reader;
};
{
public:
SubtitleAsset ();
- SubtitleAsset (boost::filesystem::path file);
+ explicit SubtitleAsset (boost::filesystem::path file);
bool equals (
boost::shared_ptr<const Asset>,
public:
/** Construct a fraction of 0/0 */
Fraction () : numerator (0), denominator (0) {}
- Fraction (std::string s);
+ explicit Fraction (std::string s);
/** Construct a fraction with a specified numerator and denominator.
* @param n Numerator.
* @param d Denominator.
public:
Colour ();
Colour (int r_, int g_, int b_);
- Colour (std::string argb_hex);
+ explicit Colour (std::string argb_hex);
int r; ///< red component, from 0 to 255
int g; ///< green component, from 0 to 255