metaparser.hpp file
Implement MetadataParsers.
Namespaces
- namespace arcsdec
- APIs of libarcsdec.
- namespace arcsdec::v_1_0_0 inline
- libarcsdec API version 1.0.0.
Classes
- class arcsdec::v_1_0_0::MetadataParseException
- Reports unexpected content while parsing a metadata file.
- class arcsdec::v_1_0_0::MetadataParser
- Parse metadata files and provide the content as a ToC instance.
- class arcsdec::v_1_0_0::MetadataParserImpl
- Abstract base class for MetadataParser implementations.
-
template<typename S, typename T>struct arcsdec::v_1_0_0::details::signedness
- Returns TRUE if types S and T are either both signed or both unsigned.
Functions
-
template<typename S, typename T, std::enable_if_t<details::signedness<S, T>::value, int> = 0>auto cast_or_throw(const T value) -> S -> auto
- Service method: Cast a value of some integral type safely to an integral type of smaller range.
- void frames_to_msg(long frames, int* m, int* s, int* f)
- Convert CDDA frames to MSF frames.
- auto msf_to_frames(const int m, const int s, const int f) -> long
- Convert MSF time to CDDA frames.
Function documentation
template<typename S, typename T, std::enable_if_t<details::signedness<S, T>::value, int> = 0>
auto cast_or_throw(const T value) -> S
Service method: Cast a value of some integral type safely to an integral type of smaller range.
Parameters | |
---|---|
value in | The value to convert |
Returns | The numerical value |
Exceptions | |
out_of_range | If value is out of the range of target type |
The types must either both be signed or both be unsigned.
If the input type is within the range of the target type, the cast is performed, otherwise an exception is thrown.