AttributeListMap attributeListMap;
};
-ASF::Tag::Tag()
-: TagLib::Tag()
+ASF::Tag::Tag() :
+ TagLib::Tag(),
+ d(new TagPrivate())
{
- d = new TagPrivate;
}
ASF::Tag::~Tag()
if(!create || d->tag[FlacID3v2Index])
return static_cast<ID3v2::Tag *>(d->tag[FlacID3v2Index]);
- d->tag.set(FlacID3v2Index, new ID3v2::Tag);
+ d->tag.set(FlacID3v2Index, new ID3v2::Tag());
return static_cast<ID3v2::Tag *>(d->tag[FlacID3v2Index]);
}
ByteVector data;
};
-FLAC::Picture::Picture()
+FLAC::Picture::Picture() :
+ d(new PicturePrivate())
{
- d = new PicturePrivate;
}
-FLAC::Picture::Picture(const ByteVector &data)
+FLAC::Picture::Picture(const ByteVector &data) :
+ d(new PicturePrivate())
{
- d = new PicturePrivate;
parse(data);
}
ByteVector data;
};
-FLAC::UnknownMetadataBlock::UnknownMetadataBlock(int code, const ByteVector &data)
+FLAC::UnknownMetadataBlock::UnknownMetadataBlock(int code, const ByteVector &data) :
+ d(new UnknownMetadataBlockPrivate())
{
- d = new UnknownMetadataBlockPrivate;
d->code = code;
- //debug(String(data.toHex()));
d->data = data;
}
IT::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
AudioProperties(propertiesStyle),
- d(new PropertiesPrivate)
+ d(new PropertiesPrivate())
{
}
Mod::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
AudioProperties(propertiesStyle),
- d(new PropertiesPrivate)
+ d(new PropertiesPrivate())
{
}
String trackerName;
};
-Mod::Tag::Tag() : TagLib::Tag()
+Mod::Tag::Tag() :
+ TagLib::Tag(),
+ d(new TagPrivate())
{
- d = new TagPrivate;
}
Mod::Tag::~Tag()
// public members
////////////////////////////////////////////////////////////////////////////////
-AttachedPictureFrame::AttachedPictureFrame() : Frame("APIC")
+AttachedPictureFrame::AttachedPictureFrame() :
+ Frame("APIC"),
+ d(new AttachedPictureFramePrivate())
{
- d = new AttachedPictureFramePrivate;
}
-AttachedPictureFrame::AttachedPictureFrame(const ByteVector &data) : Frame(data)
+AttachedPictureFrame::AttachedPictureFrame(const ByteVector &data) :
+ Frame(data),
+ d(new AttachedPictureFramePrivate())
{
- d = new AttachedPictureFramePrivate;
setData(data);
}
// private members
////////////////////////////////////////////////////////////////////////////////
-AttachedPictureFrame::AttachedPictureFrame(const ByteVector &data, Header *h) : Frame(h)
+AttachedPictureFrame::AttachedPictureFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new AttachedPictureFramePrivate())
{
- d = new AttachedPictureFramePrivate;
parseFields(fieldData(data));
}
////////////////////////////////////////////////////////////////////////////////
ChapterFrame::ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data) :
- ID3v2::Frame(data)
+ ID3v2::Frame(data),
+ d(new ChapterFramePrivate())
{
- d = new ChapterFramePrivate;
d->tagHeader = tagHeader;
setData(data);
}
unsigned int startTime, unsigned int endTime,
unsigned int startOffset, unsigned int endOffset,
const FrameList &embeddedFrames) :
- ID3v2::Frame("CHAP")
+ ID3v2::Frame("CHAP"),
+ d(new ChapterFramePrivate())
{
- d = new ChapterFramePrivate;
-
// setElementID has a workaround for a previously silly API where you had to
// specifically include the null byte.
}
ChapterFrame::ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h) :
- Frame(h)
+ Frame(h),
+ d(new ChapterFramePrivate())
{
- d = new ChapterFramePrivate;
d->tagHeader = tagHeader;
parseFields(fieldData(data));
}
// public members
////////////////////////////////////////////////////////////////////////////////
-CommentsFrame::CommentsFrame(String::Type encoding) : Frame("COMM")
+CommentsFrame::CommentsFrame(String::Type encoding) :
+ Frame("COMM"),
+ d(new CommentsFramePrivate())
{
- d = new CommentsFramePrivate;
d->textEncoding = encoding;
}
-CommentsFrame::CommentsFrame(const ByteVector &data) : Frame(data)
+CommentsFrame::CommentsFrame(const ByteVector &data) :
+ Frame(data),
+ d(new CommentsFramePrivate())
{
- d = new CommentsFramePrivate;
setData(data);
}
////////////////////////////////////////////////////////////////////////////////
EventTimingCodesFrame::EventTimingCodesFrame() :
- Frame("ETCO")
+ Frame("ETCO"),
+ d(new EventTimingCodesFramePrivate())
{
- d = new EventTimingCodesFramePrivate;
}
EventTimingCodesFrame::EventTimingCodesFrame(const ByteVector &data) :
- Frame(data)
+ Frame(data),
+ d(new EventTimingCodesFramePrivate())
{
- d = new EventTimingCodesFramePrivate;
setData(data);
}
// public members
////////////////////////////////////////////////////////////////////////////////
-GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame() : Frame("GEOB")
+GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame() :
+ Frame("GEOB"),
+ d(new GeneralEncapsulatedObjectFramePrivate())
{
- d = new GeneralEncapsulatedObjectFramePrivate;
}
-GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame(const ByteVector &data) : Frame(data)
+GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame(const ByteVector &data) :
+ Frame(data),
+ d(new GeneralEncapsulatedObjectFramePrivate())
{
- d = new GeneralEncapsulatedObjectFramePrivate;
setData(data);
}
// private members
////////////////////////////////////////////////////////////////////////////////
-GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h) : Frame(h)
+GeneralEncapsulatedObjectFrame::GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new GeneralEncapsulatedObjectFramePrivate())
{
- d = new GeneralEncapsulatedObjectFramePrivate;
parseFields(fieldData(data));
}
// public members
////////////////////////////////////////////////////////////////////////////////
-OwnershipFrame::OwnershipFrame(String::Type encoding) : Frame("OWNE")
+OwnershipFrame::OwnershipFrame(String::Type encoding) :
+ Frame("OWNE"),
+ d(new OwnershipFramePrivate())
{
- d = new OwnershipFramePrivate;
d->textEncoding = encoding;
}
-OwnershipFrame::OwnershipFrame(const ByteVector &data) : Frame(data)
+OwnershipFrame::OwnershipFrame(const ByteVector &data) :
+ Frame(data),
+ d(new OwnershipFramePrivate())
{
- d = new OwnershipFramePrivate;
setData(data);
}
// private members
////////////////////////////////////////////////////////////////////////////////
-OwnershipFrame::OwnershipFrame(const ByteVector &data, Header *h) : Frame(h)
+OwnershipFrame::OwnershipFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new OwnershipFramePrivate())
{
- d = new OwnershipFramePrivate;
parseFields(fieldData(data));
}
// public members
////////////////////////////////////////////////////////////////////////////////
-PodcastFrame::PodcastFrame() : Frame("PCST")
+PodcastFrame::PodcastFrame() :
+ Frame("PCST"),
+ d(new PodcastFramePrivate())
{
- d = new PodcastFramePrivate;
d->fieldData = ByteVector(4, '\0');
}
// private members
////////////////////////////////////////////////////////////////////////////////
-PodcastFrame::PodcastFrame(const ByteVector &data, Header *h) : Frame(h)
+PodcastFrame::PodcastFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new PodcastFramePrivate())
{
- d = new PodcastFramePrivate;
parseFields(fieldData(data));
}
// public members
////////////////////////////////////////////////////////////////////////////////
-PopularimeterFrame::PopularimeterFrame() : Frame("POPM")
+PopularimeterFrame::PopularimeterFrame() :
+ Frame("POPM"),
+ d(new PopularimeterFramePrivate())
{
- d = new PopularimeterFramePrivate;
}
-PopularimeterFrame::PopularimeterFrame(const ByteVector &data) : Frame(data)
+PopularimeterFrame::PopularimeterFrame(const ByteVector &data) :
+ Frame(data),
+ d(new PopularimeterFramePrivate())
{
- d = new PopularimeterFramePrivate;
setData(data);
}
// private members
////////////////////////////////////////////////////////////////////////////////
-PopularimeterFrame::PopularimeterFrame(const ByteVector &data, Header *h) : Frame(h)
+PopularimeterFrame::PopularimeterFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new PopularimeterFramePrivate())
{
- d = new PopularimeterFramePrivate;
parseFields(fieldData(data));
}
// public members
////////////////////////////////////////////////////////////////////////////////
-PrivateFrame::PrivateFrame() : Frame("PRIV")
+PrivateFrame::PrivateFrame() :
+ Frame("PRIV"),
+ d(new PrivateFramePrivate())
{
- d = new PrivateFramePrivate;
}
-PrivateFrame::PrivateFrame(const ByteVector &data) : Frame(data)
+PrivateFrame::PrivateFrame(const ByteVector &data) :
+ Frame(data),
+ d(new PrivateFramePrivate())
{
- d = new PrivateFramePrivate;
setData(data);
}
// public members
////////////////////////////////////////////////////////////////////////////////
-RelativeVolumeFrame::RelativeVolumeFrame() : Frame("RVA2")
+RelativeVolumeFrame::RelativeVolumeFrame() :
+ Frame("RVA2"),
+ d(new RelativeVolumeFramePrivate())
{
- d = new RelativeVolumeFramePrivate;
}
-RelativeVolumeFrame::RelativeVolumeFrame(const ByteVector &data) : Frame(data)
+RelativeVolumeFrame::RelativeVolumeFrame(const ByteVector &data) :
+ Frame(data),
+ d(new RelativeVolumeFramePrivate())
{
- d = new RelativeVolumeFramePrivate;
setData(data);
}
// private members
////////////////////////////////////////////////////////////////////////////////
-RelativeVolumeFrame::RelativeVolumeFrame(const ByteVector &data, Header *h) : Frame(h)
+RelativeVolumeFrame::RelativeVolumeFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new RelativeVolumeFramePrivate())
{
- d = new RelativeVolumeFramePrivate;
parseFields(fieldData(data));
}
////////////////////////////////////////////////////////////////////////////////
SynchronizedLyricsFrame::SynchronizedLyricsFrame(String::Type encoding) :
- Frame("SYLT")
+ Frame("SYLT"),
+ d(new SynchronizedLyricsFramePrivate())
{
- d = new SynchronizedLyricsFramePrivate;
d->textEncoding = encoding;
}
SynchronizedLyricsFrame::SynchronizedLyricsFrame(const ByteVector &data) :
- Frame(data)
+ Frame(data),
+ d(new SynchronizedLyricsFramePrivate())
{
- d = new SynchronizedLyricsFramePrivate;
setData(data);
}
////////////////////////////////////////////////////////////////////////////////
TableOfContentsFrame::TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data) :
- ID3v2::Frame(data)
+ ID3v2::Frame(data),
+ d(new TableOfContentsFramePrivate())
{
- d = new TableOfContentsFramePrivate;
d->tagHeader = tagHeader;
setData(data);
}
TableOfContentsFrame::TableOfContentsFrame(const ByteVector &elementID,
const ByteVectorList &children,
const FrameList &embeddedFrames) :
- ID3v2::Frame("CTOC")
+ ID3v2::Frame("CTOC"),
+ d(new TableOfContentsFramePrivate())
{
- d = new TableOfContentsFramePrivate;
d->elementID = elementID;
strip(d->elementID);
d->childElements = children;
TableOfContentsFrame::TableOfContentsFrame(const ID3v2::Header *tagHeader,
const ByteVector &data, Header *h) :
- Frame(h)
+ Frame(h),
+ d(new TableOfContentsFramePrivate())
{
- d = new TableOfContentsFramePrivate;
d->tagHeader = tagHeader;
parseFields(fieldData(data));
}
////////////////////////////////////////////////////////////////////////////////
TextIdentificationFrame::TextIdentificationFrame(const ByteVector &type, String::Type encoding) :
- Frame(type)
+ Frame(type),
+ d(new TextIdentificationFramePrivate())
{
- d = new TextIdentificationFramePrivate;
d->textEncoding = encoding;
}
TextIdentificationFrame::TextIdentificationFrame(const ByteVector &data) :
- Frame(data)
+ Frame(data),
+ d(new TextIdentificationFramePrivate())
{
- d = new TextIdentificationFramePrivate;
setData(data);
}
// TextIdentificationFrame private members
////////////////////////////////////////////////////////////////////////////////
-TextIdentificationFrame::TextIdentificationFrame(const ByteVector &data, Header *h) : Frame(h)
+TextIdentificationFrame::TextIdentificationFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new TextIdentificationFramePrivate())
{
- d = new TextIdentificationFramePrivate;
parseFields(fieldData(data));
}
////////////////////////////////////////////////////////////////////////////////
UniqueFileIdentifierFrame::UniqueFileIdentifierFrame(const ByteVector &data) :
- ID3v2::Frame(data)
+ ID3v2::Frame(data),
+ d(new UniqueFileIdentifierFramePrivate())
{
- d = new UniqueFileIdentifierFramePrivate;
setData(data);
}
UniqueFileIdentifierFrame::UniqueFileIdentifierFrame(const String &owner, const ByteVector &id) :
- ID3v2::Frame("UFID")
+ ID3v2::Frame("UFID"),
+ d(new UniqueFileIdentifierFramePrivate())
{
- d = new UniqueFileIdentifierFramePrivate;
d->owner = owner;
d->identifier = id;
}
}
UniqueFileIdentifierFrame::UniqueFileIdentifierFrame(const ByteVector &data, Header *h) :
- Frame(h)
+ Frame(h),
+ d(new UniqueFileIdentifierFramePrivate())
{
- d = new UniqueFileIdentifierFramePrivate;
parseFields(fieldData(data));
}
// public members
////////////////////////////////////////////////////////////////////////////////
-UnknownFrame::UnknownFrame(const ByteVector &data) : Frame(data)
+UnknownFrame::UnknownFrame(const ByteVector &data) :
+ Frame(data),
+ d(new UnknownFramePrivate())
{
- d = new UnknownFramePrivate;
setData(data);
}
// private members
////////////////////////////////////////////////////////////////////////////////
-UnknownFrame::UnknownFrame(const ByteVector &data, Header *h) : Frame(h)
+UnknownFrame::UnknownFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new UnknownFramePrivate())
{
- d = new UnknownFramePrivate;
parseFields(fieldData(data));
}
////////////////////////////////////////////////////////////////////////////////
UnsynchronizedLyricsFrame::UnsynchronizedLyricsFrame(String::Type encoding) :
- Frame("USLT")
+ Frame("USLT"),
+ d(new UnsynchronizedLyricsFramePrivate())
{
- d = new UnsynchronizedLyricsFramePrivate;
d->textEncoding = encoding;
}
UnsynchronizedLyricsFrame::UnsynchronizedLyricsFrame(const ByteVector &data) :
- Frame(data)
+ Frame(data),
+ d(new UnsynchronizedLyricsFramePrivate())
{
- d = new UnsynchronizedLyricsFramePrivate;
setData(data);
}
String description;
};
+////////////////////////////////////////////////////////////////////////////////
+// UrlLinkFrame public members
+////////////////////////////////////////////////////////////////////////////////
+
UrlLinkFrame::UrlLinkFrame(const ByteVector &data) :
- Frame(data)
+ Frame(data),
+ d(new UrlLinkFramePrivate())
{
- d = new UrlLinkFramePrivate;
setData(data);
}
return map;
}
+////////////////////////////////////////////////////////////////////////////////
+// UrlLinkFrame protected members
+////////////////////////////////////////////////////////////////////////////////
+
void UrlLinkFrame::parseFields(const ByteVector &data)
{
d->url = String(data);
return d->url.data(String::Latin1);
}
-UrlLinkFrame::UrlLinkFrame(const ByteVector &data, Header *h) : Frame(h)
+UrlLinkFrame::UrlLinkFrame(const ByteVector &data, Header *h) :
+ Frame(h),
+ d(new UrlLinkFramePrivate())
{
- d = new UrlLinkFramePrivate;
parseFields(fieldData(data));
}
+////////////////////////////////////////////////////////////////////////////////
+// UserUrlLinkFrame public members
+////////////////////////////////////////////////////////////////////////////////
UserUrlLinkFrame::UserUrlLinkFrame(String::Type encoding) :
- UrlLinkFrame("WXXX")
+ UrlLinkFrame("WXXX"),
+ d(new UserUrlLinkFramePrivate())
{
- d = new UserUrlLinkFramePrivate;
d->textEncoding = encoding;
}
UserUrlLinkFrame::UserUrlLinkFrame(const ByteVector &data) :
- UrlLinkFrame(data)
+ UrlLinkFrame(data),
+ d(new UserUrlLinkFramePrivate())
{
- d = new UserUrlLinkFramePrivate;
setData(data);
}
return 0;
}
+////////////////////////////////////////////////////////////////////////////////
+// UserUrlLinkFrame protected members
+////////////////////////////////////////////////////////////////////////////////
+
void UserUrlLinkFrame::parseFields(const ByteVector &data)
{
if(data.size() < 2) {
return v;
}
-UserUrlLinkFrame::UserUrlLinkFrame(const ByteVector &data, Header *h) : UrlLinkFrame(data, h)
+UserUrlLinkFrame::UserUrlLinkFrame(const ByteVector &data, Header *h) :
+ UrlLinkFrame(data, h),
+ d(new UserUrlLinkFramePrivate())
{
- d = new UserUrlLinkFramePrivate;
parseFields(fieldData(data));
}
// protected members
////////////////////////////////////////////////////////////////////////////////
-Frame::Frame(const ByteVector &data)
+Frame::Frame(const ByteVector &data) :
+ d(new FramePrivate())
{
- d = new FramePrivate;
d->header = new Header(data);
}
-Frame::Frame(Header *h)
+Frame::Frame(Header *h) :
+ d(new FramePrivate())
{
- d = new FramePrivate;
d->header = h;
}
// public members (Frame::Header)
////////////////////////////////////////////////////////////////////////////////
-Frame::Header::Header(const ByteVector &data, bool synchSafeInts)
+Frame::Header::Header(const ByteVector &data, bool synchSafeInts) :
+ d(new HeaderPrivate())
{
- d = new HeaderPrivate;
setData(data, synchSafeInts);
}
-Frame::Header::Header(const ByteVector &data, unsigned int version)
+Frame::Header::Header(const ByteVector &data, unsigned int version) :
+ d(new HeaderPrivate())
{
- d = new HeaderPrivate;
setData(data, version);
}
if(d->header.extendedHeader()) {
if(!d->extendedHeader)
- d->extendedHeader = new ExtendedHeader;
+ d->extendedHeader = new ExtendedHeader();
d->extendedHeader->setData(data);
if(d->extendedHeader->size() <= data.size()) {
frameDataPosition += d->extendedHeader->size();
////////////////////////////////////////////////////////////////////////////////
Ogg::FLAC::File::File(FileName file, bool readProperties,
- Properties::ReadStyle propertiesStyle) : Ogg::File(file)
+ Properties::ReadStyle propertiesStyle) :
+ Ogg::File(file),
+ d(new FilePrivate())
{
- d = new FilePrivate;
if(isOpen())
read(readProperties, propertiesStyle);
}
Ogg::FLAC::File::File(IOStream *stream, bool readProperties,
- Properties::ReadStyle propertiesStyle) : Ogg::File(stream)
+ Properties::ReadStyle propertiesStyle) :
+ Ogg::File(stream),
+ d(new FilePrivate())
{
- d = new FilePrivate;
if(isOpen())
read(readProperties, propertiesStyle);
}
if(d->hasXiphComment)
d->comment = new Ogg::XiphComment(xiphCommentData());
else
- d->comment = new Ogg::XiphComment;
+ d->comment = new Ogg::XiphComment();
if(readProperties)
bool Opus::File::save()
{
if(!d->comment)
- d->comment = new Ogg::XiphComment;
+ d->comment = new Ogg::XiphComment();
setPacket(1, ByteVector("OpusTags", 8) + d->comment->render(false));
bool Speex::File::save()
{
if(!d->comment)
- d->comment = new Ogg::XiphComment;
+ d->comment = new Ogg::XiphComment();
setPacket(1, d->comment->render());
ByteVector v(vorbisCommentHeaderID);
if(!d->comment)
- d->comment = new Ogg::XiphComment;
+ d->comment = new Ogg::XiphComment();
v.append(d->comment->render());
setPacket(1, v);
S3M::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
AudioProperties(propertiesStyle),
- d(new PropertiesPrivate)
+ d(new PropertiesPrivate())
{
}
std::vector<Tag *> tags;
};
-TagUnion::TagUnion(Tag *first, Tag *second, Tag *third)
+TagUnion::TagUnion(Tag *first, Tag *second, Tag *third) :
+ d(new TagUnionPrivate())
{
- d = new TagUnionPrivate;
-
d->tags[0] = first;
d->tags[1] = second;
d->tags[2] = third;
XM::Properties::Properties(AudioProperties::ReadStyle propertiesStyle) :
AudioProperties(propertiesStyle),
- d(new PropertiesPrivate)
+ d(new PropertiesPrivate())
{
}