Duplicate contructors of File subclasses to accept IOStream*

This commit is contained in:
Lukáš Lalinský
2011-04-11 23:31:44 +02:00
parent 8b59bb5957
commit 26c130c387
28 changed files with 239 additions and 0 deletions

View File

@ -75,6 +75,13 @@ Ogg::FLAC::File::File(FileName file, bool readProperties,
read(readProperties, propertiesStyle);
}
Ogg::FLAC::File::File(IOStream *stream, bool readProperties,
Properties::ReadStyle propertiesStyle) : Ogg::File(stream)
{
d = new FilePrivate;
read(readProperties, propertiesStyle);
}
Ogg::FLAC::File::~File()
{
delete d;

View File

@ -71,6 +71,14 @@ namespace TagLib {
File(FileName file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
/*!
* Contructs an Ogg/FLAC file from \a file. If \a readProperties is true
* the file's audio properties will also be read using \a propertiesStyle.
* If false, \a propertiesStyle is ignored.
*/
File(IOStream *stream, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
/*!
* Destroys this instance of the File.
*/

View File

@ -213,6 +213,11 @@ Ogg::File::File(FileName file) : TagLib::File(file)
d = new FilePrivate;
}
Ogg::File::File(IOStream *stream) : TagLib::File(stream)
{
d = new FilePrivate;
}
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////

View File

@ -92,6 +92,17 @@ namespace TagLib {
*/
File(FileName file);
/*!
* Contructs an Ogg file from \a file. If \a readProperties is true the
* file's audio properties will also be read using \a propertiesStyle. If
* false, \a propertiesStyle is ignored.
*
* \note This constructor is protected since Ogg::File shouldn't be
* instantiated directly but rather should be used through the codec
* specific subclasses.
*/
File(IOStream *stream);
private:
File(const File &);
File &operator=(const File &);

View File

@ -65,6 +65,13 @@ Speex::File::File(FileName file, bool readProperties,
read(readProperties, propertiesStyle);
}
Speex::File::File(IOStream *stream, bool readProperties,
Properties::ReadStyle propertiesStyle) : Ogg::File(stream)
{
d = new FilePrivate;
read(readProperties, propertiesStyle);
}
Speex::File::~File()
{
delete d;

View File

@ -63,6 +63,14 @@ namespace TagLib {
File(FileName file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
/*!
* Contructs a Speex file from \a file. If \a readProperties is true the
* file's audio properties will also be read using \a propertiesStyle. If
* false, \a propertiesStyle is ignored.
*/
File(IOStream *stream, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
/*!
* Destroys this instance of the File.
*/

View File

@ -68,6 +68,13 @@ Vorbis::File::File(FileName file, bool readProperties,
read(readProperties, propertiesStyle);
}
Vorbis::File::File(IOStream *stream, bool readProperties,
Properties::ReadStyle propertiesStyle) : Ogg::File(stream)
{
d = new FilePrivate;
read(readProperties, propertiesStyle);
}
Vorbis::File::~File()
{
delete d;

View File

@ -70,6 +70,14 @@ namespace TagLib {
File(FileName file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
/*!
* Contructs a Vorbis file from \a file. If \a readProperties is true the
* file's audio properties will also be read using \a propertiesStyle. If
* false, \a propertiesStyle is ignored.
*/
File(IOStream *stream, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
/*!
* Destroys this instance of the File.
*/