]> granicus.if.org Git - taglib/commitdiff
Update signature and docs
authorScott Wheeler <scott@directededge.com>
Mon, 18 May 2015 16:19:43 +0000 (18:19 +0200)
committerScott Wheeler <scott@directededge.com>
Mon, 18 May 2015 16:19:43 +0000 (18:19 +0200)
Specifically this allows the frame to be constructed and then to have
the children and embedded frames set later.

taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp
taglib/mpeg/id3v2/frames/tableofcontentsframe.h

index 550df64e53ec9cd703ea72dd0e7f1510a6d864d0..5a9bf791c3e35cfcce6edc590867200f8cd5ced5 100644 (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);
 }
 
index 532e1d0e62e6c0a4ccd8893e9cb5ef19cf51b3c1..cf09a4052e46f4212b5724948ddf10bc56fc88f0 100644 (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.