#ifndef _KVI_KVS_VARIANTLIST_H_
#define _KVI_KVS_VARIANTLIST_H_
//=============================================================================
//
//   File : kvi_kvs_variantlist.h
//   Created on Sat 11 Oct 2003 02:20:51 by Szymon Stefanek
//
//   This file is part of the KVIrc IRC client distribution
//   Copyright (C) 2003 Szymon Stefanek <pragma at kvirc dot net>
//
//   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 opinion) any later version.
//
//   This program is distributed in the HOPE that it will be USEFUL,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//   See the GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program. If not, write to the Free Software Foundation,
//   Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
//=============================================================================

#include "kvi_settings.h"
#include "kvi_pointerlist.h"
#include "kvi_kvs_variant.h"



class KVIRC_API KviKvsVariantList
{
public:
	KviKvsVariantList();
	KviKvsVariantList(KviKvsVariant * v1);
	KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2);
	KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKvsVariant * v3);
	KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKvsVariant * v3,KviKvsVariant * v4);
	KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKvsVariant * v3,KviKvsVariant * v4,KviKvsVariant * v5);
	KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKvsVariant * v3,KviKvsVariant * v4,KviKvsVariant * v5,KviKvsVariant * v6);
	KviKvsVariantList(KviKvsVariant * v1,KviKvsVariant * v2,KviKvsVariant * v3,KviKvsVariant * v4,KviKvsVariant * v5,KviKvsVariant * v6,KviKvsVariant * v7);
	KviKvsVariantList(TQString * s1);
	KviKvsVariantList(TQString * s1,TQString * s2);
	KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3);
	KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4);
	KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4,TQString * s5);
	KviKvsVariantList(TQString * s1,TQString * s2,TQString * s3,TQString * s4,TQString * s5,TQString * s6);
	~KviKvsVariantList();
protected:
	KviPointerList<KviKvsVariant> * m_pList;
public:
	KviKvsVariant * first(){ return m_pList->first(); };
	KviKvsVariant * next(){ return m_pList->next(); };
	KviKvsVariant * at(int iIdx){ return m_pList->at(iIdx); };
	unsigned int count(){ return m_pList->count(); };
	
	void clear(){ m_pList->clear(); };

	void append(const TQString &szParam){ m_pList->append(new KviKvsVariant(szParam)); };
	void append(kvs_int_t iInteger){ m_pList->append(new KviKvsVariant(iInteger)); };
	void append(kvs_real_t dReal){ m_pList->append(new KviKvsVariant(dReal)); };
	void append(bool bBoolean){ m_pList->append(new KviKvsVariant(bBoolean)); };
	void append(kvs_hobject_t hObject){ m_pList->append(new KviKvsVariant(hObject)); };
	void append(KviKvsArray * pArray){ m_pList->append(new KviKvsVariant(pArray)); };
	void append(KviKvsHash * pHash){ m_pList->append(new KviKvsVariant(pHash)); };

	void append(KviKvsVariant * v){ m_pList->append(v); };
	void prepend(KviKvsVariant * v){ m_pList->prepend(v); };
	
	void setAutoDelete(bool bAutoDelete); // this is true by default

	void allAsString(TQString &szBuffer);
	// returns true if there was a first parameter at all
	bool firstAsString(TQString &szBuffer);
	// returns true if there was a next parameter at all
	bool nextAsString(TQString &szBuffer);
};

#endif //!_KVI_KVS_VARIANTLIST_H_
