diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-02 01:01:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-02 01:01:00 +0100 |
| commit | e0ab473ef01c5301929845a1ca4898568b6fbd71 (patch) | |
| tree | 8f6808183829305b308a7985f47cfbaa29bf54ff /src | |
| parent | 91563c058a8d2207437a482d4cc63c5a166a26f4 (diff) | |
No-op; comments.
Diffstat (limited to 'src')
| -rw-r--r-- | src/asset.cc | 6 | ||||
| -rw-r--r-- | src/asset.h | 1 | ||||
| -rw-r--r-- | src/local_time.cc | 12 | ||||
| -rw-r--r-- | src/local_time.h | 15 | ||||
| -rw-r--r-- | src/modified_gamma_transfer_function.h | 4 | ||||
| -rw-r--r-- | src/reel_mxf_asset.h | 11 | ||||
| -rw-r--r-- | src/reel_picture_asset.h | 5 | ||||
| -rw-r--r-- | src/reel_sound_asset.h | 2 |
8 files changed, 50 insertions, 6 deletions
diff --git a/src/asset.cc b/src/asset.cc index 7e60ecc5..24fc5919 100644 --- a/src/asset.cc +++ b/src/asset.cc @@ -104,6 +104,12 @@ Asset::equals (boost::shared_ptr<const Asset> other, EqualityOptions, NoteHandle return true; } +/** Set the file that holds this asset on disk. Calling this function + * clears this object's store of its hash, so you should call ::hash + * after this. + * + * @param file New file's path. + */ void Asset::set_file (boost::filesystem::path file) const { diff --git a/src/asset.h b/src/asset.h index 91c7e2dc..7c6aab95 100644 --- a/src/asset.h +++ b/src/asset.h @@ -65,6 +65,7 @@ public: */ void write_to_pkl (xmlpp::Node* node, Standard standard) const; + /** @return the most recent disk file used to read or write this asset; may be empty */ boost::filesystem::path file () const { return _file; } diff --git a/src/local_time.cc b/src/local_time.cc index 0bbddf43..f5d79938 100644 --- a/src/local_time.cc +++ b/src/local_time.cc @@ -17,6 +17,10 @@ */ +/** @file src/local_time.cc + * @brief LocalTime class. + */ + #include "local_time.h" #include "exceptions.h" #include <boost/lexical_cast.hpp> @@ -27,6 +31,7 @@ using std::string; using boost::lexical_cast; using namespace dcp; +/** Construct a LocalTime from the current time */ LocalTime::LocalTime () { time_t now = time (0); @@ -42,6 +47,9 @@ LocalTime::LocalTime () set_local_time_zone (); } +/** Construct a LocalTime from a boost::posix_time::ptime using the local + * time zone. + */ LocalTime::LocalTime (boost::posix_time::ptime t) { _year = t.date().year (); @@ -54,6 +62,7 @@ LocalTime::LocalTime (boost::posix_time::ptime t) set_local_time_zone (); } +/** Set our UTC offset to be according to the local time zone */ void LocalTime::set_local_time_zone () { @@ -96,6 +105,7 @@ LocalTime::LocalTime (string s) } } +/** @return A string of the form 2013-01-05T18:06:59+04:00 */ string LocalTime::as_string () const { @@ -108,6 +118,7 @@ LocalTime::as_string () const return buffer; } +/** @return The date in the form YYYY-MM-DD */ string LocalTime::date () const { @@ -116,6 +127,7 @@ LocalTime::date () const return buffer; } +/** @return The time in the form HH:MM:SS */ string LocalTime::time_of_day () const { diff --git a/src/local_time.h b/src/local_time.h index 9798c2c3..c67aaee8 100644 --- a/src/local_time.h +++ b/src/local_time.h @@ -17,6 +17,10 @@ */ +/** @file src/local_time.h + * @brief LocalTime class. + */ + #ifndef LIBDCP_LOCAL_TIME_H #define LIBDCP_LOCAL_TIME_H @@ -27,7 +31,11 @@ class local_time_test; namespace dcp { -/** I tried to use boost for this, really I did, but I could not get it +/** @class LocalTime + * @brief A representation of a local time (down to the second), including its offset + * from GMT. + * + * I tried to use boost for this, really I did, but I could not get it * to parse strings of the required format (those that include time zones). */ class LocalTime @@ -54,9 +62,8 @@ private: int _minute; ///< minute number of the hour (0-59) int _second; ///< second number of the minute (0-59) - /* Amount by which this time is offset from UTC */ - int _tz_hour; - int _tz_minute; + int _tz_hour; ///< hours by which this time is offset from UTC + int _tz_minute; ///< minutes by which this time is offset from UTC }; } diff --git a/src/modified_gamma_transfer_function.h b/src/modified_gamma_transfer_function.h index ce7303fa..2a7a7b59 100644 --- a/src/modified_gamma_transfer_function.h +++ b/src/modified_gamma_transfer_function.h @@ -17,6 +17,10 @@ */ +/** @file src/modified_gamma_transfer_function.h + * @brief ModifiedGammaTransferFunction class. + */ + #include "transfer_function.h" namespace dcp { diff --git a/src/reel_mxf_asset.h b/src/reel_mxf_asset.h index 9d98cd71..765ba393 100644 --- a/src/reel_mxf_asset.h +++ b/src/reel_mxf_asset.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,10 @@ */ +/** @file src/reel_mxf_asset.h + * @brief ReelMXFAsset + */ + #ifndef LIBDCP_REEL_MXF_ASSET_H #define LIBDCP_REEL_MXF_ASSET_H @@ -24,8 +28,11 @@ namespace dcp { -class MXF; +class MXF; +/** @class ReelMXFAsset + * @brief Part of a Reel's description which refers to an MXF. + */ class ReelMXFAsset : public ReelAsset { public: diff --git a/src/reel_picture_asset.h b/src/reel_picture_asset.h index 96c4b63b..1607379a 100644 --- a/src/reel_picture_asset.h +++ b/src/reel_picture_asset.h @@ -42,14 +42,19 @@ public: virtual void write_to_cpl (xmlpp::Node* node, Standard standard) const; virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const; + /** @return the PictureMXF that this object refers to */ boost::shared_ptr<PictureMXF> mxf () { return boost::dynamic_pointer_cast<PictureMXF> (_content.object ()); } + /** @return picture frame rate */ Fraction frame_rate () const { return _frame_rate; } + /** Set the ScreenAspectRatio of this asset. + * @param a New aspect ratio. + */ void set_screen_aspect_ratio (Fraction a) { _screen_aspect_ratio = a; } diff --git a/src/reel_sound_asset.h b/src/reel_sound_asset.h index 0e27f380..b5dc819a 100644 --- a/src/reel_sound_asset.h +++ b/src/reel_sound_asset.h @@ -37,10 +37,12 @@ public: ReelSoundAsset (boost::shared_ptr<dcp::SoundMXF> content, int64_t entry_point); ReelSoundAsset (boost::shared_ptr<const cxml::Node>); + /** @return the SoundMXF that this object refers to */ boost::shared_ptr<SoundMXF> mxf () { return boost::dynamic_pointer_cast<SoundMXF> (_content.object ()); } + /** @return the SoundMXF that this object refers to */ boost::shared_ptr<const SoundMXF> mxf () const { return boost::dynamic_pointer_cast<const SoundMXF> (_content.object ()); } |
