hydrogen 1.2.3
Legacy.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef H2C_LEGACY_H
24#define H2C_LEGACY_H
25
26#include <core/Object.h>
27#include <memory>
28
29namespace H2Core {
30
31class Drumkit;
32class Playlist;
33class Pattern;
34class PatternList;
35class InstrumentComponent;
36class InstrumentList;
37class License;
38class XMLNode;
39
44class Legacy : public H2Core::Object<Legacy> {
46 public:
52 static std::shared_ptr<InstrumentComponent> loadInstrumentComponent( XMLNode* pNode, const QString& sDrumkitPath, const License& drumkitLicense, bool bSilent = false );
59 static Pattern* load_drumkit_pattern( const QString& pattern_path, std::shared_ptr<InstrumentList> instrList );
66 static Playlist* load_playlist( Playlist* pl, const QString& pl_path );
67
68 static std::vector<PatternList*>* loadPatternGroupVector( XMLNode* pNode, PatternList* pPatternList, bool bSilent = false );
69
75 static bool checkTinyXMLCompatMode( QFile* pFile, bool bSilent = false );
76 static QByteArray convertFromTinyXML( QFile* pFile, bool bSilent = false );
77
78private:
82 static void convertStringFromTinyXML( QByteArray* pString );
83};
84
85};
86
87#endif // H2C_LEGACY_H
88
89/* vim: set softtabstop=4 noexpandtab: */
#define H2_OBJECT(name)
Definition Object.h:224
Legacy is a container for legacy code which should be once removed.
Definition Legacy.h:44
static void convertStringFromTinyXML(QByteArray *pString)
Convert (in-place) an XML escape sequence into a literal byte, rather than the character it actually ...
Definition Legacy.cpp:387
static Pattern * load_drumkit_pattern(const QString &pattern_path, std::shared_ptr< InstrumentList > instrList)
load pattern from a file
Definition Legacy.cpp:116
static bool checkTinyXMLCompatMode(QFile *pFile, bool bSilent=false)
Definition Legacy.cpp:336
static std::vector< PatternList * > * loadPatternGroupVector(XMLNode *pNode, PatternList *pPatternList, bool bSilent=false)
Definition Legacy.cpp:294
static QByteArray convertFromTinyXML(QFile *pFile, bool bSilent=false)
Definition Legacy.cpp:358
static Playlist * load_playlist(Playlist *pl, const QString &pl_path)
load playlist from a file
Definition Legacy.cpp:245
static std::shared_ptr< InstrumentComponent > loadInstrumentComponent(XMLNode *pNode, const QString &sDrumkitPath, const License &drumkitLicense, bool bSilent=false)
Backward compatibility code to load an #InstrumentComponent from an #Instrument which itself did not ...
Definition Legacy.cpp:49
Wrapper class to help Hydrogen deal with the license information specified in a drumkit.
Definition License.h:48
PatternList is a collection of patterns.
Definition PatternList.h:43
Pattern class is a Note container.
Definition Pattern.h:46
Drumkit info.
Definition Playlist.h:37
XMLNode is a subclass of QDomNode with read and write values methods.
Definition Xml.h:39