TagLib API Documentation
modfilebase.h
Go to the documentation of this file.
1/***************************************************************************
2 copyright : (C) 2011 by Mathias Panzenböck
3 email : grosser.meister.morti@gmx.net
4 ***************************************************************************/
5
6/***************************************************************************
7 * This library is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU Lesser General Public License version *
9 * 2.1 as published by the Free Software Foundation. *
10 * *
11 * This library is distributed in the hope that it will be useful, but *
12 * WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14 * Lesser General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Lesser General Public *
17 * License along with this library; if not, write to the Free Software *
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19 * 02110-1301 USA *
20 * *
21 * Alternatively, this file is available under the Mozilla Public *
22 * License Version 1.1. You may obtain a copy of the License at *
23 * http://www.mozilla.org/MPL/ *
24 ***************************************************************************/
25
26#ifndef TAGLIB_MODFILEBASE_H
27#define TAGLIB_MODFILEBASE_H
28
29#include "taglib.h"
30#include "tfile.h"
31#include "tlist.h"
32#include "taglib_export.h"
33
34namespace TagLib {
35 namespace Mod {
38 {
39 public:
40 ~FileBase() override;
41
42 FileBase(const FileBase &) = delete;
43 FileBase& operator=(const FileBase &) = delete;
44
45 protected:
48
49 void writeString(const String &s, unsigned long size, char padding = 0);
50 void writeByte(unsigned char byte);
51 void writeU16L(unsigned short number);
52 void writeU32L(unsigned long number);
53 void writeU16B(unsigned short number);
54 void writeU32B(unsigned long number);
55
56 bool readString(String &s, unsigned long size);
57 bool readByte(unsigned char &byte);
58 bool readU16L(unsigned short &number);
59 bool readU32L(unsigned long &number);
60 bool readU16B(unsigned short &number);
61 bool readU32B(unsigned long &number);
62 private:
63 class FileBasePrivate;
65 std::unique_ptr<FileBasePrivate> d;
66 };
67 } // namespace Mod
68} // namespace TagLib
69#endif
A file class with some useful methods for tag manipulation.
Definition: tfile.h:51
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:65
Base class for module files.
Definition: modfilebase.h:38
void writeU32L(unsigned long number)
void writeU16L(unsigned short number)
FileBase(FileName file)
bool readU16B(unsigned short &number)
void writeU32B(unsigned long number)
bool readU32L(unsigned long &number)
void writeByte(unsigned char byte)
void writeString(const String &s, unsigned long size, char padding=0)
FileBase(const FileBase &)=delete
FileBase(IOStream *stream)
bool readU32B(unsigned long &number)
bool readString(String &s, unsigned long size)
bool readByte(unsigned char &byte)
void writeU16B(unsigned short number)
bool readU16L(unsigned short &number)
FileBase & operator=(const FileBase &)=delete
A wide string class suitable for unicode.
Definition: tstring.h:83
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41
const char * FileName
Definition: tiostream.h:59
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55