inline State(::FLAC__StreamDecoderState state): state_(state) { }
inline operator ::FLAC__StreamDecoderState() const { return state_; }
inline const char *as_cstring() const { return ::FLAC__StreamDecoderStateString[state_]; }
+ const char *resolved_as_cstring(const Stream &) const;
protected:
::FLAC__StreamDecoderState state_;
};
inline State(::FLAC__SeekableStreamDecoderState state): state_(state) { }
inline operator ::FLAC__SeekableStreamDecoderState() const { return state_; }
inline const char *as_cstring() const { return ::FLAC__SeekableStreamDecoderStateString[state_]; }
+ const char *resolved_as_cstring(const SeekableStream &) const;
protected:
::FLAC__SeekableStreamDecoderState state_;
};
inline State(::FLAC__FileDecoderState state): state_(state) { }
inline operator ::FLAC__FileDecoderState() const { return state_; }
inline const char *as_cstring() const { return ::FLAC__FileDecoderStateString[state_]; }
+ const char *resolved_as_cstring(const File &) const;
protected:
::FLAC__FileDecoderState state_;
};
inline State(::FLAC__StreamEncoderState state): state_(state) { }
inline operator ::FLAC__StreamEncoderState() const { return state_; }
inline const char *as_cstring() const { return ::FLAC__StreamEncoderStateString[state_]; }
+ const char *resolved_as_cstring(const Stream &) const;
protected:
::FLAC__StreamEncoderState state_;
};
inline State(::FLAC__SeekableStreamEncoderState state): state_(state) { }
inline operator ::FLAC__SeekableStreamEncoderState() const { return state_; }
inline const char *as_cstring() const { return ::FLAC__SeekableStreamEncoderStateString[state_]; }
+ const char *resolved_as_cstring(const SeekableStream &) const;
protected:
::FLAC__SeekableStreamEncoderState state_;
};
inline State(::FLAC__FileEncoderState state): state_(state) { }
inline operator ::FLAC__FileEncoderState() const { return state_; }
inline const char *as_cstring() const { return ::FLAC__FileEncoderStateString[state_]; }
+ const char *resolved_as_cstring(const File &) const;
protected:
::FLAC__FileEncoderState state_;
};
namespace FLAC {
namespace Decoder {
+ const char *File::State::resolved_as_cstring(const File &decoder) const
+ {
+ if(state_ == ::FLAC__FILE_DECODER_SEEKABLE_STREAM_DECODER_ERROR) {
+ FLAC::Decoder::SeekableStream::State state__ = decoder.get_seekable_stream_decoder_state();
+ if(state__ == ::FLAC__SEEKABLE_STREAM_DECODER_STREAM_DECODER_ERROR)
+ return decoder.get_stream_decoder_state().as_cstring();
+ else
+ return state__.as_cstring();
+ }
+ else
+ return as_cstring();
+ }
+
File::File():
decoder_(::FLAC__file_decoder_new())
{ }
namespace FLAC {
namespace Encoder {
+ const char *File::State::resolved_as_cstring(const File &encoder) const
+ {
+ if(state_ == ::FLAC__FILE_ENCODER_SEEKABLE_STREAM_ENCODER_ERROR) {
+ FLAC::Encoder::SeekableStream::State state__ = encoder.get_seekable_stream_encoder_state();
+ if(state__ == ::FLAC__SEEKABLE_STREAM_ENCODER_STREAM_ENCODER_ERROR) {
+ FLAC::Encoder::Stream::State state___ = encoder.get_stream_encoder_state();
+ if(state___ == ::FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR)
+ return encoder.get_verify_decoder_state().as_cstring();
+ else
+ return state___.as_cstring();
+ }
+ else
+ return state__.as_cstring();
+ }
+ else
+ return as_cstring();
+ }
+
File::File():
encoder_(::FLAC__file_encoder_new())
{ }
namespace FLAC {
namespace Decoder {
+ const char *SeekableStream::State::resolved_as_cstring(const SeekableStream &decoder) const
+ {
+ if(state_ == ::FLAC__SEEKABLE_STREAM_DECODER_STREAM_DECODER_ERROR)
+ return decoder.get_stream_decoder_state().as_cstring();
+ else
+ return as_cstring();
+ }
+
SeekableStream::SeekableStream():
decoder_(::FLAC__seekable_stream_decoder_new())
{ }
namespace FLAC {
namespace Encoder {
+ const char *SeekableStream::State::resolved_as_cstring(const SeekableStream &encoder) const
+ {
+ if(state_ == ::FLAC__SEEKABLE_STREAM_ENCODER_STREAM_ENCODER_ERROR) {
+ FLAC::Encoder::Stream::State state__ = encoder.get_stream_encoder_state();
+ if(state__ == ::FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR)
+ return encoder.get_verify_decoder_state().as_cstring();
+ else
+ return state__.as_cstring();
+ }
+ else
+ return as_cstring();
+ }
+
+
SeekableStream::SeekableStream():
encoder_(::FLAC__seekable_stream_encoder_new())
{ }
namespace FLAC {
namespace Decoder {
+ const char *Stream::State::resolved_as_cstring(const Stream &) const
+ {
+ return as_cstring();
+ }
+
Stream::Stream():
decoder_(::FLAC__stream_decoder_new())
{ }
namespace FLAC {
namespace Encoder {
+ const char *Stream::State::resolved_as_cstring(const Stream &encoder) const
+ {
+ if(state_ == ::FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR)
+ return encoder.get_verify_decoder_state().as_cstring();
+ else
+ return as_cstring();
+ }
+
Stream::Stream():
encoder_(::FLAC__stream_encoder_new())
{ }