/***************************************************************************
 * serialize.h
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2007- the KTabEdit development team <mrgwen@gmail.com>
 ***************************************************************************/

/***************************************************************************
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * See the file COPYING for more information.
 ***************************************************************************/

#ifndef SERIALIZE_H
#define SERIALIZE_H

#include <QByteArray>

#include "tablature/trackpos.h"

class TabBar;
class TabBarProperties;
class TabTimeEffect;
class TabBend;
class TabChord;
class TabMixTableChanges;
class TabNote;
class TabNoteEffect;
class TabTime;
class TabTrack;

class Serialize
{
public:
	Serialize(const TabTrack* track);
	Serialize(const TabTrack* track, const TrackPos& begin, const TrackPos& end);
	virtual ~Serialize();
	
	virtual QByteArray exec();
	virtual QByteArray properties();
	virtual QByteArray bar(const TabBar* bar);
	virtual QByteArray barMixerProperties(const TabMixTableChanges* properties);
	virtual QByteArray barProperties(const TabBarProperties* properties);
	virtual QByteArray time(const TabTime* time);
	virtual QByteArray timeEffects(const TabTimeEffect* effect);
	virtual QByteArray timeChord(const TabChord* chord);
	virtual QByteArray note(const TabNote* note);
	virtual QByteArray noteEffects(const TabNoteEffect* effect);
	virtual QByteArray bend(const TabBend* bend);
private:
	const TabTrack* mTrack;
	bool mCopyTrack;
	TrackPos mBegin;
	TrackPos mEnd;
};

#endif
