Update signature and docs

Specifically this allows the frame to be constructed and then to have
the children and embedded frames set later.
This commit is contained in:
Scott Wheeler 2015-05-18 18:19:43 +02:00
parent 7316cd331d
commit 34da0c0dab
2 changed files with 13 additions and 9 deletions

View File

@ -87,16 +87,17 @@ TableOfContentsFrame::TableOfContentsFrame(const ID3v2::Header *tagHeader, const
setData(data);
}
TableOfContentsFrame::TableOfContentsFrame(const ByteVector &eID, const ByteVectorList &ch,
const FrameList &eF) :
TableOfContentsFrame::TableOfContentsFrame(const ByteVector &elementID,
const ByteVectorList &children,
const FrameList &embeddedFrames) :
ID3v2::Frame("CTOC")
{
d = new TableOfContentsFramePrivate;
d->elementID = eID;
d->elementID = elementID;
strip(d->elementID);
d->childElements = ch;
FrameList l = eF;
for(FrameList::ConstIterator it = l.begin(); it != l.end(); ++it)
d->childElements = children;
for(FrameList::ConstIterator it = embeddedFrames.begin(); it != embeddedFrames.end(); ++it)
addEmbeddedFrame(*it);
}

View File

@ -52,10 +52,13 @@ namespace TagLib {
TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data);
/*!
* Creates a table of contents frame with the element ID \a eID,
* the child elements \a ch and embedded frames, that are in \a eF.
* Creates a table of contents frame with the element ID \a elementID,
* the child elements \a children and embedded frames, which become owned
* by this frame, in \a embeddedFrames.
*/
TableOfContentsFrame(const ByteVector &eID, const ByteVectorList &ch, const FrameList &eF);
TableOfContentsFrame(const ByteVector &elementID,
const ByteVectorList &children = ByteVectorList(),
const FrameList &embeddedFrames = FrameList());
/*!
* Destroys the frame.