summaryrefslogtreecommitdiff
path: root/src/verify.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-09 00:22:10 +0100
committerCarl Hetherington <cth@carlh.net>2019-12-22 01:21:00 +0100
commit84d01dde2fb2520572d122d53e1ffebefed48157 (patch)
treef6489b95eeb6550883cdfea8c23c4547bcba1cd4 /src/verify.h
parent63357f32e8229b9d734b0c0ab38cc062dcfec393 (diff)
Use VerificationNote more 'properly' in a fair few places.
Diffstat (limited to 'src/verify.h')
-rw-r--r--src/verify.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/verify.h b/src/verify.h
index 9018ed46..ab9e9aac 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -71,7 +71,7 @@ public:
PKL_CPL_SOUND_HASHES_DISAGREE,
/** An assetmap's <Path> entry is empty */
EMPTY_ASSET_PATH,
- /** An file mentioned in an assetmap cannot be found */
+ /** An file mentioned in an asset map cannot be found */
MISSING_ASSET,
/** The DCP contains both SMPTE and Interop-standard components */
MISMATCHED_STANDARD,
@@ -96,6 +96,21 @@ public:
, _file (file)
{}
+ VerificationNote (Type type, Code code, std::string note, boost::filesystem::path file)
+ : _type (type)
+ , _code (code)
+ , _note (note)
+ , _file (file)
+ {}
+
+ VerificationNote (Type type, Code code, std::string note, boost::filesystem::path file, uint64_t line)
+ : _type (type)
+ , _code (code)
+ , _note (note)
+ , _file (file)
+ , _line (line)
+ {}
+
Type type () const {
return _type;
}
@@ -112,11 +127,19 @@ public:
return _file;
}
+ boost::optional<uint64_t> line () const {
+ return _line;
+ }
+
private:
Type _type;
Code _code;
+ /** Further information about the error, if applicable */
boost::optional<std::string> _note;
+ /** Path of file containing the error, if applicable */
boost::optional<boost::filesystem::path> _file;
+ /** Error line number within _file, if applicable */
+ uint64_t _line;
};
std::list<VerificationNote> verify (