TagLib  2.2.1
ebmlmasterelement.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This library is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU Lesser General Public License version *
4  * 2.1 as published by the Free Software Foundation. *
5  * *
6  * This library is distributed in the hope that it will be useful, but *
7  * WITHOUT ANY WARRANTY; without even the implied warranty of *
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
9  * Lesser General Public License for more details. *
10  * *
11  * You should have received a copy of the GNU Lesser General Public *
12  * License along with this library; if not, write to the Free Software *
13  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
14  * 02110-1301 USA *
15  * *
16  * Alternatively, this file is available under the Mozilla Public *
17  * License Version 1.1. You may obtain a copy of the License at *
18  * http://www.mozilla.org/MPL/ *
19  ***************************************************************************/
20 
21 #ifndef TAGLIB_EBMLMASTERELEMENT_H
22 #define TAGLIB_EBMLMASTERELEMENT_H
23 #ifndef DO_NOT_DOCUMENT
24 
25 #include <list>
26 
27 #include "ebmlelement.h"
28 #include "taglib.h"
29 
30 namespace TagLib
31 {
32  class ByteVector;
33 
34  namespace EBML {
35  class MasterElement : public Element
36  {
37  public:
38  MasterElement(Id id, int sizeLength, offset_t dataSize, offset_t offset);
39  explicit MasterElement(Id id);
40  ~MasterElement() override;
41 
42  offset_t getOffset() const;
43  bool read(File &file) override;
44  ByteVector render() override;
45  void appendElement(std::unique_ptr<Element> &&element);
46  std::list<std::unique_ptr<Element>>::iterator begin();
47  std::list<std::unique_ptr<Element>>::iterator end();
48  std::list<std::unique_ptr<Element>>::const_iterator begin() const;
49  std::list<std::unique_ptr<Element>>::const_iterator end() const;
50  std::list<std::unique_ptr<Element>>::const_iterator cbegin() const;
51  std::list<std::unique_ptr<Element>>::const_iterator cend() const;
52  offset_t getPadding() const;
53  void setPadding(offset_t numBytes);
54  offset_t getMinRenderSize() const;
55  void setMinRenderSize(offset_t minimumSize);
56 
57  protected:
58  offset_t offset;
59  offset_t padding = 0;
60  offset_t minRenderSize = 0;
61  std::list<std::unique_ptr<Element>> elements;
62  };
63 
64  }
65 }
66 
67 #endif
68 #endif
off_t offset_t
Definition: taglib.h:64
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41