Additional manual formatting to taglib sources

This commit is contained in:
Jonas Kvinge
2020-06-14 17:01:05 +02:00
parent 577b7d8ec8
commit ef34dce4dc
217 changed files with 7367 additions and 8204 deletions

View File

@@ -37,26 +37,24 @@ using namespace S3M;
class S3M::File::FilePrivate {
public:
explicit FilePrivate(AudioProperties::ReadStyle propertiesStyle)
: properties(propertiesStyle) {
}
explicit FilePrivate(AudioProperties::ReadStyle propertiesStyle) : properties(propertiesStyle) {}
Mod::Tag tag;
S3M::Properties properties;
};
S3M::File::File(FileName file, bool readProperties,
AudioProperties::ReadStyle propertiesStyle) : Mod::FileBase(file),
d(new FilePrivate(propertiesStyle)) {
S3M::File::File(FileName file, bool readProperties, AudioProperties::ReadStyle propertiesStyle) : Mod::FileBase(file), d(new FilePrivate(propertiesStyle)) {
if (isOpen())
read(readProperties);
}
S3M::File::File(IOStream *stream, bool readProperties,
AudioProperties::ReadStyle propertiesStyle) : Mod::FileBase(stream),
d(new FilePrivate(propertiesStyle)) {
S3M::File::File(IOStream *stream, bool readProperties, AudioProperties::ReadStyle propertiesStyle) : Mod::FileBase(stream), d(new FilePrivate(propertiesStyle)) {
if (isOpen())
read(readProperties);
}
S3M::File::~File() {
@@ -80,6 +78,7 @@ S3M::Properties *S3M::File::audioProperties() const {
}
bool S3M::File::save() {
if (readOnly()) {
debug("S3M::File::save() - Cannot save to a read only file.");
return false;
@@ -132,9 +131,11 @@ bool S3M::File::save() {
writeByte(0);
}
return true;
}
void S3M::File::read(bool) {
if (!isOpen())
return;
@@ -232,4 +233,5 @@ void S3M::File::read(bool) {
d->tag.setComment(comment.toString("\n"));
d->tag.setTrackerName("ScreamTracker III");
}

View File

@@ -35,67 +35,59 @@
namespace Strawberry_TagLib {
namespace TagLib {
namespace S3M {
class TAGLIB_EXPORT File : public Mod::FileBase {
public:
/*!
* Constructs a ScreamTracker III from \a file.
*
* \note In the current implementation, both \a readProperties and
* \a propertiesStyle are ignored. The audio properties are always
* read.
*/
File(FileName file, bool readProperties = true,
AudioProperties::ReadStyle propertiesStyle =
AudioProperties::Average);
* Constructs a ScreamTracker III from \a file.
*
* \note In the current implementation, both \a readProperties and
* \a propertiesStyle are ignored. The audio properties are always read.
*/
File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
/*!
* Constructs a ScreamTracker III file from \a stream.
*
* \note In the current implementation, both \a readProperties and
* \a propertiesStyle are ignored. The audio properties are always
* read.
*
* \note TagLib will *not* take ownership of the stream, the caller is
* responsible for deleting it after the File object.
*/
File(IOStream *stream, bool readProperties = true,
AudioProperties::ReadStyle propertiesStyle =
AudioProperties::Average);
* Constructs a ScreamTracker III file from \a stream.
*
* \note In the current implementation, both \a readProperties and \a propertiesStyle are ignored.
* The audio properties are always read.
*
* \note TagLib will *not* take ownership of the stream, the caller is responsible for deleting it after the File object.
*/
File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
/*!
* Destroys this instance of the File.
*/
* Destroys this instance of the File.
*/
virtual ~File();
Mod::Tag *tag() const;
/*!
* Implements the unified property interface -- export function.
* Forwards to Mod::Tag::properties().
*/
* Implements the unified property interface -- export function.
* Forwards to Mod::Tag::properties().
*/
PropertyMap properties() const;
/*!
* Implements the unified property interface -- import function.
* Forwards to Mod::Tag::setProperties().
*/
* Implements the unified property interface -- import function.
* Forwards to Mod::Tag::setProperties().
*/
PropertyMap setProperties(const PropertyMap &);
/*!
* Returns the S3M::Properties for this file. If no audio properties
* were read then this will return a null pointer.
*/
* Returns the S3M::Properties for this file. If no audio properties
* were read then this will return a null pointer.
*/
S3M::Properties *audioProperties() const;
/*!
* Save the file.
* This is the same as calling save(AllTags);
*
* \note Saving ScreamTracker III tags is not supported.
*/
* Save the file.
* This is the same as calling save(AllTags);
*
* \note Saving ScreamTracker III tags is not supported.
*/
bool save();
private:
@@ -107,6 +99,7 @@ class TAGLIB_EXPORT File : public Mod::FileBase {
class FilePrivate;
FilePrivate *d;
};
} // namespace S3M
} // namespace TagLib
} // namespace Strawberry_TagLib

View File

@@ -59,9 +59,7 @@ class S3M::Properties::PropertiesPrivate {
unsigned char bpmSpeed;
};
S3M::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) : AudioProperties(propertiesStyle),
d(new PropertiesPrivate()) {
}
S3M::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) : AudioProperties(propertiesStyle), d(new PropertiesPrivate()) {}
S3M::Properties::~Properties() {
delete d;

View File

@@ -32,6 +32,7 @@
namespace Strawberry_TagLib {
namespace TagLib {
namespace S3M {
class TAGLIB_EXPORT Properties : public AudioProperties {
friend class File;
@@ -90,6 +91,7 @@ class TAGLIB_EXPORT Properties : public AudioProperties {
class PropertiesPrivate;
PropertiesPrivate *d;
};
} // namespace S3M
} // namespace TagLib
} // namespace Strawberry_TagLib