/***************************************************************************
                          types.h  -  description
                             -------------------
    begin                : Sam Nov 22 2003
    copyright            : (C) 2003 by klaus frieler
    email                : kgf@omniversum.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef _MELCONV_H
#define _MELCONV_H
#include "libmelody/libmelody.h"

using namespace std;
enum Option{ noopt = -1, optFormat, optOutfile, optInfile, optTempo, optHelp, optStdIn, optCut, optPhrase, optSegment, optQuant, optIgnoreTempoChanges};

struct FormatOption
{
   FormatOption(Format form, string name):m_format(form), m_sFormat(name){}

   bool   is(const string& name) const { return  m_sFormat.find(name) !=string::npos;}
   Format m_format;
   string m_sFormat;   
};

struct FormatExt
{
   FormatExt(Format format, string ext): m_format(format), m_sExt(ext){}
   bool     is(Format form)const{ return m_format == form;}
   Format   m_format;
   string   m_sExt;
   
};

struct cmdLineOption
{
   cmdLineOption(const Option opt, const string& name, const string& longName):m_opt(opt), m_sName(name), m_sLongName(longName){};

   bool is(const string& str) const{ return (str == m_sName || str == m_sLongName);}

   Option m_opt;
   string m_sName;
   string m_sLongName;
};

#endif
